Centos installed on Windows XP VirtualBox unable to connect to internet but can be reached from the world.

Greg Alexander
Greg Alexander used Ask the Experts™
on
I am trying to setup a simple Linux machine on a Windows XP machine iwith Virtual Box. At this point I have it to where I can access the network and ping the router, I am able to even SSH from the world (I forwarded traffic on port 22 to it). The only thing I can't do is connect to the internet..

I am curious if it is actually the XP machine that is blocking access to the internet but not sure.. I am using a wireless connection, but I don't think that has anything to do with it since I can access the network. I have tried this several times unsuccessfully, but I am not backing down this time :)

Any ideas? When I run netstat -rt I get


Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.1.0     *                     255.255.255.0   U         0 0          0 eth0
link-local          *                      255.255.0.0      U         0 0          0 eth0
default             192.168.1.1     0.0.0.0             UG      0 0          0 eth0

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
maybe you have dont set DNS in linux box?
sudo echo "nameserver your_dns_server" >/etc/resolv.conf
and try again
Common issue is network setup and having no access to DNS.

Issue command

service network status

If it is not running

service network start


Then issue command

ping yahoo.com

Also try this

ping 98.137.149.56

If you are running GUI, you should have network manager up and running to take care of your problems

Try
service NetworkManager status
Greg AlexanderLead Developer

Author

Commented:
What would be my DNS server? my router 192.168.1.1?
Commented:
try 192.168.1.1, or try google`s DNS 8.8.8.8
Greg AlexanderLead Developer

Author

Commented:
@farzani

When I run service network status I get:

Configured devices:
lo eth0
Currently active devices:
lo eth0

I get nothing when I ping yahoo.com but I can ping 98.137.149.56.. I don't have access to a GUI.. all command line :(
Try your gateway.

In windows, issue command
ipconfig
Greg AlexanderLead Developer

Author

Commented:
That did it... I added my router IP and it WORKS!
So it is surely a DNS issue.

Edit /etc/resolv.conf

Put this:

nameserver 98.137.149.56

Try the ping command again.

Commented:
Add google`s DNS as secondary
example, in /etc/resolv.conf:

nameserver 192.168.1.1
nameserver 8.8.8.8

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial