What's new

VPN Kill switch for one specific host

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

evangelion69

New Around Here
Hello

I`m looking for solution of my problem. I have enabled open vpn client with Policy Rules in Redirect Internet Traffic. My rules are only Destination IPs because i don't`wont to redirect all traffic from one of my computers. When VPN is down, I want to stop internet connection to this host at all. Something like:

#WAN_IF=`nvram get wan_iface`
#iptables -I FORWARD -i br0 -s 192.168.1.13 -o $WAN_IF -j REJECT --reject-with icmp-host-prohibited
#iptables -I FORWARD -i br0 -s 192.168.1.13 -p tcp -o $WAN_IF -j REJECT --reject-with tcp-reset
#iptables -I FORWARD -i br0 -s 192.168.1.13 -p udp -o $WAN_IF -j REJECT --reject-with udp-reset

#iptables -I FORWARD -i br0 -s 192.168.1.13 -o `nvram get wan_iface` -j DROP

How to do it in Asus WRT?
 
I have enabled open vpn client with Policy Rules in Redirect Internet Traffic. When VPN is down, I want to stop internet connection to this host at all. Something like:

iptables -I FORWARD -i br0 -s 192.168.1.13 -o `nvram get wan_iface` -j DROP

If the GUI option isn't appropriate

upload_2018-3-26_10-21-36.png


then unless you are using a PPoE WAN interface, change

Code:
iptables -I FORWARD -i br0 -s 192.168.1.13 -o `nvram get wan_iface` -j DROP
to
Code:
iptables -I FORWARD -i br0 -s 192.168.1.13 -o $(nvram get wan0_ifname) -j DROP
 
Last edited:

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top