Re: SSH and IPTABLES [message #33704 is a reply to message #33564] |
Sat, 01 November 2008 19:05 |
mcarreira
Messages: 30 Registered: February 2007
|
Member |
|
|
I think you may need a FORWARD rule.
These are the lines my firewall script has to forward ssh to my ssh server:
iptables -t nat -A PREROUTING -i $ifINTERNET -p tcp --sport $UNPORTS --dport $PORT_SSH_EXTERNAL -j DNAT --to-destination $sSSHSERVER:22
iptables -A FORWARD -i $ifINTERNET -o $ifVENET0 -p tcp --sport $UNPORTS -d $sSSHSERVER --dport ssh -m state --state NEW -j ACCEPT
|
|
|