Re: Cannot access Linux computer from outside LAN



On May 31, 3:06 am, Philipp Pagel <pDOTpa...@xxxxxx> wrote:
Philippe Signoret <philippe.signo...@xxxxxxxxx> wrote:
Yes, I can ping the router. How do I know if the router is the default
gateway?

You can use the 'route -n' command for that. It should look something like this:

$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.268.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.3.254 0.0.0.0 UG 0 0 0 eth0

The first line says that all traffic to the local network goes through eth0. The
sencond line means that any other address is reached by using gateway
192.168.3.254.

If the latter is not configured, your machine essentially has no connection to
the internet, which is probably the case based on your original posting.

cu
Philipp

--
Dr. Philipp Pagel Tel. +49-8161-71 2131
Dept. of Genome Oriented Bioinformatics Fax. +49-8161-71 2186
Technical University of Munichhttp://mips.gsf.de/staff/pagel

Ah!

It seems to me I am getting closer to the problem...

$ route -n
Kernel IP routeing table
Destination Gateway Genmask Flags Metric Ref
Use Iface
192.168.3.0 0.0.0.0 255.255.255.0 U 0
0 0 eth0

After researching a bit on the web, I find that

$ route add -net default gw 192.168.3.254 dev eth0

changes the route table to:

$ route -n
Kernel IP routeing table
Destination Gateway Genmask Flags Metric Ref
Use Iface
192.168.3.0 0.0.0.0 255.255.255.0 U 0
0 0 eth0
0.0.0.0 192.168.3.254 0.0.0.0 UG 0
0 0 eth0


I can access the computer from the web! Thanks!

Now two questions remain:

1. How can I make this change permanent (i.e. the routing table will
look like that when I reboot the computer.)
2. Shouldn't this be happening automatically every time it gets an IP
from the DHCP server on the router??

Thanks,
Philippe

.



Relevant Pages

  • Re: Multiple external interfaces
    ... you should only need to enter a gateway once for the default ... routing table (unless you are routing to two different gateways, ... Assuming that your default route is set to go out eth0, ... I want to route the traffic from my 10.0.0.x subnet ...
    (comp.os.linux.networking)
  • Re: dialup modem connection
    ... >seems that your default route is not set to your ISP ... the gateway device is not properly set. ... Kernel IP routing table ... Copyright 2005 by Maurice Eugene Heskett, ...
    (Debian-User)
  • Re: Persistent Route ignored on W2K when destination network is unavailable
    ... Although it would seem it should work, the client's routing table is not ... routes it via the static route to the proper gateway. ... > 1 hour the workstations lose connectivity with the remote subnet. ...
    (microsoft.public.win2000.networking)
  • Re: Keep routing table
    ... > the route taken for the return path, you only control the outbound path. ... > one is manually entered in the Routing Table. ... > You can only have *one* Default Gateway. ... > Phillip Windell ...
    (microsoft.public.win2000.networking)
  • Re: [SLE] setting up routes
    ... > Kernel IP routing table ... the commands above and add it in your boot sequence. ... > I did del the route before adding it, but it is always up with a default ...
    (SuSE)