Port forwarding Web port (80)

Port forwarding Web port (80)

Post by Paul Toshac » Tue, 19 Dec 2000 03:10:59



Does anyone have an example of portforwarding port 80 to an internal
server using ipmasqadm that is currently working?  All of the examples
out there so far have been out-dated or not working.

I am using RH 6.2, ipmasqadm 0.4.2-3 and ipchains 1.3.9-5

Thanks.
Paul

  paul.vcf
< 1K Download
 
 
 

Port forwarding Web port (80)

Post by fred smit » Fri, 29 Dec 2000 13:08:04


to forward port 80 to an internal machine ie 192.168.0.1 for example

step 1 allow tcp port 80 on external address of forewall

ipchains -A input -i eth1 -p tcp -s 0.0.0.0 --dport 80 -j ACCEPT

step 2 forward the port
ipmasqadm -a -P tcp -Lx.x.x.x 80 -R 192.168.0.1 80

replacing x.x.x.x with address of external interface

note if ussing ssl do same with port 443

Quote:> Does anyone have an example of portforwarding port 80 to an internal
> server using ipmasqadm that is currently working?  All of the examples
> out there so far have been out-dated or not working.

> I am using RH 6.2, ipmasqadm 0.4.2-3 and ipchains 1.3.9-5

> Thanks.
> Paul


 
 
 

Port forwarding Web port (80)

Post by Leon Bourass » Tue, 02 Jan 2001 07:40:24


There is one secret that isn't shown on most howtos or instructional pages
but I did find it.

If you are using rfc1918 addresses (i.e. 192.168.x.x) you must masqerade the
replies.
Use:

modprobe ip_masq_portfw.o
ipchains -P forward DENY

#Masquerade the from eth1 so that replies can get back to the requestor
ipchains -A forward -i eth1 -j MASQ
echo 1 > /proc/sys/net/ipv4/ip_forward
ipmasqadm portfw -a -P tcp -L x.x.x.x 80 -R 192.168.0.1 80

Let me know if this helps.

Leon Bourassa
Network Admin


> to forward port 80 to an internal machine ie 192.168.0.1 for example

> step 1 allow tcp port 80 on external address of forewall

> ipchains -A input -i eth1 -p tcp -s 0.0.0.0 --dport 80 -j ACCEPT

> step 2 forward the port
> ipmasqadm -a -P tcp -Lx.x.x.x 80 -R 192.168.0.1 80

> replacing x.x.x.x with address of external interface

> note if ussing ssl do same with port 443


> > Does anyone have an example of portforwarding port 80 to an internal
> > server using ipmasqadm that is currently working?  All of the examples
> > out there so far have been out-dated or not working.

> > I am using RH 6.2, ipmasqadm 0.4.2-3 and ipchains 1.3.9-5

> > Thanks.
> > Paul