Tom Vier wrote:
/sbin/iptables -t nat -A PREROUTING -p tcp --dport 22 -j DNAT --to-destination $INT_IP /sbin/iptables -t nat -A PREROUTING -p tcp --dport 2222 -j DNAT --to-destination $INT_IP /sbin/iptables -t nat -A POSTROUTING -p tcp --dport 22 -d $INT_IP -j SNAT --to-source $EXT_IP /sbin/iptables -t nat -A POSTROUTING -p tcp --dport 2222 -d $INT_IP -j SNAT --to-source $EXT_IPi've tried several times, using multiple different rules i've found fromdifferent sites, and i still can't get port forwarding working. does anyone have working rules they could send me? i'm trying to forward packets from myisp to port 2222 to an internal ip (i use nat) and port 22.
define $INT_IP - internal ip to forward to, and define $EXT_IP - external ip on your outbound interface. Regards, Clement