I am trying to set up nameserver lookup. Should be simple , yes? I simply want to code the IP address of our corporate nameserver "somewhere" and be done with it just like in the old resolv.conf days. Apparently for some reason "resolv.conf" was retired so I have tried a method vaguely referred to in the debian doc:
Here is what I have done:
I have stopped AND disabled the NetworkManager
I have coded, in my /etc/network/interfaces, the following:
auto enp11s0
iface enp11s0 inet static
....
....
dns-nameservers 172.20.30.31
My nssswitch.conf has the line:
hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname.
I note that /etc/resolv.con points to /var/run/NetworkManager/resolv.conf. I expect this is a vestige of the original install but no longer important with NetworkManager turned off.
SO-I reboot and issues a few "host" commands to list various servers but nothing happens. I don't know of any command that lists all the name servers presently being used so I could not check this.
Can anyone tell me how to set up dsn look up in debian (without netmanager or resolveconf)
thanks
fritz
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
DNS Nameserver Setup
Re: DNS Nameserver Setup
The resolvconf package is still available in the Debian repositories. It doesn't get installed by default by the Debian installer, but I hadn't heard it had been "retired". Maybe I missed the news item?
The default setup in Debian I believe is to use Network Manager and assume most people will use their ISP's DNS. But clearly there are other options, for the tweak-heads and for data center servers, etc.
The default setup in Debian I believe is to use Network Manager and assume most people will use their ISP's DNS. But clearly there are other options, for the tweak-heads and for data center servers, etc.
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: DNS Nameserver Setup
The OP wrote about the resolv.conf file, not the resolvconf package. Neither has been retired so far.tynman wrote:The resolvconf package is still available in the Debian repositories
Some packages such as resolvconf (and apparently NetworkManager, which I was not aware of) replace the /etc/resolv.conf file with a symbolic link pointing to a dynamically managed file. However this is transparent for applications using /etc/resolv.conf for resolution.
No. NetworkManager only comes by default with some desktop environments such as Gnome. By default LXDE installs Wicd instead.tynman wrote:The default setup in Debian I believe is to use Network Manager
Note that dns-* options in /etc/network/interfaces require the resolvconf package to have any effect.fsonnichsen wrote:dns-nameservers 172.20.30.31
-
- Posts: 11
- Joined: 2015-11-30 18:44
Re: DNS Nameserver Setup
Thank you for the replies here. I have indeed installed gnome which apparently likes to bring along the NetworkManager. I am trying to simply hard code the DNS server IP in /etc/resolv.conf and be done with it. (the NetworkManager has caused problems for me in the past.) When I code the IP for our DNS server in the /etc/resolv.conf it vanishes after reboot (which is why I implied it was retired). So-my question still stands-is it possible for a UNIX refugee from the SUN-OS days to still use revolv.conf, and if so, how? Short of this I suppose I can put NetworkManager in.
thanks all
Fritz
thanks all
Fritz
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: DNS Nameserver Setup
Delete the symlink and create a new /etc/resolv.conf, populated to your liking.fsonnichsen wrote:I note that /etc/resolv.con points to /var/run/NetworkManager/resolv.conf. I expect this is a vestige of the original install but no longer important with NetworkManager turned off.
As long as you have static routes defined in /etc/network/interfaces (and no silly resolv.conf-managing programs running) then you shouldn't even need the dns-nameservers line because /etc/resolv.conf will never be touched
deadbang
- sunrat
- Administrator
- Posts: 6497
- Joined: 2006-08-29 09:12
- Location: Melbourne, Australia
- Has thanked: 118 times
- Been thanked: 476 times
Re: DNS Nameserver Setup
I had a similar issue recently, fixed by editing dhclient.conf. See this answer at siduction forum:
https://forum.siduction.org/index.php?t ... 4#msg55434
https://forum.siduction.org/index.php?t ... 4#msg55434
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: DNS Nameserver Setup
The OP has declared static addresses in /etc/network/interfaces so dhclient will not be invoked at all.sunrat wrote:I had a similar issue recently, fixed by editing dhclient.conf
deadbang
-
- Posts: 11
- Joined: 2015-11-30 18:44
Re: DNS Nameserver Setup
Thanks all.
Re: "head-on-a-stick"--- "Delete the symlink and create a new /etc/resolv.conf"
This worked. I had avoided this at first as I didn't know what avalanche of problems deleting an install generated file might create. The inviting thing about linux a few years back was its lack of bloatware and more important, lack of intertwined labyrinths of file structures to do simple things. In fact I could often clone a system by copying /etc/ directory and little else. Maybe I am overreacting but it seems like unwarranted complexity has been added lately and this is complicated by very diffuse documentation.
thanks again
Fritz
Re: "head-on-a-stick"--- "Delete the symlink and create a new /etc/resolv.conf"
This worked. I had avoided this at first as I didn't know what avalanche of problems deleting an install generated file might create. The inviting thing about linux a few years back was its lack of bloatware and more important, lack of intertwined labyrinths of file structures to do simple things. In fact I could often clone a system by copying /etc/ directory and little else. Maybe I am overreacting but it seems like unwarranted complexity has been added lately and this is complicated by very diffuse documentation.
thanks again
Fritz