What you are looking for is IP Maquerading (also known as Network
Address Translation (NAT)). If you setup your DNS properly, then the
requests to the local http server will stay local, and if not, then they
will go outside (using IP Maquerading).
It is built into the default 6.1 kernel, but you have to enable it.
I use the following in /etc/rc.d/rc.local to enable it on my system. YMMV
# IP Masquerading
# turn on ip forwarding
echo "1" > /proc/sys/net/ipv4/ip_forward
# load special modules if needed
/sbin/modprobe ipip.o
/sbin/modprobe ip_masq_ftp.o
/sbin/modprobe ip_masq_raudio.o
#/sbin/modprobe ip_irc.o
#/sbin/modprobe ip_masq_pptp.o
# sets timeouts to decent values
# This sets the timeout for an open but inactive tcp connection to
# 2 hours, a "properly" closed tcp connection to 2 minutes and an
# open/inactive udp connection to 2 hours
ipchains -M -S 7200 120 7200
# setup forwarding rules
/sbin/ipchains -P forward DENY
/sbin/ipchains -A forward -j MASQ -s 192.168.1.0/24 -d 0.0.0.0/0
This assumes a 192.168.1.x subnet with your routes setup properly on the
linux box to access the net.
check out the /usr/doc/HOWTO/IPCHAINS-HOWTO and
/usr/doc/HOWTO/mini/IP-Masquerade for details
hth
charles
On Sat, 11 Mar 2000, UK Jaiswal wrote:
> I have a small LAN of about 10 PCs at my friend's place in which one of the
> PC has RedHat6.1 installed and is acting as a local intranet webserver. I
> have configured some local domains in Apache for local use and it listens to
> port 80. Now I wish to make this server as a gateway to internet for whole
> of the LAN so that when
> any user on any computer types a URL of local domains, he gets it from our
> webserver and if the URL doesnot belong to the local domain, the request is
> passed to internet. The server will be using a dialup connection from a
> local ISP.
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.