Can some please help me restore my networking, I have a VPS CENTOS6.3. Few minutes before it is working well, accept i can't connect to Yum repository. So I thought i can change some settings in Hostname and DNS Cleint under webmins network configuration. I changed the nameserver IP order (,, and also I have removed routing and gateways IP (* more later). Now I can't connect from terminal.

Few minutes back: (from treminal using putty)
# host domain name pointer unknown.hostforweb.net.

Now (only from hosting VPS java client console)
# host
Host not found: 5(REFUSED)

  • I have removed routing and gateways IP, because the IP there was, I remember changing by myself from, earlier. Instead of putting back I left it empty and applied the change. My Bad!

How can reset it back

Follow up info:
Webmin last 2 log entries before it went down

1362078063.15514.0 [28/Feb/2013 22:01:03] root 5b3f3abda88f002b2e8a0f2f55a4166e net save_dns.cgi "dns" "-" "-" domain='' domain_def='1' hostname='server1.example.com' hosts='1' nameserver_0='' nameserver_1='' 
nameserver_2='' nameserver_3='' nameserver_4='' nameserver_5='' order_0='files' order_1='dns' order_2='' order_3=''

1362078078.15547.0 [28/Feb/2013 22:01:18] root 5b3f3abda88f002b2e8a0f2f55a4166e net save_routes.cgi "routes" "-" "-" dev_0='' forward='0' gateway0='' 
gateway1='' gateway60='' gateway61='' gatewaydev0='' gatewaydev1='' gw_0='' ldev_0='' lnet_0='' lnetmask_0='' net_0='' netmask_0=''

more info about my machine
DNS BIND on CENTOS 6.3 and domain nameservers

  • Please provide the output of ip route and the contents of /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-eth0 – longneck Feb 28 '13 at 20:29
  • /etc/sysconfig/network gives -bash: /etc/sysconfig/network: Permission denied /etc/sysconfig/network-scripts/ifcfg-eth0 -bash: /etc/sysconfig/network-scripts/ifcfg-eth0: No such file or directory You'll find more info about my machine here [link]serverfault.com/questions/482747/… – tenzin Feb 28 '13 at 20:39
  • What about ip route? – longneck Feb 28 '13 at 21:04
  • ip route dev venet0 scope link metric 1002 – tenzin Feb 28 '13 at 21:06

You removed the default gateway of your server.

Start digging around the subfolders of /etc/sysconfig/network-scripts/ and cat'ing file you see there. One of them probably has a GATEWAY= entry in it.

Once you find out what your gateway should be, add the route as follows, replacing interface with the name of the interface from the config file you found:

ip route add default via interface

Alternatively, ask your host what your default gateway should be.


I managed to solve it by doing

# route add default gw

Found this link http://bit.ly/PPBF9l

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.