Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. VPN_SERVER_IP=X.X.X.X
  4.  
  5. iptables --flush
  6. iptables --delete-chain
  7. iptables --zero
  8.  
  9. iptables --policy INPUT DROP
  10. iptables --policy FORWARD DROP
  11. iptables --policy OUTPUT DROP
  12.  
  13. iptables --append INPUT --match state --state ESTABLISHED,RELATED --jump ACCEPT
  14. iptables --append INPUT --in-interface lo --jump ACCEPT
  15.  
  16. iptables --append OUTPUT --out-interface eth0 --destination "$VPN_SERVER_IP" --jump ACCEPT
  17. iptables --append OUTPUT --out-interface tun0 --jump ACCEPT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement