Link to home
Create AccountLog in
Avatar of Greg Alexander
Greg AlexanderFlag for United States of America

asked on

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

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

Avatar of pilson66
pilson66
Flag of Ukraine image

maybe you have dont set DNS in linux box?
sudo echo "nameserver your_dns_server" >/etc/resolv.conf
and try again
Avatar of farzanj
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
Avatar of Greg Alexander

ASKER

What would be my DNS server? my router 192.168.1.1?
ASKER CERTIFIED SOLUTION
Avatar of pilson66
pilson66
Flag of Ukraine image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
@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
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.
Add google`s DNS as secondary
example, in /etc/resolv.conf:

nameserver 192.168.1.1
nameserver 8.8.8.8