So I have spent the last 2-3 days researching everything I can on getting a VPN killswitch working on centos7. I have read almost all the threads in this category and tried everything I could but nothing seems to work. I can connect with openvpn just fine and get that working, but whenever the vpn connection dies, everything just starts running over the eth0 interface and my data is exposed. Anytime I restrict eth0 interface the tun0 connection also seems to get restricted. Below is what I started working on, but as soon as I run this, I can no long ping or curl anything. Does PIA have any support for a centos killswitch? I tried using the directions here (https://www.privateinternetaccess.com/forum/discussion/22605/vpn-killswitch) but the iptables command is invalid and doesn't work.
#flush existing rules
#set default to drop
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP
iptables -A INPUT -i eth0 -p tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -o eth0 -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT