LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-29-2003, 07:31 PM   #1
GhostOfYoda
Member
 
Registered: Jul 2003
Location: Manchester, UK
Distribution: Debian
Posts: 31

Rep: Reputation: 15
Internet sharing between Debian and Windows 98 (SE)


Whilst I have finally installed Linux on my machine, and I use it all the time for all the stuff I do, whenever my dad wishes to use the internet, I have to switch to windows ME, as it has NAT internet sharing technology.

My PC, is connected to the internet, and my dad's (running 98se) connects to the internet through mine. I have a broadband connection, that is on all the time.

How can I set it up so that my Debian computer "shares" its internet connection with my dad's Windows 98 one?
 
Old 07-30-2003, 01:11 AM   #2
bla
LQ Newbie
 
Registered: Jul 2003
Location: Poland
Distribution: Debian
Posts: 23

Rep: Reputation: 15
Its easy.
You must have this command typed: (typed in to `boot-scripts'):
iptables -t nat -A POSTROUTING -s 192.168.0.0/255.255.255.0 -j MASQUERADE

It will masquarade connections from 192.168.0.0/255.255.255.0; Then You must have second interface. If you got second ethernet card then configure it.
IF You have only one card then create an alias: ifconfig eth0:0 192.168.0.1 up;
Second card should have ip number: 192.168.0.1;
Then You should change one thing more: /etc/network/options -> change ip_forward to `yes'.

To add alias for ever: write to /etc/network/interfaces:
auto eth0:0
iface eth0:0 inet static
address 192.168.0.1
netmask 255.255.255.0

Everything should work. (If You do not want to restart type echo 1 > /proc/sys/net/ipv4/ip_forward it will set ip_forward to yes.).
bla
 
Old 07-30-2003, 06:47 AM   #3
GhostOfYoda
Member
 
Registered: Jul 2003
Location: Manchester, UK
Distribution: Debian
Posts: 31

Original Poster
Rep: Reputation: 15
Yes; I do have two network cards, and whilst "eth1" (the one that I use to connect to the internet with) was pretty self explanitory to set up, I'm not sure about "eth0", (the one connected to the hub of my LAN).

Also, does anyone know how I would set up my windows computer to use my linux one to get the internet?

Also, where is "boot-scripts"?

Last edited by GhostOfYoda; 07-30-2003 at 08:15 AM.
 
Old 07-30-2003, 11:17 AM   #4
dARkHunTEr
Member
 
Registered: Jul 2003
Location: The Netherlands
Distribution: Gentoo Linux
Posts: 213

Rep: Reputation: 30
I'd say: get a router. You can get one for around $50, they have a built in switch (intelligent hub) and a firewall. The best thing is: you dont need to set up all operating systems; the router just passes dhcp info and your internet connection works .
 
Old 07-30-2003, 12:06 PM   #5
bla
LQ Newbie
 
Registered: Jul 2003
Location: Poland
Distribution: Debian
Posts: 23

Rep: Reputation: 15
DHCP can be done. `boot-scripts' are in /etc/rc*; I have my masquarade in /etc/rc.boot/rc.iptables which is linked: ln -s /etc/rc.boot/rc.iptables /etc/rc2.d/S99iptables

It is executed at start (first line of file: #!/bin/bash; and chmod u+x /etc/rc.boot/rc.iptables).; Your windows computer must have ip from 192.168.0.2 to 255; And gateway set to 192.168.0.1 this is all.; If You have two cards it may be useful to specify `input interface and output interface' see manual. (;
bla
 
Old 07-30-2003, 01:07 PM   #6
GhostOfYoda
Member
 
Registered: Jul 2003
Location: Manchester, UK
Distribution: Debian
Posts: 31

Original Poster
Rep: Reputation: 15
Hmmmm, when I type it into the Console, I get this:

Yoda:/etc# iptables -t nat -A POSTROUTING -s 192.168.0.0/255.255.255.0 -j MASQUERADE
Note: /etc/modules.conf is more recent than /lib/modules/2.2.20/modules.dep
modprobe: Can't locate module ip_tables
iptables v1.2.8: can't initialize iptables table `nat': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
 
Old 07-30-2003, 01:44 PM   #7
bla
LQ Newbie
 
Registered: Jul 2003
Location: Poland
Distribution: Debian
Posts: 23

Rep: Reputation: 15
Did You compile your kernel yourself? Type: depmod; then type modprobe ip_tables; if it won't help: compile needed modules to your kernel;
If You use 2.2 kernel use ipchains (i do not know command to type, it is similar and simple) or type apt-get install kernel-2.4.18<something> (i do not remember, check: apt-cache search kernel | grep 2.4.18) reboot and type then. Iprefer 2.4.x kernels; on servers and on workstations. Good Luck.
 
Old 07-30-2003, 01:48 PM   #8
bla
LQ Newbie
 
Registered: Jul 2003
Location: Poland
Distribution: Debian
Posts: 23

Rep: Reputation: 15
Ah and more: ipchains is used under 2.2.x kernels; iptables under 2.4.x (but ipchains is possible); iptables is `statuf-inspection or something' and it is just better than ipchains... Do it your way.
 
Old 07-30-2003, 04:01 PM   #9
GhostOfYoda
Member
 
Registered: Jul 2003
Location: Manchester, UK
Distribution: Debian
Posts: 31

Original Poster
Rep: Reputation: 15
If I upgrade to 2.4, will there be stability problems?
 
Old 07-30-2003, 04:02 PM   #10
dARkHunTEr
Member
 
Registered: Jul 2003
Location: The Netherlands
Distribution: Gentoo Linux
Posts: 213

Rep: Reputation: 30
get 2.6
 
Old 07-30-2003, 04:24 PM   #11
bla
LQ Newbie
 
Registered: Jul 2003
Location: Poland
Distribution: Debian
Posts: 23

Rep: Reputation: 15
I'm on 2.4 for REALLY long time and i've got no problems; All my systems are on 2.4 because of f.ex. journaling and there are no problems; 2.6 and 2.5 do not use; They are testing... there might be stability issue(huh, am i clear?)...

bla
 
Old 07-30-2003, 04:49 PM   #12
dARkHunTEr
Member
 
Registered: Jul 2003
Location: The Netherlands
Distribution: Gentoo Linux
Posts: 213

Rep: Reputation: 30
2.6 has a great networking speed .
 
Old 08-01-2003, 11:19 AM   #13
GhostOfYoda
Member
 
Registered: Jul 2003
Location: Manchester, UK
Distribution: Debian
Posts: 31

Original Poster
Rep: Reputation: 15
Sorry to wake up this oldish thread, but I have made some progress, but I am dearly confused by this instruction.

Quote:
If you got second ethernet card then configure it.
I was wondering, how do I configure a card for my LAN? I take it I have to add something to /etc/network/interfaces but I am not completely sure.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sharing internet from Debian to WinXP? Paiway Linux - Networking 3 05-02-2008 02:38 PM
internet sharing with debian. Help please. gonus Debian 6 09-24-2004 06:40 PM
Debian and Windows Internet Connection Sharing ellakano Linux - Networking 1 11-26-2003 05:52 AM
XP, Debian, & Internet Sharing GameboyHippo Linux - Networking 0 10-01-2003 11:34 PM
Debian internet connection sharing SlashDebian Linux - Networking 3 09-07-2003 02:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration