Connection Sharing

Discuss Networking
Post Reply
Lord C
Joined:Wed Apr 30, 2003 9:20 am
Location:London, UK
Connection Sharing

Post by Lord C » Thu May 01, 2003 5:43 pm

Here's my guide to sharing an internet connection.
This guide presumes ...
Host = Linux
Client = Windoze
eth0 = Internet Connection
eth1 = LAN

echo "1" > /proc/sys/net/ipv4/ip_forward
service shorewall stop && chkconfig --del shorewall

cd ~/ipkungfu

pico /etc/ipkungfu/custom.conf
On the line $IPTABLES -A OUTPUT -p udp --dport 2002 -j $LOG_CMD "SLAPPER! rm -f /tmp/*bugtraq*" remove the -j (shown in bold.

pico /etc/ipkungfu/ipkungfu.conf
make sure you have defined the correct ethernet devices
Also, set Masquerading and IP_forwarding to 1

run 'ipkungfu'
and check 'iptables -L' to verify.

Now point your DNS on the windows machine to the results you get in
grep nameserver /etc/resolv.conf

and your gateway to your internal IP
ifconfig eth1

(Dont forget to make your Windoze internal IP within the 'LOCAL_NET' range)

Restart your Windoze machine (ROFL)
And your network should be working :D
Last edited by Lord C on Thu May 01, 2003 5:49 pm, edited 2 times in total.

Lord C
Joined:Wed Apr 30, 2003 9:20 am
Location:London, UK

Post by Lord C » Thu May 01, 2003 5:44 pm

PS: This was intended for Mandrake, you do not need to disable Shorewall if you are not running mandrake.

Joined:Sun Feb 09, 2003 1:08 pm
Location:Midrand Gauteng, South Africa

Post by caveman » Sun May 18, 2003 5:35 am

Must say TX to BaDDaSS :D
Been putting the sharing off for some time now.

Except having to change a few things eg.
eth0 is the local LAN and ppp0 as the Internet connection,
everything is working like a charm :o

The 2 other Linux boxes and the wifes' w2k machine all
connected without a problem.

Only 1 question.
I connect using 3 different ISP's depending on my needs at the time.
So everytime the resolv.conf have different entries.
Q. Can I add the 3 diferent DNS entries, and will they be resolved as needed
on the other machines?
I've tried - but unless I set the primary DNS correctly - it doesn't work.
I really don't feel like setting the DNS on the other machines everytime I connect
using a different ISP. :?
Must be missing something :oops:

Tx in advance

User avatar
Void Main
Site Admin
Site Admin
Joined:Wed Jan 08, 2003 5:24 am
Location:Tuxville, USA

Post by Void Main » Sun May 18, 2003 7:21 am

I would run my own DNS server if I were you and point your clients to it. Just install the "bind" package if it isn't installed and fire up named. Then point all your clients to your local DNS server.

Post Reply