Rerouting

How do I configure a firewall/proxy with ipchains, to access a internal web server? I have set up an alias for the web server at eth2:1 on an external ip. Though, it has an internal ip of 192.168... - Help!

I run RedHat 6.0 if that makes any difference.
LVL 2
obgAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
stardrakeConnect With a Mentor Commented:
Which kernel are you using?  if you are using 2.2.x, then you should use the following:

ipchains -P forward DENY
ipchains -A forward -s intnet/inmask -d 0.0.0.0/0 -j MASQ
ipchains -A forward -s 0.0.0.0/0 -d pub_addr 80 -j MASQ
ipmasqadm portfw -a -P tcp -L pub_addr 80 -R int_addr 80

where intnet is the internal network number (ie.192.168.0.0)
and inmask is the internal network mask (ie.255.255.0.0) and
pub_addr is the address that someone would use on the internet to get to you and int_addr is the internal IP address of the box running the Web Server.

  Hope this helps...

   --- Joel
0
 
ralpCommented:
What you want is the IPPORTFW.
Check out the IP Masq HOWTO especially the Port Forwarding for 2.2 section... This URL takes you directly to it...

http://members.home.net/ipmasq/ipmasq-HOWTO-1.79-6.html#ss6.8

You also might want to check out the Linux Router Project. A complete Firewall solution that fits on a single floppy.

http://www.linuxrouter.org
0
All Courses

From novice to tech pro — start learning today.