Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #
- # iptables example
- #
- # Protect your real IP from leaking in the case of a VPN drop
- #
- # [This is for Linux client only (not server)]
- #
- # Flush all current rules from iptables
- #
- iptables -F
- iptables -t nat -F
- iptables -t mangle -F
- # Always accept local-host traffic
- #
- iptables -A INPUT -i lo -j ACCEPT
- # Enable existing connections
- #
- iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
- #All other traffic is dropped unless its 'to' or 'from' the VPN server
- #
- iptables -A INPUT -s <SERVER-ADDRESS> -j ACCEPT
- iptables -A INPUT -j DROP
- iptables -A OUTPUT -d <SERVER-ADDRESS> -j ACCEPT
- iptables -A OUTPUT -j DROP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement