Tag Archives: IP

How to add static DNS in Ubuntu 12.04 LTS

Please refer to this tutorial for adding the static ip address in Ubuntu 12.04.

Ubuntu 12.04 use resolvconf(a set of scripts and hooks) instead of resolv.conf to manage DNS server. The most notable difference for the user is that any change manually done to /etc/resolv.conf will be lost as it gets overwritten next time something triggers resolvconf.

To add the static dns entries in resolv.conf file,edit /etc/resolvconf/resolv.conf.d/base:

sudo nano /etc/resolvconf/resolv.conf.d/base

Read more of this post

Advertisements

Change Ubuntu Server from DHCP to a Static IP Address

First, we will check the ip address of our ubuntu server, which is assigned by DHCP server:

Let’s open up the /etc/network/interfaces file.

sudo nano /etc/network/interfaces

primary interface, normally eth0, contains these lines:

Currently, we are using dhcp, in order to change it from dhcp to static, then modify and add these lines:

We also need to edit the DNS settings by editing the resolv.conf file:

sudo nano /etc/resolv.conf

Add the appropriate server address after “name server

At the end, restart the networking components:

sudo /etc/init.d/networking restart

Check the new assigned ip address using ifconfig command:

Ping http://www.google.com. If you get a response, name resolution is working:

Hope this will help you!

Please Remember me in your prayers!

%d bloggers like this: