I'm pretty new to iptables, and I have a rule which seems to me like it
should work.  But it doesn't.  Unfortunately, I haven't been able to
come up with a good reason for why it wouldn't work.  Here's the rule:

iptables -t nat -A PREROUTING -i $INTETH -p tcp -d $EXTIP --dport 22 -j
DNAT --to-destination $SSHHOST

The idea is that if I'm on the inside network and I ssh to the external
address of the firewall, I'd like to actually ssh to $SSHHOST, which is
on the internal network.  I have a corresponding (and working!) rule
which does the same thing for hosts connecting from the outside network.
It looks like this:

iptables -t nat -A PREROUTING -i $EXTETH -p tcp -d $EXTIP --dport 22 -j
DNAT --to-destination \$SSHHOST

I'm sure I'm missing something simple.  Any ideas?

-- 
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55  8012 AB4D 6098 8826 6868

Attachment: pgpQjoj4yQrHX.pgp
Description: PGP signature

--------------------
BYU Unix Users Group 
http://uug.byu.edu/ 

The opinions expressed in this message are the responsibility of their
author.  They are not endorsed by BYU, the BYU CS Department or BYU-UUG. 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to