Internet sharing between Debian and Windows 98 (SE)
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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
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.
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 .
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
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.
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.
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.
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?)...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.