LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-28-2006, 08:14 PM   #1
ballistic509
Member
 
Registered: Feb 2006
Distribution: CentOS
Posts: 114

Rep: Reputation: 15
server cannot reach outside world


the only way i can make my server reach the outside world is if i add the IP and url of the server i want to use..

example:
Code:
205.234.137.131 mirros.kernal.org
i am using DTC and a D-Link DI524 router is there anythign i can change in my router to fix this or inside of linux to fix?
 
Old 08-29-2006, 01:08 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
how come so so many people spell kernel wrong, the same way? you just gave a link to a dubious bible site there...

anyway sounds like you simply haven't added any dns serers to /etc/resolv.conf, possibly your dhcp server, if you are using it, is incorrectly configured?
 
Old 08-29-2006, 01:12 PM   #3
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,636

Rep: Reputation: 109Reputation: 109
Quote:
Originally Posted by ballistic509
the only way i can make my server reach the outside world is if i add the IP and url of the server i want to use..

example:
Code:
205.234.137.131 mirros.kernal.org
i am using DTC and a D-Link DI524 router is there anythign i can change in my router to fix this or inside of linux to fix?
That sounds like no nameservers being set. How are you getting your IP on the server? If it is set to get the IP via dhcp then you should have something like this in your /etc/resolv.conf.

Code:
search
nameserver 192.168.0.1
Which is the IP address of your DI-524 unless you have done something to change the default.
 
Old 08-29-2006, 01:16 PM   #4
ballistic509
Member
 
Registered: Feb 2006
Distribution: CentOS
Posts: 114

Original Poster
Rep: Reputation: 15
this is my resolve.conf file

Code:
search
nameserver 127.0.0.1
nameserver 192.168.2.1
and i am using DHCP on my router..how can it be configured wrong though?

192.168.2.1 is the address to my router..i am getting the IPs by looking up A records at dnsstuff.com

and i do have mirrors.kernel.org added so it works until i have to download something from somewhere else then i have to look up the IP and add it to /etc/hosts
 
Old 08-29-2006, 01:23 PM   #5
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,636

Rep: Reputation: 109Reputation: 109
Quote:
Originally Posted by ballistic509
this is my resolve.conf file

Code:
search
nameserver 127.0.0.1
nameserver 192.168.2.1
and i am using DHCP on my router..how can it be configured wrong though?

192.168.2.1 is the address to my router..i am getting the IPs by looking up A records at dnsstuff.com

and i do have mirrors.kernel.org added so it works until i have to download something from somewhere else then i have to look up the IP and add it to /etc/hosts

So if you type in http://192.168.2.1 in a browser you get the login pop-up for the DI-524 then? Can you show us the /etc/network/interfaces on the server and the output of this command?

Code:
$>dpkg -l | grep dhcp
ii  dhcp-client               2.0pl5-19.4               DHCP Client
 
Old 08-29-2006, 01:26 PM   #6
ballistic509
Member
 
Registered: Feb 2006
Distribution: CentOS
Posts: 114

Original Poster
Rep: Reputation: 15
yes..when i type http://192.168.2.1 it brings up the login for my router

here is what my /etc/network/interfaces reads

Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.2.130
        netmask 255.255.255.0
        network 192.168.2.0
        broadcast 192.168.2.255
        gateway 192.168.2.1
and

Code:
ns1:~# dpkg -l | grep dhcp
rc  dhcp-client    2.0pl5-19.1    DHCP Client
 
Old 08-29-2006, 01:48 PM   #7
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,636

Rep: Reputation: 109Reputation: 109
Quote:
Originally Posted by ballistic509
yes..when i type http://192.168.2.1 it brings up the login for my router

here is what my /etc/network/interfaces reads
Thats the problem the file needs to read like this to be using the dhcp from the router once changed use /etc/init.d/networking restart and you should see similar output to below with it getting an IP.

Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
Code:
HappyTux:/home/stephen# /etc/init.d/networking restart
* /etc/network/options is deprecated.
Setting up IP spoofing protection...done (rp_filter).
Reconfiguring network interfaces...ifup: interface lo already configured
Internet Software Consortium DHCP Client 2.0pl5
Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
All rights reserved.

Please contribute if you find this software useful.
For info, please visit http://www.isc.org/dhcp-contrib.html

