Re: FTP Redirect IP:Port (solved)

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

 



YES!. it was typo error indeed!

iptables -t nat -A PREROUTING -p tcp -d 202.x.x.x --dport 21 -j DNAT --to
192.168.0.10:21

Thanks.

----- Original Message -----
From: "Cedric Blancher" <blancher@xxxxxxxxxxxxxxxxxx>
To: "John Paul" <john@xxxxxxxxxxxxxxxxxxxx>
Cc: <netfilter@xxxxxxxxxxxxxxxxxxx>
Sent: Thursday, January 08, 2004 4:05 PM
Subject: Re: FTP Redirect IP:Port


Le jeu 08/01/2004 à 08:05, John Paul a écrit :
> I want to redirect FTP access from my BOX to other machine. How can i
> make this possible?
> external IP ---> 202.x.x.x port 21 (redirect) ---> 192.168.0.10 port21
> I have tried:
> iptables -A PREROUTING -p tcp -d 202.x.x.x --dport 21 -j DNAT --to
> 192.168.0.10:21
> this seems to be not working. what could it be?

There's a typo here : you did not specify you're working on nat table.

iptables -t nat -A PREROUTING -p tcp -d 202.x.x.x --dport 21 \
-j DNAT --to 192.168.0.10:21

Then you have to check IP forwarding is OK and FORWARD filtering rules
are letting this trafic go through. Finally, for FTP needs a helper, you
have to check that ip_nat_ftp module is loaded.

--
http://www.netexit.com/~sid/
PGP KeyID: 157E98EE FingerPrint: FA62226DA9E72FA8AECAA240008B480E157E98EE
>> Hi! I'm your friendly neighbourhood signature virus.
>> Copy me to your signature file and help me spread!





[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux