LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   set static dns server in debian (https://www.linuxquestions.org/questions/linux-networking-3/set-static-dns-server-in-debian-335288/)

jsmarshall85 06-19-2005 09:34 PM

set static dns server ip address in debian
 
need to set a static address for dns on my debian box. i have edited my /etc/network/interfaces as such
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.0.4
        netmask        255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.10

do i just add a dns line to this with my dns server info?

also after editing this file i ran the following command and got this error
Code:

/etc/init.d/networking restart
Setting up IP spoofing protection: rp_filter.
Reconfiguring network interfaces...SIOCDELRT: No such process
ifup: interface lo already configured
done.


Noth 06-19-2005 10:26 PM

DNS entries go in /etc/resolv.conf

mjrich 06-19-2005 10:36 PM

They can also go in /etc/network/interfaces, eg
Code:

        # dns-* options are implemented by the resolvconf package
        dns-nameservers hooha and whatnot
        dns-search foobar

Have you just done a kernel upgrade/recompile ? Anyhoo, the SIOCDELRT error is possibly due to either the wrong driver compiled for the network card, or the incorrect one being loaded. You could try running
Code:

depmod -a
/etc/init.d/networking restart

Cheers,

mj

jsmarshall85 06-20-2005 08:18 AM

thanks to both of you
i did upgrade my kernel to 2.6.11-1-686, but havent recompilied it so it could be that or something with the driver, i will do both of these tonight at home and let you know

again thanks!

micro77 06-07-2009 07:43 AM

Quote:

Originally Posted by Noth (Post 1704423)
DNS entries go in /etc/resolv.conf

thank you very much.
its ver helpful to me .
:)

ott0disk 09-07-2009 06:44 AM

Hi there,i've got a similiar problem;i installed debian stable on my granmother's pc :D and everything works fine,for her,but recently he complaind about a site wich she can't connect.I already know that on my connection you might have to add the dns-search domain manually,i don't know why but it is.However everytime i reboot the pc and the networkmanager connect to the wireless network those extra dns numbers disappear.By setting it via gnome(network-admin or something like)i get it working (i can ping that site!) but they disappear everytime.I noticed network manager store that info in /etc/resolv.conf adding a line with the dns-search domain but the file is generated when connecting to the wireless network.I purged the package resolvconf and avahi-dnsconfd and tried to add dnsutils;but no way to store permanently those numbers.....any ideas??


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