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.
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
bras2-l0.stlsmo * 255.255.255.255 UH 0 0 0 ppp0
192.168.2.0 * 255.255.255.0 U 0 0 0 eth1
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
172.16.0.0 * 255.255.0.0 U 0 0 0 eth2
loopback * 255.0.0.0 U 0 0 0 lo
default * 0.0.0.0 U 0 0 0 ppp0
eth0 is attached to a laptop, eth1 is attached to a PC. eth2 is attached to a DSL modem, and the server is successfully acting as my internet gateway. The trouble is, my PC cannot see my laptop and vice versa. E.G. cannot ping, host seems down. I feel like I'm overlooking something silly, so I wouldn't mind any feedback.
Sorry, my post may have been misleading... from the server, I can see every machine on the network. From my PC or from the laptop, I can only see the server. What I was trying to accomplish was being able to see my laptop from my PC by routing traffic through the server, and vice verse.
The laptop and PC each only have one interface.
Thanks
Edit: The laptops IP is 192.168.1.17, with 192.168.1.1 (eth0 on the server) set as its gateway. My PCs IP is 192.168.2.2, with 192.168.2.1 (eth1 on the server) set as its gateway.
oh ok, so if i understand, youre looking to route traffic from laptop network 192.168.1.0/24 to pc network 192.168.2.0/24 thru the linux server.
you must ensure that the file /proc/sys/net/ipv4/ip_forward contains a 1 to enable ip forwarding, 0 is disabled(default).
then you must issue some iptables commands, since i dont know exactly how to do it off the top of my head, ill refer you to iptables man page and other examples in other threads.
eth0 Link encap:Ethernet HWaddr 00:60:97:07:a6:54
inet addr:192.168.1.1 Mask:255.255.255.0
eth1 Link encap:Ethernet HWaddr 00:1b:21:51:8c:ce
inet addr:192.168.2.1 Mask:255.255.255.0
PC and laptop is in different networks, they can see each other only through router/server.
So make sure you insert 1 to /proc/sys/net/ipv4/ip_forward, as it was suggested before, and you need to add:
FORWARD -i eth0 -o eth1 -j ACCEPT
FORWARD -i eth1 -o eth0 -j ACCEPT
to iptables or change default rule for FORWARD to ACCEPT.
And, of course, you need to start iptables service.
Sorry I haven't posted in a few days, writing a huge paper over here :/
I ran some tests with wireshark and found that my windows PC didn't even seem to transmit any traffic when I was trying to ping the other segment of the network. I reboot into slackware (the machine dual boots) and found that I suddenly had no trouble pinging the laptop or the laptop's gateway. Everything was working perfectly. I don't know what winXP's problem is here...
The laptop wasn't able to ping my PC or it's gateway because I'd placed some rules in my iptables rules file that prohibited that. I guess I just forgot. Upon removing these rules, the laptop was able to see the other segment without any problems.
So the problem was never with the gateway machine, this is just windows having some issue with my setup.
Thanks to all for taking some time and giving me some input.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.