LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 06-23-2011, 10:58 AM   #1
jdkaye
Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,013

Rep: Reputation: Disabled
Setting a dns-server on a static ip address.


I'm maintaining a Wheezy box for some friends who run an internet shop. Recently it became unable to find its dnsserver. I can temporarily fix the problem by editing the /etc/resolv.conf file but it gets overwritten every time the machine is rebooted. I suspect I need to use the resolvconf program (not the file) but the instructions on the man page are not really clear. Can someone tell me if (a) resolvconf is the way to go and (b) if so, what parameters I need to feed resolvconf to set up the nameservers permanently. Recall that this is a static ip situation so nothing involving DHCP will be involved.
TIA,
jdk
 
Old 06-23-2011, 11:06 AM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

If you use the network manager GUI to specify your DNS server(s), you should be good.

Please read this link:

http://wiki.debian.org/NetworkConfiguration

Good luck!

PS:
Quote:
http://wiki.debian.org/NetworkConfiguration

The C library and other resolver libraries look to /etc/resolv.conf for a list of nameservers. In the simplest case, that is the file to edit to set the list of name servers. But note that various other programs for dynamic configuration will be happy to overwrite your settings:

* The resolvconf program
* The network-manager daemon
* DHCP clients
Quote:
http://wiki.debian.org/NetworkConfiguration

In the most complex situations, using resolvconf really is the way to go, though in more simple configurations it is probably overkill.

Last edited by paulsm4; 06-23-2011 at 11:09 AM.
 
Old 06-24-2011, 10:26 AM   #3
jdkaye
Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,013

Original Poster
Rep: Reputation: Disabled
Thanks Paul,
Tutto a posto! as we say in Italian. I needed to put the nameserver information in the interfaces file, install the resolvconf package and then run the command:
Code:
cat /etc/network/interfaces | resolvconf -a eth0
I rebooted the system and it now works every time. The nameserver is persistent.
Ciao,
jdk

Last edited by jdkaye; 06-25-2011 at 01:58 AM.
 
Old 06-24-2011, 11:58 PM   #4
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Cool, as we say in Southern California

Glad you got it squared away, and thank you for posting back your results!

Ciao!
 
  


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
[SOLVED] how to setting a static ip address on slackware64 13 wubai Slackware 5 11-12-2012 08:21 PM
Setting a static IP address, but dynamically obtaining DNS config from a router bgoodr Linux - Hardware 3 09-28-2008 01:33 PM
Setting a static IP address thedp Slackware 4 05-02-2008 02:09 PM
HOWto determine DNS server numbers for creating static IP address? (req 4 Azureus) WildDrake! Linux - Newbie 2 04-18-2008 04:15 PM
Setting up a static I.P. address partyk1d24 Linux - Networking 13 12-29-2005 07:23 AM


All times are GMT -5. The time now is 12:19 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration