rh9 Routing Prob. using Linux between router and Win Client
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.
rh9 Routing Prob. using Linux between router and Win Client
Hi -
I am new to Linux (1 week?) and work only on shell, so go easy on me :-)
I have a Router through which we share one dsl for 4 people.
The router (a Netgear box) is also used as NAT and dhcp, so it gives the clients IP adresses and DNS location.
I try to connect a linux between my winXP client, and the router.
The linux has two eth-cards : one (eth0) is connected to the router, the other (eth1) to my winXP client.
The router has the ip 192.168.0.1.
eth0 is getting its ip from the router, and functions ( i can surf with lynx )
eth1 i give a static address of 192.168.100.1
the win machine runs on 192.168.100.2.
I can ping between linux and win, but the win machine does not get to the net, and I have no clue as how to give it a DNS access - but first I will be glad to be able to ping from my XP to the router...
You will proably ask me for "routes" so I quote it here:
Distribution: Fedors Core 3, Red Hat 9, Mandrake 8.1
Posts: 52
Rep:
192.168.100.0 and 192.168.0.0 are different networks without a router you cannot get them to ping or any connectivity. you have to set up the Linux box to act as a router. You may have to give the windows box a static IP. And make sure your real router routes for both networks.
Make your eth1 ip the default gateway on your windows box. And add routes through the Linux box so traffic for the network 192.168.100.0
This is done using the route command
Hi -
Thank you both for the answers -
I set the ip_forward to 1 and played a bit with route (which does not really functions like it is written in man) and I advanced a bit :
Now my windows machine can ping other clients on the network and they can ping it, but it can not go to the internet, nor ping the router.
I am suspecting the router denies it...
so the network looks like this:
Code:
Internet
(External IP)
Router (netgear box, NAT DHCP)
(192.168.0.1)
(192.168.0.X)
Linux Client Other clients (192.168.0.X)
(192.168.100.1)
(192.168.100.2)
Win Client
Like I said - the win client can ping all the machines in the network (199.168.0.X) , except for the router, and it doesn't go to the net - do I have to use NAT on my linux?
Is the problem on the router box?
Hi - thanks for your answer - here are the details...
Well - I tried to put them all on 192.168.0.X but I did not succeed to the mutter of being able to ping them all, and was already very glad to be able to ping other clients on the network from inside the win machine - this stopped as I changed them all to the same network, I will however try again, maybe I have done some routing mistake.
For now - here are the details you asked for....
Sorrry to have you made change everything, I just _asked_ why you needed 2 subnet.
Anyways, what is important here is to configure your default gateway correctly
Each of the machine in the 192.168.100.x and 192.168.0.x must have the router as their default gateway (ex: 192.168.100.2 must have 192.168.100.1 as default gateway and 192.168.0.123 must have 192.168.0.7 as default gateway). Then, the router must have your netgear box as default gateway.
I did check it again and it does not function with one subnet... but i guess i could use the practice...
Now, to be sure we are talking about the same thing :
1. The netgear box gets its gateway from the ISP. it has also an intern IP of 192.168.0.1
2. The Linux Box has two eth cards:
2.1. eth0 (192.168.0.7) has no gw set
2.2. eth1 (192.168.100.1) has also no gw set
2.3. default route 0.0.0.0 has the gw 192.168.0.1 (the netgear box)
3. windows (192.168.100.2) has the gw 192.168.100.1, which is the eth1 on the linux.
The funny thing is, that I can contact, for example, 192.168.0.4, or each other client from the network, but not the netgear box, and not the internet, so I suspect the netgear box does not route the subnet 192.168.100.X.
I set on the netgear box a static route to 192.168.100.0 through gw 192.168.0.7 (eth0) which enables other to ping the win, and win to ping others, but... hmm...
maybe you have a clue?
Thanx again...
Many Greetings,
Ron
yes - this is already set... :-(
I define in /etc/hosts router as 192.168.0.1
I can also use lynx from the linux to surf... (well - not much color there...)
???
:-(
Greetings,
Ron
btw, your routing seems ok. sorry for all the steps, but it is really hard to figure it out from here.
For NAT'ing I usually instal webmin, go into the firewall section and tell it to masquerade. Lame, but it works. (you can then maybe check for the rules)..For more complex firewalls, I modify some scripst I have. You can also check here for some samples http://iptables-tutorial.frozentux.n...-tutorial.html
yes - i will do it tommorow (here in europe it is now midnight...)
I hoped i can solve this otherwise, since the linux runs on a pII 233, and i am not sure about performance issues when using NAT...
Anyway, I start to figure out something about networking - it isn't so bad...
Thanks alot,
I will replay when I try the next step...
Cheers,
Ron
Hi - I finally did it !
I changed the router (netgear box) netmask from 255.255.255.0 to 255.255.0.0 so it feels also responsible for the 192.168.100 network - and it works ! I can ping the netgear, I can ping the internet and so on.
The only problem is, my win maschine has a static ip, and thus a static DNS, whereas I would like it to get the DNS server IP eather from the netgear router or from the linux, which gets it from the router...
But I guess that is a win problem - so I search some help somewhere else -
Many Thanx,
Ron
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.