DNS, Changing your
Here is a simple way to change your DNS numbers.
In your favorite text editor open the /etc/sysconfig/network-scripts/ifcfg-xxxx where as ifcfg.xxxx could be ppp0, eth0 or wlan0 as the root user.
In our example we will be using a command line editor called nano. Also since I am using a Ethernet connection I will be using ifcfg-eth0
First change to the root user using "SU"
[dwmoar@workbox ~]$ su
Password: Note: Your password will not be displayed on the screen
Now open the ifcfg-eth0 file using nano
[root@workbox dwmoar]# nano /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 BOOTPROTO=static IPADDR=192.168.1.25 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 ONBOOT=yes METRIC=10 MII_NOT_SUPPORTED=no USERCTL=yes DNS1=192.168.1.1 <--- note DNS number RESOLV_MODS=no IPV6INIT=no IPV6TO4INIT=no ACCOUNTING=yes
Now to this we want to add our new DNS number. Add the following lines if they are not already there. If they are there than just change the numbers. Normally the DNS is set to your ISP DNS or that of your Modem/Router
DNS1=220.127.116.11 <-- Open DNS servers
DNS2=18.104.22.168 <-- Open DNS servers
These could be any public DNS server numbers such as Google 22.214.171.124 or 126.96.36.199
When you are finished you file should look something like this
DEVICE=eth0 BOOTPROTO=static IPADDR=192.168.1.25 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 ONBOOT=yes METRIC=10 MII_NOT_SUPPORTED=no USERCTL=yes DNS1=188.8.131.52 <-- your new DNS Numbers DNS2=184.108.40.206 <-- your new DNS Numbers RESOLV_MODS=no IPV6INIT=no IPV6TO4INIT=no ACCOUNTING=yes
Your DNS numbers may vary depending on which DNS server you have chosen to use. Save your file using <ctrl>+X. Now in order to make them active we need to restart our network. To do this from the console window enter the following command, followed by pressing the ENTER key,
service network restart
you should then see something like this
[root@workbox dwmoar]# service network restart Shutting down interface eth0: [ OK ] Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: [ OK ] [root@workbox dwmoar]# </pre? Now you are using your new DNS server numbers. These new DNS numbers will be used each and every time that you power on your computer.