Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
07-29-2003, 07:31 PM
|
#1
|
|
Member
Registered: Jul 2003
Location: Manchester, UK
Distribution: Debian
Posts: 31
Rep:
|
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?
|
|
|
|
07-30-2003, 01:11 AM
|
#2
|
|
LQ Newbie
Registered: Jul 2003
Location: Poland
Distribution: Debian
Posts: 23
Rep:
|
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
|
|
|
|
07-30-2003, 06:47 AM
|
#3
|
|
Member
Registered: Jul 2003
Location: Manchester, UK
Distribution: Debian
Posts: 31
Original Poster
Rep:
|
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.
|
|
|
|
07-30-2003, 11:17 AM
|
#4
|
|
Member
Registered: Jul 2003
Location: The Netherlands
Distribution: Gentoo Linux
Posts: 213
Rep:
|
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  .
|
|
|
|
07-30-2003, 12:06 PM
|
#5
|
|
LQ Newbie
Registered: Jul 2003
Location: Poland
Distribution: Debian
Posts: 23
Rep:
|
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
|
|
|
|
07-30-2003, 01:07 PM
|
#6
|
|
Member
Registered: Jul 2003
Location: Manchester, UK
Distribution: Debian
Posts: 31
Original Poster
Rep:
|
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.
|
|
|
|
07-30-2003, 01:44 PM
|
#7
|
|
LQ Newbie
Registered: Jul 2003
Location: Poland
Distribution: Debian
Posts: 23
Rep:
|
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.
|
|
|
|
07-30-2003, 01:48 PM
|
#8
|
|
LQ Newbie
Registered: Jul 2003
Location: Poland
Distribution: Debian
Posts: 23
Rep:
|
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.
|
|
|
|
07-30-2003, 04:01 PM
|
#9
|
|
Member
Registered: Jul 2003
Location: Manchester, UK
Distribution: Debian
Posts: 31
Original Poster
Rep:
|
If I upgrade to 2.4, will there be stability problems?
|
|
|
|
07-30-2003, 04:02 PM
|
#10
|
|
Member
Registered: Jul 2003
Location: The Netherlands
Distribution: Gentoo Linux
Posts: 213
Rep:
|
get 2.6 
|
|
|
|
07-30-2003, 04:24 PM
|
#11
|
|
LQ Newbie
Registered: Jul 2003
Location: Poland
Distribution: Debian
Posts: 23
Rep:
|
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
|
|
|
|
07-30-2003, 04:49 PM
|
#12
|
|
Member
Registered: Jul 2003
Location: The Netherlands
Distribution: Gentoo Linux
Posts: 213
Rep:
|
2.6 has a great networking speed  .
|
|
|
|
08-01-2003, 11:19 AM
|
#13
|
|
Member
Registered: Jul 2003
Location: Manchester, UK
Distribution: Debian
Posts: 31
Original Poster
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:42 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|