/* HINT: Search archives @ http://www.indyramp.com/masq/ before posting! 
/* ALSO: Don't quote this header. It makes you look lame :-) */


Dan Egli [mailto:[EMAIL PROTECTED]] wrote:
> specific port on the public IP it is
> sent to that same port on a machine behind the 
> firewall/masquerading box.
> 
> i.e. 1.2.3.4 port 3050 -> 192.168.0.7 port 3050
> 
> I've looked all over and cannot find how to do it using 
> IPTables. 

for tcp:
iptables -t nat -I PREROUTING -p tcp -d $EXTERNAL_IP --dport $EXTERNAL_PORT
\
         -j DNAT --to-destination "$INTERNAL_IP:$INTERNAL_PORT"
for udp:
iptables -t nat -I PREROUTING -p udp -d $EXTERNAL_IP --dport $EXTERNAL_PORT
\
         -j DNAT --to-destination "$INTERNAL_IP:$INTERNAL_PORT"

Hope these help.  I am beginning work on a more definitive iptables howto
that will cover this and more.

Jamin W. Collins

_______________________________________________
Masq maillist  -  [EMAIL PROTECTED]
Admin requests can be handled at http://www.indyramp.com/masq-list/ -- 
THIS INCLUDES UNSUBSCRIBING!
or email to [EMAIL PROTECTED]

PLEASE read the HOWTO and search the archives before posting.
You can start your search at http://www.indyramp.com/masq/
Please keep general linux/unix/pc/internet questions off the list.

Reply via email to