LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-13-2005, 01:33 AM   #1
spaceuser
Member
 
Registered: Oct 2004
Location: Sweden
Distribution: Debian | Ubuntu | Mint | Android
Posts: 37

Rep: Reputation: 15
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
 
Old 08-13-2005, 05:47 AM   #2
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Rep: Reputation: 45
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 *.*.*.*
 
Old 08-14-2005, 01:36 AM   #3
spaceuser
Member
 
Registered: Oct 2004
Location: Sweden
Distribution: Debian | Ubuntu | Mint | Android
Posts: 37

Original Poster
Rep: Reputation: 15
I added a 'route add default gw 192.168.7.5' command and it worked ok, but how can it survive a reboot?

TIA
 
Old 08-14-2005, 04:19 AM   #4
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Rep: Reputation: 45
In /etc/network/interfaces find the interface then in the list under it add a line like this:
Quote:
gateway 192.168.7.5
 
Old 08-14-2005, 07:00 AM   #5
spaceuser
Member
 
Registered: Oct 2004
Location: Sweden
Distribution: Debian | Ubuntu | Mint | Android
Posts: 37

Original Poster
Rep: Reputation: 15
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

Last edited by spaceuser; 08-14-2005 at 09:31 AM.
 
Old 08-14-2005, 02:23 PM   #6
tomj88
Member
 
Registered: Apr 2005
Location: Wolverhampton, England
Distribution: Ubuntu
Posts: 334

Rep: Reputation: 30
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

Last edited by tomj88; 08-23-2005 at 04:48 AM.
 
Old 08-14-2005, 11:59 PM   #7
spaceuser
Member
 
Registered: Oct 2004
Location: Sweden
Distribution: Debian | Ubuntu | Mint | Android
Posts: 37

Original Poster
Rep: Reputation: 15
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!

Last edited by spaceuser; 08-16-2005 at 03:38 AM.
 
Old 08-16-2005, 10:01 AM   #8
spaceuser
Member
 
Registered: Oct 2004
Location: Sweden
Distribution: Debian | Ubuntu | Mint | Android
Posts: 37

Original Poster
Rep: Reputation: 15
Please... someone must be knowing this?

TIA
 
Old 08-22-2005, 11:52 PM   #9
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
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.
 
Old 08-22-2005, 11:55 PM   #10
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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.
 
Old 08-23-2005, 12:24 AM   #11
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
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".
 
Old 08-23-2005, 12:54 AM   #12
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't access my apache2 webserver using external address from LAN eldoran Linux - Networking 6 10-26-2008 03:51 PM
Local webserver -- How to deny all client install their local web server--Please help b:z Linux - Networking 13 04-16-2005 07:11 PM
newbie setting up lan - can't see local webserver. nmoog Linux - Networking 1 03-27-2004 11:17 PM
No access to my webserver from the internet??? flipside Linux - Newbie 2 09-27-2003 11:13 AM
access to mail on local lan Tigger Linux - Newbie 0 05-31-2003 09:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration