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: AIX 1.3 Failures and Fables
    ... DESTINATION GATEWAY FLGS REFCNT USE INTERFACE ... Is my interpretation of the AIX 1.3 #man route correct? ... Manually manipulates the routing tables. ... Is the destination host or network. ...
    (comp.sys.ibm.ps2.hardware)
  • Re: AIX 1.3 Failures and Fables
    ... I don't know if 1.3 has SMIT or its equivalent but there should be some way to add a default gateway which is your router. ... is: route add 1.2.3.4 gateway ... Manually manipulates the routing tables. ... Is the destination host or network. ...
    (comp.sys.ibm.ps2.hardware)
  • Re: AIX 1.3 Failures and Fables
    ... I don't know if 1.3 has SMIT or its equivalent but there should be some way to add a default gateway which is your router. ... Is my interpretation of the AIX 1.3 #man route correct? ... Manually manipulates the routing tables. ... Is the destination host or network. ...
    (comp.sys.ibm.ps2.hardware)
  • 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)
  • Re: [full build as of Sept. 24] "No route to host" after certain time...
    ... Machine loses routing, ... A 4.8-RELEASE kernel works, but when I try the 4.8-p8 kernel ... the default route is missing. ...
    (freebsd-stable)