Re: Cannot access Linux computer from outside LAN
- From: Philippe Signoret <philippe.signoret@xxxxxxxxx>
- Date: 31 May 2007 02:10:25 -0700
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
.
- Follow-Ups:
- Re: Cannot access Linux computer from outside LAN
- From: Bit Twister
- Re: Cannot access Linux computer from outside LAN
- From: Philipp Pagel
- Re: Cannot access Linux computer from outside LAN
- References:
- Cannot access Linux computer from outside LAN
- From: Philippe Signoret
- Re: Cannot access Linux computer from outside LAN
- From: Bill Marcum
- Re: Cannot access Linux computer from outside LAN
- From: Philippe Signoret
- Re: Cannot access Linux computer from outside LAN
- From: Philipp Pagel
- Cannot access Linux computer from outside LAN
- Prev by Date: Re: Cannot access Linux computer from outside LAN
- Next by Date: wireless-tools problem on embedded linux
- Previous by thread: Re: Cannot access Linux computer from outside LAN
- Next by thread: Re: Cannot access Linux computer from outside LAN
- Index(es):
Relevant Pages
|