Toehah3u
Anmeldungsdatum: 27. April 2015
Beiträge: 817
|
Mir ist gerade, "unschön", aufgefallen, das Firefox sich in Ubuntu mit diversen Webseiten, ohne Zutun des Users, verbindet. Wie kann ich das unterbinden? Beispiel: Shell aufrufen und in der Shell sudo apt-get install tcpdump
sudo tcpdump -v aufrufen. Danach den Browser (Firefox) aufrufen und nichts machen. Einfach nur im Terminal-Fenster gucken. Die meisten Seiten konnte ich in der /etc/hosts verbieten, also gegen 127.0.0.1 laufen lassen. Aber ganz aggressiv sind mir da die Domänen von *.1e100.net und *.cloudfront.net aufgefallen. Ich habe die schon, ohne Erfolg, in die /etc/hosts eingetragen und gegen 127.0.0.1 laufen lassen aber das will nicht so richtig funktionieren. Wie kann ich diesen Mist verbieten?
😕
|
Gerum
Anmeldungsdatum: 26. Januar 2016
Beiträge: 46
|
Wenn man mal nach cloudfront sucht, findet man das die Domain zu einem Content-Delivery-Network gehört. Was erst einmal heißt, dass es irgendetwas beliebiges sein kann. Bei Firefox würde ich davon ausgehen, dass er sich von da Updates herunterläd, aber um es herauszufinden, müsste man eine genauere Analyse der Empfangen Daten und der Server durchführen.
|
lubux
Anmeldungsdatum: 21. November 2012
Beiträge: 13933
|
duno schrieb: Aber ganz aggressiv sind mir da die Domänen von *.1e100.net und *.cloudfront.net aufgefallen. Ich habe die schon, ohne Erfolg, ...
Versuch mal mit:
sudo iptables -I OUTPUT 1 -p udp --dport 53 -m string --algo kmp --string cloudfront -j REJECT
sudo iptables -I OUTPUT 2 -p udp --dport 53 -m string --algo kmp --string 1e100 -j REJECT Das wirkt aber evtl. erst wenn alle dns-caches in deiner Konstellation erneuert sind. Evtl. auch mit:
sudo sh -x /etc/init.d/nscd restart
sudo sh -x /etc/init.d/dns-clean restart
|
Toehah3u
(Themenstarter)
Anmeldungsdatum: 27. April 2015
Beiträge: 817
|
lubux schrieb: Versuch mal mit:
Ja, das mit den iptables und dem "string" ist wohl die Lösung, auch wenn Ubuntu immer nach Hause (Canonical) telefonieren möchte ... Gibt es eine Möglichkeit wie das hier: #Blocking daisy.ubuntu.com
iptables -A FORWARD -p tcp -m tcp --sport 443 -m string --string "daisy.ubuntu.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 80 -m string --string "daisy.ubuntu.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 443 -m string --string "daisy.ubuntu.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 80 -m string --string "daisy.ubuntu.com" --algo bm -j MYDROP
#Blocking start.ubuntu.com
iptables -A FORWARD -p tcp -m tcp --sport 443 -m string --string "start.ubuntu.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 80 -m string --string "start.ubuntu.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 443 -m string --string "start.ubuntu.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 80 -m string --string "start.ubuntu.com" --algo bm -j MYDROP
#Blocking shop.ubuntu.com
iptables -A FORWARD -p tcp -m tcp --sport 443 -m string --string "shop.ubuntu.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 80 -m string --string "shop.ubuntu.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 443 -m string --string "shop.ubuntu.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 80 -m string --string "shop.ubuntu.com" --algo bm -j MYDROP
#Blocking help.ubuntu.com
iptables -A FORWARD -p tcp -m tcp --sport 443 -m string --string "help.ubuntu.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 80 -m string --string "help.ubuntu.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 443 -m string --string "help.ubuntu.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 80 -m string --string "help.ubuntu.com" --algo bm -j MYDROP
#Blocking avocado.canonical.com
iptables -A FORWARD -p tcp -m tcp --sport 443 -m string --string "avocado.canonical.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 80 -m string --string "avocado.canonical.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 443 -m string --string "avocado.canonical.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 80 -m string --string "avocado.canonical.com" --algo bm -j MYDROP
#Blocking jujube.canonical.com
iptables -A FORWARD -p tcp -m tcp --sport 443 -m string --string "jujube.canonical.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 80 -m string --string "jujube.canonical.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 443 -m string --string "jujube.canonical.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 80 -m string --string "jujube.canonical.com" --algo bm -j MYDROP
#Blocking privet.canonical.com
iptables -A FORWARD -p tcp -m tcp --sport 443 -m string --string "privet.canonical.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 80 -m string --string "privet.canonical.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 443 -m string --string "privet.canonical.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 80 -m string --string "privet.canonical.com" --algo bm -j MYDROP
#Blocking juniperberry.canonical.com
iptables -A FORWARD -p tcp -m tcp --sport 443 -m string --string "juniperberry.canonical.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 80 -m string --string "juniperberry.canonical.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 443 -m string --string "juniperberry.canonical.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 80 -m string --string "juniperberry.canonical.com" --algo bm -j MYDROP
#Blocking 1e100.net
iptables -A FORWARD -p tcp -m tcp --sport 443 -m string --string "1e100.net" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 80 -m string --string "1e100.net" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 443 -m string --string "1e100.net" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 80 -m string --string "1e100.net" --algo bm -j MYDROP
#Blocking cloudfront.net
iptables -A FORWARD -p tcp -m tcp --sport 443 -m string --string "cloudfront.net" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 80 -m string --string "cloudfront.net" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 443 -m string --string "cloudfront.net" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 80 -m string --string "cloudfront.net" --algo bm -j MYDROP
#Blocking amazonaws.com
iptables -A FORWARD -p tcp -m tcp --sport 443 -m string --string "amazonaws.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 80 -m string --string "amazonaws.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 443 -m string --string "amazonaws.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 80 -m string --string "amazonaws.com" --algo bm -j MYDROP
#Blocking googleadservices.com
iptables -A FORWARD -p tcp -m tcp --sport 443 -m string --string "googleadservices.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 80 -m string --string "googleadservices.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 443 -m string --string "googleadservices.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 80 -m string --string "googleadservices.com" --algo bm -j MYDROP
#Blocking geoip-zlb.vips.scl3.mozilla.com
iptables -A FORWARD -p tcp -m tcp --sport 443 -m string --string "geoip-zlb.vips.scl3.mozilla.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 80 -m string --string "geoip-zlb.vips.scl3.mozilla.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 443 -m string --string "geoip-zlb.vips.scl3.mozilla.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 80 -m string --string "geoip-zlb.vips.scl3.mozilla.com" --algo bm -j MYDROP
#Blocking ip-zlb.vips.scl3.mozilla.com
iptables -A FORWARD -p tcp -m tcp --sport 443 -m string --string "ip-zlb.vips.scl3.mozilla.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 80 -m string --string "ip-zlb.vips.scl3.mozilla.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 443 -m string --string "ip-zlb.vips.scl3.mozilla.com" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 80 -m string --string "ip-zlb.vips.scl3.mozilla.com" --algo bm -j MYDROP
#Blocking geo.mozilla.org
iptables -A FORWARD -p tcp -m tcp --sport 443 -m string --string "geo.mozilla.org" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 80 -m string --string "geo.mozilla.org" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 443 -m string --string "geo.mozilla.org" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 80 -m string --string "geo.mozilla.org" --algo bm -j MYDROP
#Blocking Facebook
iptables -A FORWARD -p tcp -m tcp --sport 443 -m string --string "facebook" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 80 -m string --string "facebook" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 443 -m string --string "facebook" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 80 -m string --string "facebook" --algo bm -j MYDROP
#Blocking Twitter
iptables -A FORWARD -p tcp -m tcp --sport 443 -m string --string "twitter" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 80 -m string --string "twitter" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 443 -m string --string "twitter" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 80 -m string --string "tritter" --algo bm -j MYDROP
zu verkürzen?
😕
|
lubux
Anmeldungsdatum: 21. November 2012
Beiträge: 13933
|
duno schrieb: #Blocking Facebook
iptables -A FORWARD -p tcp -m tcp --sport 443 -m string --string "facebook" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 80 -m string --string "facebook" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 443 -m string --string "facebook" --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 80 -m string --string "facebook" --algo bm -j MYDROP zu verkürzen?
Das weiß ich nicht, denn ich kenne das target MYDROP nicht und will es auch nicht kennen. Aber ich denke, das mit den Ports 80 und 443 ist keine gute Idee, denn es gibt fast keine WEB-Seite die den String facebook & Co. (als Werbung, Link, etc.) nicht beinhaltet. Deshalb nur die Namensauflösung per String und Port 53 verhindern/blocken.
|
verdooft
Anmeldungsdatum: 15. September 2012
Beiträge: 4016
|
https://support.mozilla.org/de/questions/1076594
open about:config
set browser.selfsupport.url to ""
https://wiki.mozilla.org/Advocacy/heartbeat In Sicherheit die Checks auf attackierende und Betrugsseiten deaktivieren, schaltet auch verschiedene Verbindungen ab, wenn ich mich nicht täusche, ist in Firefox dieses: https://developers.google.com/safe-browsing/
|
Toehah3u
(Themenstarter)
Anmeldungsdatum: 27. April 2015
Beiträge: 817
|
lubux schrieb: Das weiß ich nicht, denn ich kenne das target MYDROP nicht und will es auch nicht kennen. Aber ich denke, das mit den Ports 80 und 443 ist keine gute Idee, denn es gibt fast keine WEB-Seite die den String facebook & Co. (als Werbung, Link, etc.) nicht beinhaltet. Deshalb nur die Namensauflösung per String und Port 53 verhindern/blocken.
iptables -N MYDROP
iptables -A MYDROP -j LOG --log-prefix "MYDROP: "
iptables -A MYDROP -j DROP Port 53 sollte eigentlich "nur" über den internen DNS-Server laufen und sonst nichts. Aber ich bekomme das mit den strings auch nicht so richtig "hingebogen" ... ber01s15-in-f14.1e100.net.http>
ber01s14-in-f14.1e100.net.https>
server-54-239-164-55.lhr50.r.cloudfront.net.https> Habe ich da in meinen Regeln einen Fehler?
|
verdooft
Anmeldungsdatum: 15. September 2012
Beiträge: 4016
|
1e100.net hängt sehr wahrscheinlich mit Google Safebrowsing zusammen. Nur ein Fund von vielen:
Another reason it appears is if you’re using Firefox. If you have the “Safe Browsing” feature, it will access Google’s list of bad websites. The server that will check each site before it loads is server.1e100.net. In other words, that’s the server that will determine whether or not you should visit. If you shouldn’t, it’ll let you know and give you the option to go back to the previous page.
http://www.tech-faq.com/1e100net.html Du kannst Verbindungen zu cloudfront.net und 1e100.net also im Firefox abstellen.
|
lubux
Anmeldungsdatum: 21. November 2012
Beiträge: 13933
|
duno schrieb: Port 53 sollte eigentlich "nur" über den internen DNS-Server laufen und sonst nichts.
Ja, aber dein "interner DNS-Server" verbindet doch auch zu einem Port 53 im Internet, oder? Und dafür wäre diese iptables-OUTPUT-Regel auch zuständig. Versuch mal den Port 53 nach außen zu blocken?
|
lubux
Anmeldungsdatum: 21. November 2012
Beiträge: 13933
|
duno schrieb: Aber ich bekomme das mit den strings auch nicht so richtig "hingebogen" ... ber01s15-in-f14.1e100.net.http>
ber01s14-in-f14.1e100.net.https>
server-54-239-164-55.lhr50.r.cloudfront.net.https>
Das waren noch Zeiten, als man dnsspoof (mit wildcards) für so etwas nutzen konnte: 😉
:~$ host -t A ber01s14-in-f14.1e100.net
ber01s14-in-f14.1e100.net has address 193.169.12.12
:~$ host -t A ber01s15-in-f14.1e100.net
ber01s15-in-f14.1e100.net has address 193.169.12.12
:~$ host -t A server-54-239-164-55.lhr50.r.cloudfront.net
server-54-239-164-55.lhr50.r.cloudfront.net has address 193.169.12.12
:~$ ping -c 1 -W 2 193.169.12.12
PING 193.169.12.12 (193.169.12.12) 56(84) bytes of data.
From 192.168.178.21 icmp_seq=1 Destination Port Unreachable
--- 193.169.12.12 ping statistics ---
0 packets transmitted, 0 received, +1 errors
|
Toehah3u
(Themenstarter)
Anmeldungsdatum: 27. April 2015
Beiträge: 817
|
Kurzform, ok hab es "fast" herausgefunden: suchwort="d22io8ipz38kkf.cloudfront.net facebook twitter whatsup daisy.ubuntu.com start.ubuntu.comi shop.ubuntu.com help.ubuntu.com avocado.canonical.com jujube.canonical.com privet.canonical.com juniperberry.canonical.com golem.canonical.com 1e100 cloudfront amazonaws.com googleadservices.com self-repair.mozilla.org scl3.mozilla.com geoip-zlb.vips.scl3.mozilla.com geo.mozilla.org"
for sw in $suchwort
do
iptables -A OUTPUT -m string --string $sw --algo bm -j MYDROP
iptables -A FORWARD -m string --string $sw --algo bm -j MYDROP
iptables -A INPUT -m string --string $sw --algo bm -j MYDROP
iptables -A OUTPUT -p tcp -m tcp --dport 53 -m string --string $sw --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 53 -m string --string $sw --algo bm -j MYDROP
iptables -A INPUT -p tcp -m tcp --dport 53 -m string --string $sw --algo bm -j MYDROP
#DNS TCP
iptables -A OUTPUT -p tcp -m tcp --sport 53 -m string --string $sw --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 53 -m string --string $sw --algo bm -j MYDROP
iptables -A INPUT -p tcp -m tcp --sport 53 -m string --string $sw --algo bm -j MYDROP
#DNS UPD
iptables -A OUTPUT -p udp -m udp --dport 53 -m string --string $sw --algo bm -j MYDROP
iptables -A FORWARD -p udp -m udp --dport 53 -m string --string $sw --algo bm -j MYDROP
iptables -A INPUT -p udp -m udp --dport 53 -m string --string $sw --algo bm -j MYDROP
iptables -A OUTPUT -p udp -m udp --sport 53 -m string --string $sw --algo bm -j MYDROP
iptables -A FORWARD -p udp -m udp --sport 53 -m string --string $sw --algo bm -j MYDROP
iptables -A INPUT -p udp -m udp --sport 53 -m string --string $sw --algo bm -j MYDROP
done
Aber, das will immer noch nicht so richtig, wo ist mein Fehler? Ich möchte ungern bei 50 Clients + about:config
browser.selfsupport.url
double click (blank) ausführen. Hat jemand noch nen Tipp?
😕 Nachtrag: Wenn ich den Firefox nun öffne, ohne was zu machen, dann steht da nach kurzer Zeit "wieder" unter lsof -i computer.domain:localport->216.58.213.46:http (ESTABLISHED) Das ist doch Mist, oder? 😕 Noch ein Nachtrag: Selbst wenn mein Client über einen zweiten internen Router läuft, und auf dem zweiten internen Router die iptables laufen, bekomme ich nach kurzer Zeit via: lsof -i firefox xxxx user xxu IPv4 xxxxx 0t0 TCP 10.xx.xx.xx:34820->173.194.32.201:http (ESTABLISHED) Ich verstehe das nicht. Ich ruf doch noch gar nichts auf ... ☹
|
verdooft
Anmeldungsdatum: 15. September 2012
Beiträge: 4016
|
Where are the about:config settings for a profile stored? They're stored in the prefs.js file, which is a plain text file. Preferences can also be set at startup using the user.js file. This file doesn't exist by default.
https://support.mozilla.org/de/questions/965842 Eventuell per Shellscript auf den 50 Clients.
|
Toehah3u
(Themenstarter)
Anmeldungsdatum: 27. April 2015
Beiträge: 817
|
Das mit dem "syspref.js" fand ich jetzt auch ganz merkwürdig, da es auf einmal in /etc/
unter firefox
und
thunderbird steht. Trotzdem weiss ich immer noch nicht, wie ich den Mist "global" blockiere. Muss ich mir jetzt von Mozilla vorschreiben lassen, wie ich meine Server zu konfigurieren habe? 😕
|
lubux
Anmeldungsdatum: 21. November 2012
Beiträge: 13933
|
duno schrieb: Selbst wenn mein Client über einen zweiten internen Router läuft, und auf dem zweiten internen Router die iptables laufen, bekomme ich nach kurzer Zeit via: firefox xxxx user xxu IPv4 xxxxx 0t0 TCP 10.xx.xx.xx:34820->173.194.32.201:http (ESTABLISHED) Ich verstehe das nicht.
Welche iptables-Regel auf deinem 2. internen Router, soll das blocken?
|
Toehah3u
(Themenstarter)
Anmeldungsdatum: 27. April 2015
Beiträge: 817
|
lubux schrieb: Welche iptables-Regel auf deinem 2. internen Router, soll das blocken?
Na die hier: suchwort="smartadserver moatads doubleclick *smartserver.com kamaitechnologies.com d22io8ipz38kkf.cloudfront.net facebook twitter whatsup daisy.ubuntu.com start.ubuntu.comi shop.ubuntu.com help.ubuntu.com avocado.canonical.com jujube.canonical.com privet.canonical.com juniperberry.canonical.com golem.canonical.com 1e100 cloudfront amazonaws.com googleadservices.com self-repair.mozilla.org scl3.mozilla.com geoip-zlb.vips.scl3.mozilla.com geo.mozilla.org"
for sw in $suchwort
do
iptables -A OUTPUT -m string --string $sw --algo bm -j MYDROP
iptables -A FORWARD -m string --string $sw --algo bm -j MYDROP
iptables -A INPUT -m string --string $sw --algo bm -j MYDROP
iptables -A OUTPUT -p tcp -m tcp --dport 53 -m string --string $sw --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --dport 53 -m string --string $sw --algo bm -j MYDROP
iptables -A INPUT -p tcp -m tcp --dport 53 -m string --string $sw --algo bm -j MYDROP
#DNS TCP
iptables -A OUTPUT -p tcp -m tcp --sport 53 -m string --string $sw --algo bm -j MYDROP
iptables -A FORWARD -p tcp -m tcp --sport 53 -m string --string $sw --algo bm -j MYDROP
iptables -A INPUT -p tcp -m tcp --sport 53 -m string --string $sw --algo bm -j MYDROP
#DNS UPD
iptables -A OUTPUT -p udp -m udp --dport 53 -m string --string $sw --algo bm -j MYDROP
iptables -A FORWARD -p udp -m udp --dport 53 -m string --string $sw --algo bm -j MYDROP
iptables -A INPUT -p udp -m udp --dport 53 -m string --string $sw --algo bm -j MYDROP
iptables -A OUTPUT -p udp -m udp --sport 53 -m string --string $sw --algo bm -j MYDROP
iptables -A FORWARD -p udp -m udp --sport 53 -m string --string $sw --algo bm -j MYDROP
iptables -A INPUT -p udp -m udp --sport 53 -m string --string $sw --algo bm -j MYDROP
done Aber das scheint noch ein Fehler drin zu sein ...
☹
|