Hi jesse,

to be able to use --dport, you need to specify the
protocol (-p <protocol>). for this u need two rules

Use this:

iptables -t nat -A PREROUTING -i $INET_FACE -p tcp
--dport 22 -j DNAT --to 192.168.0.35:22
iptables -t nat -A PREROUTING -i $INET_FACE -p udp
--dport 22 -j DNAT --to 192.168.0.35:22


hth,

allan


--- "Jesse.linux" <[EMAIL PROTECTED]> wrote:
> hi all pluggers,
> 
> can anyone tell me why am i getting this error
> 
> "bad argument 22"
> 
> when i start iptables with this rule?
> 
> "iptables -t nat -A PREROUTING -i $INET_FACE -dport
> 22 -j
> DNAT --to-destination 192.168.0.35:22"
> 
> i just want incoming ssh NATed to 192.168.0.35...


__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to