Kill Switch NordVPN no Ubuntu

estou migrando do windows para ubuntu lxqt eu uso nordvpn no windows e lá No windows tem a opção de deixar o Kill Switch ativado previnindo vazamento de IP. no linux não tem essa opção já que usamos apenas o terminal e NÃO tem GUI .

no ubuntu se minha conexão cair estarei exposto a vazamento de IP?
tem como ativar o Kill Switch pelo terminal do ubuntu ?

pq ninguém responde estou meio decepcionado com a famosa comunidade linux pois tá abandonado pois tanto aqui como no viva o linux ninguém responde a dúvidas de novatos

Se ngm respondeu, é provável que ngm saiba, ou que quem saiba do assunto não tenha visto. Mas o padrão aqui é o pessoal ajudar, não ignorar. Paciência, camarada

Tips and tricks

Internet “kill switch”

The following iptables rules only allow network traffic through the tun interface, with the exception that traffic is allowed to PIA’s DNS servers and to port 1197, which is used in establishing the VPN connection:

/etc/iptables/iptables.rules

:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT DROP [0:10]
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -i tun+ -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -d 209.222.18.222/32 -j ACCEPT
-A OUTPUT -d 209.222.18.218/32 -j ACCEPT
-A OUTPUT -p udp -m udp --dport 1197 -j ACCEPT
-A OUTPUT -o tun+ -j ACCEPT
-A OUTPUT -j REJECT --reject-with icmp-net-unreachable
COMMIT

This ensures that if you are disconnected from the VPN unknowingly, no network traffic is allowed in or out.

If you wish to additionally access devices on your LAN, you will need to explicitly allow them. For example, to allow access to devices on 192.0.0.0/24, add the following two rules (before any REJECT rule):

-A INPUT -s 192.168.0.0/24 -j ACCEPT
-A OUTPUT -d 192.168.0.0/24 -j ACCEPT

Additionally, the above rules block the ICMP protocol, which is probably not desired. See this thread for potential pitfalls of using these iptables rules as well as more details.

Fonte: Private Internet Access - ArchWiki

1 curtida

obrigado amigo vc é o cara

Este tópico foi fechado automaticamente 3 dias depois da última resposta. Novas respostas não são mais permitidas.