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:: 192.168.0.1 and I would like to route all data from
> my debian box which is the dialup box with ip adress:: 192.168.0.10
> to my ftp box::192.168.0.10
example :
iptables -A PREROUTING -t nat -p tcp -d $EXT-IP --dport 21 -j DNAT --to 192.168.0.10:21
iptables -A FORWARD -p tcp -d 192.168.0.10 --dport 21 -j ACCEPT
iptables -A POSTROUTING -t nat -p tcp -s 192.168.0.0/24 -d 192.168.0.10 --dport 21 -j SNAT --to 192.168.0.10
where $EXT-IP is your worldwide-known ip-address
Reply to: