LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Can access local LAN Webserver, but not Internet (https://www.linuxquestions.org/questions/debian-26/can-access-local-lan-webserver-but-not-internet-352760/)

spaceuser 08-13-2005 01:33 AM

Can access local LAN Webserver, but not Internet
 
I have just installed Debian 3.1 on a slave harddrive. The master disk is running Windows 2000, when I'm in the need of using M$. The computer is in a local LAN with a Freesco (Linux) router to be able to access the Internet. The LAN also have another Freesco box, only as a local webserver for test purposes only.

The problem is that I can access the Freesco Web server without problem, but I can't access the internet. When I supply an url in the Firefox browser, it waits forever. I have supplied the Freesco router IP-address as DNS for the eth0, with no luck. If I reboot the computer with Windows it works ok.

Any suggestions?

TIA

darkleaf 08-13-2005 05:47 AM

Do you have the router set as gateway? Try "route add default gw *.*.*.*". Do you mean you've set the router's IP address in /etc/resolv.conf like this:

Quote:

nameserver *.*.*.*

spaceuser 08-14-2005 01:36 AM

I added a 'route add default gw 192.168.7.5' command and it worked ok, but how can it survive a reboot?

TIA

darkleaf 08-14-2005 04:19 AM

In /etc/network/interfaces find the interface then in the list under it add a line like this:
Quote:

gateway 192.168.7.5

spaceuser 08-14-2005 07:00 AM

Quote:

gateway 192.168.7.5
I login as root and tried to add the line to /etc/network/interfaces, but it's is removed after a reboot as well.
So what is going on here?

TIA

tomj88 08-14-2005 02:23 PM

Are you using DHCP? /etc/hosts will have a line like this if it is:
Code:

# The primary network interface
auto eth0
iface eth0 inet dhcp

I changed mine to be a static IP (make sure you instruct your router to assign that IP only to that box, on my router it is under LAN clients, might come under static routing or something along those lines). My /etc/network/interfaces looks like this now:

Code:

auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.1.2
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1
        name Ethernet LAN card

Make sure you change the values to be correct for your network. You can find some of these out by typing "ifconfig" as root

spaceuser 08-14-2005 11:59 PM

Thankx for your effort to help here.... yes I use DHCP. I find it hard to belive that it could be the reason for my problem that the changes are not surviving a reboot.

Please... anyone!

spaceuser 08-16-2005 10:01 AM

Please... someone must be knowing this?

TIA

crabboy 08-22-2005 11:52 PM

When using DHCP, network settings are NOT stored on the machine. They are aquired when the machine boots from the DHCP server. This includes the IP address, the gateway address and dns addresses.

Simon Bridge 08-22-2005 11:55 PM

You have reason to disbelieve the advice you have recieved to date?

When you reboot - the DHCP part will erase the gateway addr. If it is static, then it won't get erased. So setting a static IP would seem to be a reasonable suggestion. (Check - does your network provide a DHCP service?)

Of course, you can always add the gateway route command right at the end of your boot script...

Apart from this, I think we'd need to know exactly how the LAN is wired... I am picturing a NAT Router + 4-port ethernet hub in the same box in a small home network. Each host connects via a cat5 cable to one of the ethernet ports and the NAT Router goes to a xDSL modem or something to the internet?

Refusing to believe the advise you are given, refusing to accept it, is the reason your support just dried up.

Dead Parrot 08-23-2005 12:24 AM

Hmm... tomj88 accidentally writes about lines you should add to /etc/hosts . The information is quite correct but the config file is wrong -- it should be /etc/network/interfaces .

If you can get the network connection temporarily working with the "route add default gw 192.168.7.5" command, you could use the "su" command (to become root) and then "apt-get install etherconf". This should install the etherconf utility that you can use to configure your network interfaces. Run it as root by typing "etherconf".

Simon Bridge 08-23-2005 12:54 AM

Ah - just been looking at the freesco router.
This is a software router which is supposed to provide a DHCP service.
Everyone is assuming the router is set up correctly -
the host is set for DHCP
but - not getting a gateway addr this way

is it getting an IP and DNS addr at all?


All times are GMT -5. The time now is 08:08 AM.