[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: iptables port fowarding?



* Rick Pasotto (rick@niof.net) [020216 21:40]:
> How do I port forward with iptables? With ipchains the command was:
> 
> ipmasqadm portfw -a -P tcp -L $extip $port -R $intip $port

Try this:

iptables -t nat -A PREROUTING -p tcp -d $extip --dport $port \
  -j DNAT --to-destination $intip

Check out the iptables manpage for more help. (try searching for DNAT).

good times,
Vineet

-- 
Currently seeking opportunities in the SF Bay Area
Please see http://www.doorstop.net/resume/
-- 
Satan laughs when we kill each other. Peace is the only way.

Attachment: pgpw2hNn_8ttM.pgp
Description: PGP signature


Reply to: