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

Re: simply port forwarding question, need help asap.

On Tue, Oct 14, 2003 at 12:46:45AM +0200, Neill Roelofse wrote:

> Im currently running debian with masq enabled and also got the
> ip_nat_ftp module loaded (just in case).
> I got a simple question, I got ftpserver running on a seperate box
> with ip address:: and I would like to route all data from
> my debian box which is the dialup box with ip adress::
> to my ftp box::

example :
iptables -A PREROUTING -t nat -p tcp -d $EXT-IP --dport 21 -j DNAT --to
iptables -A FORWARD -p tcp -d --dport 21 -j ACCEPT
iptables -A POSTROUTING -t nat -p tcp -s -d --dport 21 -j SNAT --to

where $EXT-IP is your worldwide-known ip-address

Reply to: