Am Di, den 30.03.2004 schrieb Andrius um 21:45:
Hello,
How is it possible to share internet connection (like in Windows
connection sharing)? I have two networks cards in one computer and one
in another. Two computers connected through this networks cards.
Besides, it would be grate, if internet will work in Windows. Thank you
for help in advance...
Andrius
Please do not hijack foreign threads. For posting new topic mail to the
list use a new and empty mail editor window and do not press reply with
a different unrelated list mail. Else your mail contains references to
different list mail and this way mix up threads.
To your question: choose one of the PCs as the router, the on connected
to the net. On this one you have to enable IP forwarding, see
/etc/sysctl.conf. You too have to enable NAT/masquerading by creating an
iptables rule like
iptables -A POSTROUTING -o ppp0 -j MASQUERADE
where here ppp0 is the outgoing internet device. Obviously the router PC
itself has to be able to connect the internet. On the other PC which
uses the router PC you have to set the router IP as gateway and set the
DNS servers of your ISP in /etc/resolv.conf.
Alexander
--
Alexander Dalloz | Enger, Germany | GPG key 1024D/ED695653 1999-07-13
Fedora GNU/Linux Core 1 (Yarrow) on Athlon CPU kernel 2.4.22-1.2174.nptl
Sirendipity 21:53:31 up 11 days, 5:35, load average: 1.69, 1.46, 1.27
[ Γνωθι σ'αυτον - gnothi seauton ]
my life is a planetarium - and you are the stars