Click to See Complete Forum and Search --> : Routing and setting up a Gateway.


Maskkkk
09-13-2004, 10:10 AM
I'm trying to setup a subnet using a linux gateway on my internal network.

I've read plently of stuff on using the route command to setup a static route.

Thus far my network looks like this...
There is an internet connection (DSL) which is hooked to a router (a router device, a link sis)(on network 192.168.1.0, and the routers ip is 192.168.1.1) which is hooked to the gateway (Redhat 9 Linux), the gateway has two nic cards eth0 and eth1. eth0 is connected to the routers network 192.168.1.0 with an address of 192.168.1.2 and the second interface eth1 is connected to the subnet 192.168.0.0 with an ip of 192.168.0.1

On the 192.168.0.0 segment is my laptop which has an ip of 192.168.0.105

Now I've managed to get the laptop to connect to ip's outside of my lan, but the gateway still doesn't know how to connect to ip's outside of my lan. (which really doesn't make sense if you think about it, since the laptop connects to the gate way to ping the remote, remote host.) I don't understand this...but here are the routing tables for both of them anyhow.


Laptop:
Destination Gateway Genmask Flags Iface
0.0.0.0 192.168.0.1 255.255.255.0 UG eth0
192.168.0.0 0.0.0.0 255.255.255.0 U eth0
127.0.0.0 0.0.0.0 255.0.0.0 U lo
0.0.0.0 192.168.0.1 0.0.0.0 UG eth0



Gateway:
Destination Gateway Genmask Flags Iface
192.168.1.1 0.0.0.0 255.255.255.255 UH eth0
0.0.0.0 0.0.0.0 255.255.255.0 U eth0
192.168.1.0 0.0.0.0 255.255.255.0 U eth0
192.168.0.0 0.0.0.0 255.255.255.0 U eth1
127.0.0.0 0.0.0.0 255.0.0.0 U lo
0.0.0.0 192.168.1.1 0.0.0.0 UG eth0


Also the laptop is not capabile of sending dns requests for some reason. Every ping to www.google.com is refused with a Network Unreachable.
I have the name servers for my ISP in /etc/resolv.conf on both the gateway and my laptop. Why is this?
There is an iptables firewall on the gateway I don't know if that has something to do with it or not. (and I don't really know how to configure it)

Thanks and if anything I wrote here wasn't to clear please let me know.

jrbishop79
09-13-2004, 10:44 AM
can you ping 216.239.37.99 (the dotted IP addy of google)?

also you said in your post that your latop had an IP address of 192.168.1.150 while in the 192.168.0 subnet. You might want to try to give it an address in the 0 subent and see if that fixes things....

Maskkkk
09-13-2004, 11:32 AM
Sorry that was a type-o, it the laptop address was 192.168.0.105, and I fixed it in the previous post. Thank you for pointing that out.

Maskkkk
09-14-2004, 11:25 AM
Yes I can ping the addy of google. But I can't ping it via www.google.com. Any reason for this? I have the DNS setup but I was working with ethereal and I don't think it passes through the gateway.

jrbishop79
09-14-2004, 08:32 PM
well if you can ping the dotted IP address, but not the actaual name, that means the problem is with DNS.The fact that you can ping an address outside your network is an indication that your gateway is working.

Maskkkk
09-15-2004, 09:07 AM
I've been reading articles online, and I came to the conclusion that it might need to be setup so that it forwards DNS requests via the iptables firewall. (Thus setting up a DNS proxy server) Would I be correct in this assumption?