Linux OS as router
HI,
I have two network cards in my computer (Debian). One (eth0) is connected to the router which is connected to the internet, the other one (eth1) is connected to my laptop (Gentoo). Now I want to surf the web both on my computer and on my laptop. I obeyed some tutorials "Linux as router": 1. On my Debian system IP-Forwarding is on: Code:
takada:/home/sam# sysctl net.ipv4.ip_forward Code:
takada:/etc/network# cat interfaces Code:
connect: Network is unreachable Thanks for any help |
Ok, two obvious things missing, at least in your info provided
1) is the laptop configured with a default route of the debian box? 2) you need to further a) also use iptables masquerade to source nat the traffic from your laptop to come from it's eth0 addres OR b) ensure that the actual internet router knows how to get back to the laptop address, I.e. write via the debian box. |
Yes, laptop is configured with with a default route to 192.168.0.1 (actually it wasn't when I posted the output of "ping 192.168.1.1" from laptop, but I tried that earlier already; with that default gateway the output changes to 100% packet loss instead of "Network is unreachable").
To 2) I'd rather take option b). So I looked up the configuration page of my router. There's a category 'Static routes' which asks for the IP-Destination, IP-Subnetmask, IP-Gateway and metrics. I tried with "192.168.0.2", "255.255.255.0", "192.168.1.97" and "2", but it has no effect. Is there someone with an idea what to do?? |
ok, well the "IP-Destination" would be "192.168.0.0" but other than that it looks ok. You should now be at the level of iptables firewalling on the debian box. are you permitting traffic in the "FORWARD" table?
|
yes, I am:
Code:
takada:/home/sam# iptables --list |
All times are GMT -5. The time now is 11:40 AM. |