#!/bin/sh nic # # setup port/protocol forward to east nic # iptables -t nat -I PREROUTING -p udp -d 192.1.3.254 --dport 500 -j DNAT --to-destination 192.1.2.23 nic # iptables -t nat -I PREROUTING -p esp -d 192.1.3.254 -j DNAT --to-destination 192.1.2.23 nic # # Display the table, so we know it is correct. nic # iptables -t nat -L Chain PREROUTING (policy ACCEPT) target prot opt source destination DNAT esp -- anywhere nic to:192.1.2.23 DNAT udp -- anywhere nic udp dpt:isakmp to:192.1.2.23 Chain INPUT (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination Chain POSTROUTING (policy ACCEPT) target prot opt source destination nic # echo "initdone" initdone