یا می توان با استفاده از dnat کل ترافیک را به شبکه لوکال ( یا یک سیستم ) منتقل کرد و یا می توان تنها پورتی خاص با محدودیت های فراوان را به شبکه لوکال انتقال داد. این موارد بستگی به سناریو های مختلف دارد. به عنوان مثال :
iptables -t nat -A PREROUTING -d 192.168.230.129 -j DNAT --to-destination 10.10.10.5 192.168.230.129 : access to internet 10.10.10.5 : local ip address (for other local system)
or
iptables -t nat -A PREROUTING -i ens33 -j DNAT --to-destination 10.10.10.5 ens22 : access to internet 10.10.10.5 : local ip address (for other local system)
مثالی بهتر و دقیقتر :
iptables -t nat -A PREROUTING -p tcp -d 192.168.230.129 --dport 80 -j DNAT --to-destination 10.10.10.5
مثالی بهتر و دقیقتر :
iptables -t nat -A PREROUTING -i ens33 -p tcp --dport 2200 -j DNAT --to-destination 10.10.10.5:22
note : –to-destination ipaddr[-ipaddr][:port-port]