FTP Redirect IP:Port
Hello Folks,
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?
Thanks
JP.
Quoted 7 lines · John Paul
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.
Signature · 2 lines
http://www.netexit.com/~sid/ PGP KeyID: 157E98EE FingerPrint: FA62226DA9E72FA8AECAA240008B480E157E98EE
Quoted 2 lines
Quoted 2 lines
Hi! I'm your friendly neighbourhood signature virus. Copy me to your signature file and help me spread!
Re: FTP Redirect IP:Port (solved)
YES, It worked! :-)
it was typo error indeed! zzzzzzzzzz....
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" <[email protected]>
To: "John Paul" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, January 08, 2004 4:05 PM
Subject: Re: FTP Redirect IP:Port
Quoted 7 lines · John Paul
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
Quoted 2 lines
Quoted 2 lines
Hi! I'm your friendly neighbourhood signature virus. Copy me to your signature file and help me spread!
Re: FTP Redirect IP:Port (solved)
In reply to Cedric BlancherYES!. 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" <[email protected]>
To: "John Paul" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, January 08, 2004 4:05 PM
Subject: Re: FTP Redirect IP:Port
Quoted 7 lines · John Paul
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
Quoted 2 lines
Quoted 2 lines
Hi! I'm your friendly neighbourhood signature virus. Copy me to your signature file and help me spread!