IPTables D-NAT Firewall Rule

# Generated by iptables-save v1.3.5 on Tue Oct 28 23:57:58 2014
*filter
:INPUT ACCEPT [2590:547311]
:FORWARD ACCEPT [11426:731834]
:OUTPUT ACCEPT [3989:328501]
-A INPUT -i eth0 -j ACCEPT
COMMIT
# Completed on Tue Oct 28 23:57:58 2014
# Generated by iptables-save v1.3.5 on Tue Oct 28 23:57:58 2014
*mangle
:PREROUTING ACCEPT [24964:3178001]
:INPUT ACCEPT [9150:1450474]
:FORWARD ACCEPT [11426:731834]
:OUTPUT ACCEPT [4655:374193]
:POSTROUTING ACCEPT [15415:1060335]
COMMIT
# Completed on Tue Oct 28 23:57:58 2014
# Generated by iptables-save v1.3.5 on Tue Oct 28 23:57:58 2014
*nat
:PREROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A PREROUTING -m state -i eth0 --state RELATED,ESTABLISHED -j ACCEPT
-A PREROUTING -p tcp -m tcp -d 123.45.67.89 --dport 80 -j DNAT --to-destination 172.16.5.113
-A POSTROUTING -j MASQUERADE
COMMIT
# Completed on Tue Oct 28 23:57:58 2014
Share

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.