0

We have our test server configured with a CentOS installation. However, when we put the machine on Dynamic IP then the internet works fine.

But we need static IP to configure it with the internet (ironically) and make the machine accessible. However, on Static IP internet does not work.

What could be the problem?

P.S: on Static IP, machine is accessible from internet (incoming traffic is working fine).

Edit: here is the information for all. http://paste2.org/p/1741156

Khuram
  • 109
  • 3
  • 8

2 Answers2

2

Just check the default gateway

#route 

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.61.0    *               255.255.255.192 U     1      0        0 eth0
192.168.122.0   *               255.255.255.0   U     0      0        0 virbr0
link-local      *               255.255.0.0     U     1000   0        0 eth0
#check the following line
default         192.168.61.62   0.0.0.0         UG    0      0        0 eth0

if not you need to set default gateway

route add default gw 10.0.0.2
Aamir
  • 135
  • 6
LINUX4U
  • 154
  • 9
0
[root@192 ~]# nslookup google.com
;; connection timed out; no servers could be reached

You didn't setup the DNS. Run the following commands:

echo "nameserver 8.8.8.8" > /etc/resolv.conf
echo "nameserver 8.8.4.4" >> /etc/resolv.conf

and try again.

quanta
  • 50,327
  • 19
  • 152
  • 213