Created
April 20, 2012 14:50
-
-
Save ratazzi/2429249 to your computer and use it in GitHub Desktop.
iptables-rules.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# forward openvpn http to local 7777 port, squid cache | |
iptables -t nat -A PREROUTING -s 10.8.0.0/24 -i tun0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 7777 | |
# VPN NAT | |
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE | |
# or | |
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source 173.230.148.194 | |
# block ip 200.164.230.186 | |
iptables -A INPUT -s 200.164.230.186/32 -j DROP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment