On Tue, 2004-03-30 at 09:43, Vikas Baligar wrote:
> Hi
> We have a server in our college which is connected to
> the Internet and the intranet. We wanted to forward
> all HTTP requests to this server to another machine on
> the intranet. Is there any way to do this ? 

Assuming you have a public IP 220.220.220.220 on the gateway machine
with the internal web server running on 192.168.1.220, this should be
run on the firewall machine -

/sbin/iptables -t nat -A PREROUTING -p TCP -d 220.220.220.220
--destination-port 80 -j DNAT --to-destination 192.168.1.220:80

If your default forward policy is to block packets, then you'd need to
allow a FORWARD - 

/sbin/iptables -A FORWARD -d 192.168.1.220 -j ACCEPT

Just to be anal about things, customize the FORWARD rule to allow only
port 80 connects. Also make sure that you SNAT out the internal web
server properly.

VaibhaV
http://vsharma.net




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to