¿Cómo puedo hacer que Firefox funcione como unespecífico del sitio¿navegador?
El objetivo es la seguridad a través de la compartimentación. Específicamente, para frustrar los intentos de Facebook de rastrear y almacenar toda mi actividad de navegación en Internet, incluso cuando estoyno en el sitio web de facebook.
Idealmente, me gustaría que un navegador funcione de manera que puedasoloAcceder a Facebook y mi otro navegador funciona de manera que pueda acceder a todos los sitios.exceptode facebook.
Déjeme saber cómo puedo configurar Firefox para que funcione como un navegador específico de Facebook (sitio único).
Respuesta1
Contenedor de Facebook. Este complemento aísla Facebook en su navegador. Probablemente esto sea todo lo que necesitas.
Si quieres estar más seguro, utiliza dosPerfiles. Instale algunos complementos de bloqueo de sitios web en ambos. Incluya Facebook en la lista negra en el primer perfil, incluya en la lista blanca solo Facebook en el segundo.
Respuesta2
Esto se puede hacer firejail
en Linux, donde puede usar el --netfilter
argumento para:
[a] defina reglas de iptables para bloquear el acceso a todos los netblocks de IP propiedad de Facebook en suNavegador principaly
[b] definir reglas de iptables para bloquear el acceso a todo Internetexceptoesos netblocks ip propiedad de Facebook en unEspecífico de Facebooknavegador (zona de pruebas)
Se puede encontrar una lista de IP netblocks propiedad de Facebook utilizando un número whois del Sistema Autónomo (AS) para Facebook, Inc = AS32934
root@disp355:/home/user# whois -h whois.radb.net -- \
root@disp355:/home/user# '-i origin AS32934'| grep -e "^route:"
...
route: 69.63.176.0/20
route: 66.220.144.0/20
route: 66.220.144.0/21
route: 69.63.184.0/21
route: 69.63.176.0/21
route: 74.119.76.0/22
route: 69.171.255.0/24
route: 173.252.64.0/18
route: 69.171.224.0/19
route: 69.171.224.0/20
root@disp355:/home/user#
Luego, la lista completa se puede colocar en un archivo netfilter para su navegador específico de Facebook:
sudo bash -c 'cat << EOF > /etc/firejail/facebookOnly.net
################################################################################
# Author: Michael Altfield <[email protected]>
# Created: 2019-03-25
# Updated: 2019-03-25
# Version: 0.1
# Purpose: Permits traffic to/from facebook (and dns) only
################################################################################
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT DROP [0:0]
-A OUTPUT --destination 102.132.96.0/20 -j ACCEPT
-A OUTPUT --destination 102.132.96.0/24 -j ACCEPT
-A OUTPUT --destination 103.4.96.0/22 -j ACCEPT
-A OUTPUT --destination 129.134.0.0/17 -j ACCEPT
-A OUTPUT --destination 157.240.0.0/17 -j ACCEPT
-A OUTPUT --destination 157.240.10.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.1.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.11.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.12.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.13.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.14.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.15.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.18.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.19.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.192.0/18 -j ACCEPT
-A OUTPUT --destination 157.240.193.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.194.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.195.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.20.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.2.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.21.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.22.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.24.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.25.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.26.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.27.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.28.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.29.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.30.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.3.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.6.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.7.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.8.0/24 -j ACCEPT
-A OUTPUT --destination 157.240.9.0/24 -j ACCEPT
-A OUTPUT --destination 173.252.64.0/19 -j ACCEPT
-A OUTPUT --destination 173.252.88.0/21 -j ACCEPT
-A OUTPUT --destination 173.252.96.0/19 -j ACCEPT
-A OUTPUT --destination 179.60.192.0/22 -j ACCEPT
-A OUTPUT --destination 179.60.192.0/24 -j ACCEPT
-A OUTPUT --destination 179.60.193.0/24 -j ACCEPT
-A OUTPUT --destination 179.60.194.0/24 -j ACCEPT
-A OUTPUT --destination 179.60.195.0/24 -j ACCEPT
-A OUTPUT --destination 185.60.216.0/22 -j ACCEPT
-A OUTPUT --destination 185.60.216.0/24 -j ACCEPT
-A OUTPUT --destination 185.60.217.0/24 -j ACCEPT
-A OUTPUT --destination 185.60.218.0/24 -j ACCEPT
-A OUTPUT --destination 185.60.219.0/24 -j ACCEPT
-A OUTPUT --destination 204.15.20.0/22 -j ACCEPT
-A OUTPUT --destination 31.13.24.0/21 -j ACCEPT
-A OUTPUT --destination 31.13.64.0/18 -j ACCEPT
-A OUTPUT --destination 31.13.64.0/19 -j ACCEPT
-A OUTPUT --destination 31.13.64.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.65.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.66.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.67.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.68.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.70.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.71.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.72.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.73.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.74.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.75.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.80.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.81.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.82.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.83.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.84.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.85.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.86.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.87.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.89.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.90.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.91.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.92.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.93.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.94.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.95.0/24 -j ACCEPT
-A OUTPUT --destination 31.13.96.0/19 -j ACCEPT
-A OUTPUT --destination 45.64.40.0/22 -j ACCEPT
-A OUTPUT --destination 66.220.144.0/20 -j ACCEPT
-A OUTPUT --destination 66.220.144.0/21 -j ACCEPT
-A OUTPUT --destination 66.220.152.0/21 -j ACCEPT
-A OUTPUT --destination 69.171.224.0/19 -j ACCEPT
-A OUTPUT --destination 69.171.224.0/20 -j ACCEPT
-A OUTPUT --destination 69.171.239.0/24 -j ACCEPT
-A OUTPUT --destination 69.171.240.0/20 -j ACCEPT
-A OUTPUT --destination 69.171.250.0/24 -j ACCEPT
-A OUTPUT --destination 69.171.255.0/24 -j ACCEPT
-A OUTPUT --destination 69.63.176.0/20 -j ACCEPT
-A OUTPUT --destination 69.63.176.0/21 -j ACCEPT
-A OUTPUT --destination 69.63.184.0/21 -j ACCEPT
-A OUTPUT --destination 74.119.76.0/22 -j ACCEPT
-A OUTPUT -p udp --dport 53 -j ACCEPT
-A OUTPUT -j DROP
-A INPUT -p udp --sport 53 -j ACCEPT
-A INPUT -m state --state ESTABLISHED -j ACCEPT
-A INPUT -j DROP
COMMIT
EOF'
De manera similar, cree lo inverso para su navegador principal:
sudo bash -c 'cat << EOF > /etc/firejail/notFacebook.net
################################################################################
# Author: Michael Altfield <[email protected]>
# Created: 2019-03-25
# Updated: 2019-03-25
# Version: 0.1
# Purpose: Permits traffic to/from everything except facebook
################################################################################
*filter
:INPUT DROP [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A OUTPUT --destination 102.132.96.0/20 -j DROP
-A OUTPUT --destination 102.132.96.0/24 -j DROP
-A OUTPUT --destination 103.4.96.0/22 -j DROP
-A OUTPUT --destination 129.134.0.0/17 -j DROP
-A OUTPUT --destination 157.240.0.0/17 -j DROP
-A OUTPUT --destination 157.240.10.0/24 -j DROP
-A OUTPUT --destination 157.240.1.0/24 -j DROP
-A OUTPUT --destination 157.240.11.0/24 -j DROP
-A OUTPUT --destination 157.240.12.0/24 -j DROP
-A OUTPUT --destination 157.240.13.0/24 -j DROP
-A OUTPUT --destination 157.240.14.0/24 -j DROP
-A OUTPUT --destination 157.240.15.0/24 -j DROP
-A OUTPUT --destination 157.240.18.0/24 -j DROP
-A OUTPUT --destination 157.240.19.0/24 -j DROP
-A OUTPUT --destination 157.240.192.0/18 -j DROP
-A OUTPUT --destination 157.240.193.0/24 -j DROP
-A OUTPUT --destination 157.240.194.0/24 -j DROP
-A OUTPUT --destination 157.240.195.0/24 -j DROP
-A OUTPUT --destination 157.240.20.0/24 -j DROP
-A OUTPUT --destination 157.240.2.0/24 -j DROP
-A OUTPUT --destination 157.240.21.0/24 -j DROP
-A OUTPUT --destination 157.240.22.0/24 -j DROP
-A OUTPUT --destination 157.240.24.0/24 -j DROP
-A OUTPUT --destination 157.240.25.0/24 -j DROP
-A OUTPUT --destination 157.240.26.0/24 -j DROP
-A OUTPUT --destination 157.240.27.0/24 -j DROP
-A OUTPUT --destination 157.240.28.0/24 -j DROP
-A OUTPUT --destination 157.240.29.0/24 -j DROP
-A OUTPUT --destination 157.240.30.0/24 -j DROP
-A OUTPUT --destination 157.240.3.0/24 -j DROP
-A OUTPUT --destination 157.240.6.0/24 -j DROP
-A OUTPUT --destination 157.240.7.0/24 -j DROP
-A OUTPUT --destination 157.240.8.0/24 -j DROP
-A OUTPUT --destination 157.240.9.0/24 -j DROP
-A OUTPUT --destination 173.252.64.0/19 -j DROP
-A OUTPUT --destination 173.252.88.0/21 -j DROP
-A OUTPUT --destination 173.252.96.0/19 -j DROP
-A OUTPUT --destination 179.60.192.0/22 -j DROP
-A OUTPUT --destination 179.60.192.0/24 -j DROP
-A OUTPUT --destination 179.60.193.0/24 -j DROP
-A OUTPUT --destination 179.60.194.0/24 -j DROP
-A OUTPUT --destination 179.60.195.0/24 -j DROP
-A OUTPUT --destination 185.60.216.0/22 -j DROP
-A OUTPUT --destination 185.60.216.0/24 -j DROP
-A OUTPUT --destination 185.60.217.0/24 -j DROP
-A OUTPUT --destination 185.60.218.0/24 -j DROP
-A OUTPUT --destination 185.60.219.0/24 -j DROP
-A OUTPUT --destination 204.15.20.0/22 -j DROP
-A OUTPUT --destination 31.13.24.0/21 -j DROP
-A OUTPUT --destination 31.13.64.0/18 -j DROP
-A OUTPUT --destination 31.13.64.0/19 -j DROP
-A OUTPUT --destination 31.13.64.0/24 -j DROP
-A OUTPUT --destination 31.13.65.0/24 -j DROP
-A OUTPUT --destination 31.13.66.0/24 -j DROP
-A OUTPUT --destination 31.13.67.0/24 -j DROP
-A OUTPUT --destination 31.13.68.0/24 -j DROP
-A OUTPUT --destination 31.13.70.0/24 -j DROP
-A OUTPUT --destination 31.13.71.0/24 -j DROP
-A OUTPUT --destination 31.13.72.0/24 -j DROP
-A OUTPUT --destination 31.13.73.0/24 -j DROP
-A OUTPUT --destination 31.13.74.0/24 -j DROP
-A OUTPUT --destination 31.13.75.0/24 -j DROP
-A OUTPUT --destination 31.13.80.0/24 -j DROP
-A OUTPUT --destination 31.13.81.0/24 -j DROP
-A OUTPUT --destination 31.13.82.0/24 -j DROP
-A OUTPUT --destination 31.13.83.0/24 -j DROP
-A OUTPUT --destination 31.13.84.0/24 -j DROP
-A OUTPUT --destination 31.13.85.0/24 -j DROP
-A OUTPUT --destination 31.13.86.0/24 -j DROP
-A OUTPUT --destination 31.13.87.0/24 -j DROP
-A OUTPUT --destination 31.13.89.0/24 -j DROP
-A OUTPUT --destination 31.13.90.0/24 -j DROP
-A OUTPUT --destination 31.13.91.0/24 -j DROP
-A OUTPUT --destination 31.13.92.0/24 -j DROP
-A OUTPUT --destination 31.13.93.0/24 -j DROP
-A OUTPUT --destination 31.13.94.0/24 -j DROP
-A OUTPUT --destination 31.13.95.0/24 -j DROP
-A OUTPUT --destination 31.13.96.0/19 -j DROP
-A OUTPUT --destination 45.64.40.0/22 -j DROP
-A OUTPUT --destination 66.220.144.0/20 -j DROP
-A OUTPUT --destination 66.220.144.0/21 -j DROP
-A OUTPUT --destination 66.220.152.0/21 -j DROP
-A OUTPUT --destination 69.171.224.0/19 -j DROP
-A OUTPUT --destination 69.171.224.0/20 -j DROP
-A OUTPUT --destination 69.171.239.0/24 -j DROP
-A OUTPUT --destination 69.171.240.0/20 -j DROP
-A OUTPUT --destination 69.171.250.0/24 -j DROP
-A OUTPUT --destination 69.171.255.0/24 -j DROP
-A OUTPUT --destination 69.63.176.0/20 -j DROP
-A OUTPUT --destination 69.63.176.0/21 -j DROP
-A OUTPUT --destination 69.63.184.0/21 -j DROP
-A OUTPUT --destination 74.119.76.0/22 -j DROP
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -j DROP
COMMIT
EOF'
Ahora puedes iniciar tu navegador específico de Facebook usando el primer conjunto de reglas de Netfitler de la siguiente manera:
firejail --dns="1.1.1.1" --dns="9.9.9.9" --dns="8.8.8.8" --net=eth0 --netfilter=/etc/firejail/facebookOnly.net firefox -no-remote -new-instance "https://www.facebook.com"
Y para el navegador de uso general que no puede "llamar a casa" a los servidores de Facebook desde el resto de la web:
firejail --dns="1.1.1.1" --dns="9.9.9.9" --dns="8.8.8.8" --net=eth0 --netfilter=/etc/firejail/notFacebok.net firefox -no-remote -new-instance "https://start.duckduckgo.com"
Para obtener más información sobre esto, consulte el siguiente artículo: