iptables config example

# Generated by iptables-save v1.3.5 on Thu Apr 10 20:09:49 2008
*filter
:INPUT ACCEPT [284757:218570741]
:FORWARD ACCEPT [39841:24366908]
:OUTPUT ACCEPT [295372:221619506]
-A INPUT -s ! 192.168.0.0/255.255.255.0 -p tcp -m tcp --dport 3128 -j DROP
-A INPUT -i lo -j ACCEPT
-A FORWARD -i eth2 -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
COMMIT
# Completed on Thu Apr 10 20:09:49 2008
# Generated by iptables-save v1.3.5 on Thu Apr 10 20:09:49 2008
*nat
:PREROUTING ACCEPT [3356:298279]
:POSTROUTING ACCEPT [5:3398]
:OUTPUT ACCEPT [6455:393108]
-A PREROUTING -i eth1 -p tcp -m tcp --dport 22 -j REDIRECT --to-ports 3128
-A PREROUTING -i eth1 -p udp -m udp --dport 22 -j REDIRECT --to-ports 3128
-A PREROUTING -i eth2 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
-A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j DROP
-A PREROUTING -d 209.85.201.189 -i eth2 -p tcp -m tcp --dport 443 -j DROP
-A POSTROUTING -o eth1 -j MASQUERADE
COMMIT
# Completed on Thu Apr 10 20:09:49 2008
# Generated by webmin
*mangle
:FORWARD ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT
# Completed


--

No comments:

Other Articles

Enter your email address: