2
I would like to add a DNS server to my configuration (in order to use opennic). I've searched quite a bit but can't find a satisfactory solution, and I'm lost concerning solutions for ubuntu.
I've found a nice tutorial, the graphical part works for me, but I can't make the first part work (and I would like to script it, of course). http://www.ubuntututorials.com/set-dns-server-ubuntu-12-04/ When I add a line "prepend…" and check my DNS address with
nm-tool
, it didn't change. Do I need a command to restart a service or something ? They don't say so. (runningservice networking restart
doesn't help).As explained in Arch wiki (https://wiki.archlinux.org/index.php/Resolv.conf#Use_resolv.conf.head), we may use a /etc/resolv.conf.head file, but then we need to install the
openresolv
package in order to runresolvconf -u
. But I'd like my future script to run with no need of external dependency.
So, can someone tell me what file to edit, and what command to run to update the conf ?
I'm using a Debian (Mint Debian) but I would like to know if it is the same on Ubuntu. I read things changed since Ubuntu 12.04, so a lot of tutorials on the net are outdated (specially writing to /etc/dhcp3/dhclient.conf
is deprecated).
Thanks !
actually I already wrote a python script that did that (using your nearest opennic dns servers), but against an old tutorial^^ – Ehvince – 2013-10-07T22:57:29.117
If you were running dhcpd (dhcp server) you could just add option domain-name-servers 8.8.8.8 in the dhcpd.conf. If you need a dns server bind is the standard one. Are either of these what your looking for? – cybernard – 2013-10-07T23:24:44.070
No thanks, I don't run dhcpd nor bind. I'm curious now though. – Ehvince – 2013-10-08T09:11:38.257