Listening on LPF/eth0/00:50:8d:d1:28:6b
Sending on   LPF/eth0/00:50:8d:d1:28:6b
Sending on   Socket/fallback/fallback-net
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.1
bound to 192.168.0.100 -- renewal in 302400 seconds.
done.
Edit: And your going to need to reinstall the dhcp-client package as well.

Last edited by HappyTux; 08-29-2006 at 01:51 PM.
 
Old 08-29-2006, 02:56 PM   #8
ballistic509
Member
 
Registered: Feb 2006
Distribution: CentOS
Posts: 114

Original Poster
Rep: Reputation: 15
if i change it to dhcp i cannot get a network connection...so i changed it back to static
 
Old 08-29-2006, 03:09 PM   #9
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,636

Rep: Reputation: 109Reputation: 109
Quote:
Originally Posted by ballistic509
if i change it to dhcp i cannot get a network connection...so i changed it back to static
Well if your going to do it that way and not try to figure out why the router does not to give you an IP I would suggest a search on free dns nameservers then editing in the /etc/resolv.conf the lines you have in there now and replace with the IPs of the ones you find otherwise you will never be able to resolve the names to IP.
 
Old 08-29-2006, 03:18 PM   #10
ballistic509
Member
 
Registered: Feb 2006
Distribution: CentOS
Posts: 114

Original Poster
Rep: Reputation: 15
i forgot to menchen that i am using a control panel DTC...which means that i cannot change my setup now....i can reinstall everythign but that means i loose my hosting information lol...
 
Old 08-29-2006, 03:26 PM   #11
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,636

Rep: Reputation: 109Reputation: 109
Quote:
Originally Posted by ballistic509
i forgot to menchen that i am using a control panel DTC...which means that i cannot change my setup now....i can reinstall everythign but that means i loose my hosting information lol...
Had to look that up you mean something like this if so I fail to see what that has to do with the local resolv.conf or for that matter how the machine it runs on gets it IP. It would be the responsibility of your router to forward the ports necessary for any services you run on the server with it still getting its "outside" IP by whatever means the DTC uses to update it if/when it changed.
 
Old 08-29-2006, 03:35 PM   #12
ballistic509
Member
 
Registered: Feb 2006
Distribution: CentOS
Posts: 114

Original Poster
Rep: Reputation: 15
but see if i change my resolve file to dhcp then my router gives it a different ip so then i would have to reconfig dtc and it takes a while to do that
 
Old 08-29-2006, 04:58 PM   #13
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,636

Rep: Reputation: 109Reputation: 109
Quote:
Originally Posted by ballistic509
but see if i change my resolve file to dhcp then my router gives it a different ip so then i would have to reconfig dtc and it takes a while to do that
The resolv.conf is where the nameservers are located this is not to do with an IP that you have unless you were using dhcp then the information is entered automatically by the dhcp server without dhcp being used you are not getting the entries setup properly because the router does know that it should be serving you the dns information. This is the way it works the /etc/network/interfaces file setup for dhcp requests an IP from router, router checks and gives available IP to machine and puts that information in its cache of address it is serving also the /etc/resolv.conf gets updated with IP of router to request dns, when your machine sends request for say www.cnn.com it resolves that to an IP gets the page and sends back to your machine. If your machine is setup for static IP machine boots uses its IP in /etc/network/interfaces file your request for www.cnn.com goes to router, router checks nothing in cache for that address so no serving of request for dns this is what is happening with your problem right now. When set for static address the information for the nameservers should be in the /etc/resolv.conf which means either you use the dns nameservers of your ISP in the file or you find some free ones to use.
 
Old 08-29-2006, 05:15 PM   #14
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,636

Rep: Reputation: 109Reputation: 109
I just checked in my DI-524 that I use here and you can use dhcp and get to do what you want anyways using what is called Static DHCP. Choose the DHCP option of the home menu item then at the bottom it allows you to set the IP to use with a either the MAC address of the network card in the machine or using the drop down list of the dhcp clients connected.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
FTP through Router/Can not reach my PC from outside world? sizmit Linux - Networking 3 12-11-2005 04:10 PM
workstation cannot reach server rosey_krh Linux - Networking 5 04-21-2005 04:46 PM
dns config server could be reach butchick Linux - Newbie 4 04-16-2004 11:50 PM
can't reach new server wedgeworth Linux - Software 2 03-18-2004 02:39 PM
can't reach proxy server Fabian030 Linux - Networking 24 09-05-2003 06:52 AM

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

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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration