Click to See Complete Forum and Search --> : can linux router/fw forward IP requests to my Sun box?
njcajun
02-26-2001, 09:58 PM
Topic pretty much says it all. I have a publicly routable, static IP on my linux gateway/router/firewall. I'm using ipchains. I'm running redhat 6.2 on that box. When requests come in from the 'net for ftp to my public IP, I want the linux box to forward it to my Sun box, which is on the internal network. Can I do this? If so, can you tell me kinda how to do it, or point me to some docs on it?
Thanks a bajillion. :confused:
triplehex
02-27-2001, 02:25 PM
I believe you would do something with ipchains as such:
/sbin/ipchains -A input -j ACCEPT -p tcp -d ipaddressofsunbox www
That example forwards it to the webserver when it comes in on your machine.
Actually, I'm wrong, let me test something out here...brb
[ 27 February 2001: Message edited by: triplehex ]
ndelo
02-27-2001, 04:55 PM
Do you have NAT (masquerading) enabled? If so try:
ipmasqadm portfw -a -P tcp -L $EXT_IPADD 21 -R $FTP_SERVER 21
where EXT_IPADD is your live IP and FTP_SERVER is your ftp server.
Make sure that you execute echo "1" >/proc/sys/net/ipv4/ip_always_fragment
and that you load the necessary module-- ip_masq_ftp.o
Remote users should now be able to ftp to the sun machine by specifying the firewall's ip address.
I'm doing this now for our web/mail server and it works like a charm.
[ 28 February 2001: Message edited by: ndelo ]