#title Iptables: DMZ, NAT; Portforwarding #author Stefan Hornburg (Racke) #topics blog #date 2008-03-16 #pubdate 2008-03-16T16:07:10+01:00 #lang en Portforwarding of a public IP to DMZ and allow access from WAN to it. iptables -t nat -A PREROUTING -p tcp -d $out_ip --dport $port -j DNAT --to-destination $dmz_ip iptables -A dmz -m state --state NEW -o $IF_DMZ -p tcp --dport $port --dst $dmz_ip -j ACCEPT