#!/bin/sh # Do source NAT, from the outside world to the inside. iptables -t nat -A PREROUTING -d $1 -p $3 --dport $4 -j DNAT --to $2