0

I followed the DD-WRT: VPN OpenVPN Setup to configure the VPN connection on my router. Apparently i use privateinternetaccess as a VPN provider and OpenVPN. It works fine, but there is no VPN kill switch! Is there any way to implement it?

  • What do you mean exactly by a "vpn kill switch" exactly? – Ramhound Sep 8 '14 at 11:35
  • To pause all up / download while i am not on the vpn – aegyed Sep 8 '14 at 15:30
1

You will need to ssh/telnet into the router and perform the following command:

 killall openvpn

If you need to restart the vpn, the command would be something like:

 openvpn --config <location of your client.conf>
1

Under Administration --> Commands copy-paste the following and press "Save Firewall".

# --- SEAMLESS TUNNEL ---
# http://www.dd-wrt.com/phpBB2/viewtopic.php?p=957052
if [ "$(nvram get wan_proto)" == "pppoe" ]; then
    WAN_IF="$(nvram get pppoe_ifname)"
elif [ "$(nvram get wan_proto)" == "pptp" ]; then
    WAN_IF="$(nvram get pptp_ifname)"
else
    WAN_IF="$(nvram get wan_ifname)"
fi

iptables -I FORWARD -o $WAN_IF -m state --state NEW -j REJECT --reject-with icmp-host-prohibited
iptables -I FORWARD -o $WAN_IF -p tcp -m state --state NEW -j REJECT --reject-with tcp-reset

Ref: http://www.dd-wrt.com/phpBB2/viewtopic.php?p=957052

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.