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.
The modem on my windows PC recently stopped working and I have another computer that I run Mandrake 9.1 on. It can connect to the internet just fine, through dialup, and I was wondering if there is a way I could set up the Linux PC as a server and let the Windows PC connect to the internet through that. Then when I get cable again, can I turn it around, as the Windows PC will have the cable going into that.
The Linux PC has Mandrake 9.1 on it, the other PC ahs Windows 98SE. The LAN works when I go on my Windows partition from this computer, both see each other. However I havent been able to figure out how to get it to work from Linux.
I think I got it to the point where the Windows computer can see there is an internet connection running on my Linux machine, as there is a little icon on the system tray that shows my Machine's name and the ISP's name, however when I run IE or Netscape they both sit there for like two minutes and then say the website can't be reached... Do I need to put in proxy settings or anything?
Hmm... I was playing around with it, and I think I need to setup a proxy. However I have never done this, in Windows or Linux, so I really don't know how to go about doing it.
In DrakProxy there isnt a wizard or anything. It just gives me a screen to put the Proxy address in, I do not know if I just make one up for this computer or what. I went through the DrakGW wizard, so I would think that should be fine and I know the network equipmnt is OK because when I run my Windows partition both computers work fine. I also know that the network card works with linux because I have played LAN Quake2 games from Linux and it worked. I just can't seem to be able to share the internet...
Maybe someone who knows more about setting up networks with more than one OS can help?
How did you configure your second NIC on Linux (the one Windows is connecting to?). You should set it up with a fixed IP: 192.168.1.1.
You then go to Mandrake Control Center->Network & Internet. There you should see an option like 'Share your connection'. This will make the bridge between eth1->eth0 (assuming eth0 is connected to the internet).
On the windows machine you should have no specific settings (so with dynamic IP, etc. - you might need to set gateway to 192.168.1.1 but I am not sure, as I did not do that explicitly and it just works). I assume you have so-called a crosscable going from Windows box->Linux box (afaik a normal ethernet cable does not work).
There is no need to set up a proxy on your Linux machine in order to enable the sharing.
Currently I am not at home, so I can't give you more details. But I do have a Windows machine connected to a Linux machine, which is connected to the internet. The setup was really easy.
All you need to do is from Control Panel click on network, select TCP/IP for you NIC that is connected to the Mandrake machine, make the Mandrake machine the gateway and add the DNS numbers.
Linux -> conects to internet(with 56k modem for now)
||
HUB
||
Win98SE Computer
There were 3 computers on the network, which is why we use a hub. However, right now there are only 2, but I only have network cables, no cross over cables. So I am using the HUB to make it work. So there shouldn't be a problem with the wires.
/bin/bash,
Do you mean put the IP address of the Mandrake machine as the gateway and DNS numbers? I do not know the DNS numbers of my ISP as I have always just let whatever I used t connect determine taht by itself. Although, if I do need it, I believe I could find it on my ISPs website...
Thanks for the help everyone. I will try it when I get home today and let you know if there are anymore problems.
First masquerade after that...routing and last getting flag 1 to allow Linux to give the packages to move trough two interfaces...
And put this into rc.local or whatever you find for good...
Good luck,
Gorbachov
Some just like user interfaces on top of this 'nerdish' stuff . I do have the skills to do it in the manner you propose, but then I'd like to know what I am actually typing rather than copy&paste. If there is a 'friendlier' way to do the same, why not use that instead? Eventually, when I have the time, I'll dig into the really technical details on how NAT/Masquerading works within Linux. But currently I just don't have the spare time for that.
I do not want this thread to end in a terminal vs UI manner of configuring a system. Some like the UI because of ease of use and less technical stuff and some like the terminal because of total control. And some like it both ways (like me ).
Linux -> conects to internet(with 56k modem for now)
||
HUB
||
Win98SE Computer
There were 3 computers on the network, which is why we use a hub. However, right now there are only 2, but I only have network cables, no cross over cables. So I am using the HUB to make it work. So there shouldn't be a problem with the wires.
Indeed, in this case you do not need a cross over cable.
Quote:
/bin/bash,
Do you mean put the IP address of the Mandrake machine as the gateway and DNS numbers? I do not know the DNS numbers of my ISP as I have always just let whatever I used t connect determine taht by itself. Although, if I do need it, I believe I could find it on my ISPs website...
Afaik you do not have to put in the DNS numbers (at least I didn't) - so this should somehow be transparent. I am not sure whether you have to explicitely put in the gateway on your Windows machine (again I didn't - I left every input field empty).
Quote:
Thanks for the help everyone. I will try it when I get home today and let you know if there are anymore problems.
This line give one rule for Iptables tables that all routed from the range of the network that you use on eth0 /that is the external interface, INTERNET interface/ all will be MASQUERADE or masked...!So no one could see what is there behind the Linux...
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
This line is very important /all of these are important / this line sets the flag in the fail ip_forward to "1" for Linux that means that the all packages could pass trough the two interfaces...
All this is put in /etc/rc.d/rc.local and will be execute at boot...
On the Windowz machines the Gateway adress will be the iner address of the Linux and for DNS put the address of the ISP or if you have named runned on your router...?
I was not joking really. I was just referring to the fact that you can share your Linux Network Connection through Tools that are available in your distro. E.g., I am using Mandrake and you can share your internet connection by just going to Mandrake Control Center and enable it over there. This means that you don't have to type all the things that you mention. It is just an alternative way of achieving the same goal.
So, in essence, there are two ways of configuring stuff. Either by typing stuff in a terminal, or by using a Tool/Wizard/Application that essentially does the same for you but has a User Interface on top of it. For some things there may not exist a User Interface so you would need to edit certain files. But most of the stuff can be configured through a User Interface.
Btw, thanks for the explanation of the commands you mentioned! Now I have a better idea what those lines actually mean .
Originally posted by Gorbachov I am happy that there is no problem...
But I have never used tool... You may think that is old fashioned but I use only the console...
PS. But now you know how to do it trough console...
Gorbachov
Sure there is no problem at all . I do not think it is old fashioned to use the console only. It just requires more knowledge to use the console . And to build up that knowledge consumes time .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.