Re: modem internet sharing
From: Dolphin (usenet-Sep+lr_at_2003.dolphinwave.org)
Date: 09/28/03
- Next message: Caspar: "two soundcards"
- Previous message: Howard: "Webmin gives MLM promo!"
- In reply to: Rae Rosetta: "modem internet sharing"
- Next in thread: Rae Rosetta: "Re: modem internet sharing"
- Reply: Rae Rosetta: "Re: modem internet sharing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Sep 2003 11:20:11 GMT
#begin johhnybravo@in.com.au.exe (or was it Rae Rosetta.com)
message <a6rdb.1663$U74.94879@news.optus.net.au> reply:
> I have two linux PCs running Red Hat 9 both connect to each other via a hub
> and one
> PC connects to the internet via an external modem.
>
> I set up my PC and modem with Kppp to access the net which does so
> fine but now how do I set up the other PC to access the net sharing the
> other PC's modem.
It's quite simply. All you need is to activate the masquerading on the PC
which is connected to the Internet, and point any other PCs' gateway to
that one.
> The modem PC's settings are:
>
> IP : 192.168.0.1
> SUB : 255.255.255.0
> Should I set the gateway settings to point to itself (ie 192.168.0.1) for
> leave this feild blank?
Leave it blank, it's directly connected to the Internet - no need for
it to be gatewayed through itself.
> The other PC settings are
>
> IP : 192.168.0.12
> SUB : 255.255.255.0
> GATE: 192.168.0.1
Just what you need.
> Both PC's have DNS servers running, do I need these running?
You might want to have it running on the connected to the Internet PC,
and use it as a caching DNS, which will increase the speed of accessing
recently visited sites. You definitely don't need it to be running on
every PC. Just add 192.168.0.1 to the list of nameservers used on your
PCs, and keep the DNS running on your 192.168.0.1 machine.
Now, when your PCs are set, su - on the Internet-connected computer, and
do these commands (I assume you run iptables and that service is up):
modprobe iptable_nat
iptables -t nat -A POSTROUTING -o ppp+ -j MASQUERADE
echo "1" > /proc/sys/net/ipv4/ip_forward
Now, go to the another PC and watch it being able to access Internet. :)
You can add the commands above to your /etc/rc.local on the 192.168.0.1
PC and they will be executed automatically on every boot.
Keep in mind, that your PCs that will be connected to the internet through
the 192.168.0.1 one, are behind the NAT and can't be directly accessed
from the Internet, without you starting the connection (for example, it is
important for IRC DCC connections coming to you from other people).
> Is there a link that explains how to do this in newbie speak?
There is a "Linux IP Masquerade HOWTO" doc on "The Linux Documentation
Project" (http://en.tldp.org/HOWTO/IP-Masquerade-HOWTO/index.html), if
you want to dive deeper. But it is definitely not an easy reading for a
newbie.
> Thanking all
You are welcome.
Dolphin.
-- URL: http://www.DolphinWave.org Mail: on the web page (no spam) ICQ: 6615461
- Next message: Caspar: "two soundcards"
- Previous message: Howard: "Webmin gives MLM promo!"
- In reply to: Rae Rosetta: "modem internet sharing"
- Next in thread: Rae Rosetta: "Re: modem internet sharing"
- Reply: Rae Rosetta: "Re: modem internet sharing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|