LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   how to enable port forwarding (https://www.linuxquestions.org/questions/linux-networking-3/how-to-enable-port-forwarding-327192/)

linetnew 05-26-2005 01:55 AM

how to enable port forwarding
 
hello,
I have got another problem.
I have 2 pcs in LAN one is windows 2000 professional and other is RH9. There is one isolated linux box say hosta that is connectd to that linux PC say HostB and eindoes pc has name hostc.
Hostb and Hostc are connected to other pcs in LAN thr' switch. Hostb has enabled as router that makes hosta to access other network pcs in that LAN through hostb.
when i type ftp://hostb in Internet Explorer on hostc i want to get ftp files from hosta but currently i am getting hostb file. how to resolve this. Does that need to enable port forwarding. how to do that?

niknah 05-26-2005 04:20 AM

You'd have to enable ip forwarding and setup some firewall bit..

echo 1 >/proc/sys/net/ipv4/ip_forward
/sbin/iptables -t nat -A POSTROUTING -j SNAT --protocol tcp --to-source BBB -s AAA --destination-port 21


where BBB is the ip address of hostb on hosta's network.
and AAA is the network of hostc's network.

...then when you type in ftp://hosta on the hostc computer it'll go to hosta.


If you want the ftp to go to hosta when you type ftp://hostb
you may want to try some other program like "redir".


All times are GMT -5. The time now is 12:52 AM.