Solved FreeBSD cannot connect to the internet on VirtualBox

mohamed.s.chebbi

New Member


Messages: 11

Hi All,
I installed FreeBSD 11 on VirtualBox using an image from osboxes.org. I tried to run pkg(8) but it seem no internet connection. I tried to configure OpenDNS on the file resolv.conf (OpenDNS solve the problem on FreeBSD 10.2) but I got the same result pkg does not work.

Can any one help me to connect FreeBSD to internet step by step? I want to install Mate and the French localization.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,696
Messages: 30,639

"It doesn't work" doesn't tell us much. Please provide the exact error message.

Also provide us with the details of the VirtualBox configuration, did you use bridged, NAT or host-only networking?
 

drhowarddrfine

Son of Beastie

Reaction score: 1,227
Messages: 3,250

This would be a question for osboxes.org since it is their package you got this from. And you don't say what OS you installed VirtualBox on so it might also be a question for that host OS.
 
OP
OP
mohamed.s.chebbi

mohamed.s.chebbi

New Member


Messages: 11

Sorry, I have windows 10 with virtual box the last version.

on virtualbox: configuration->network i use NAT.

this is the result of a ping command:
Code:
ping www.google.com
ping: cannot resolv www.google.com: host name lookup failure.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,696
Messages: 30,639

Lookup failures are related to DNS settings. On FreeBSD check if /etc/resolv.conf is correct. Are you able to ping by IP address, i.e. ping 8.8.8.8?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,696
Messages: 30,639

That means your VM has no network at all. What's the output of ifconfig?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,696
Messages: 30,639

Your em0 interface has no IP address. Hence no network (or internet) connectivity.
 
OP
OP
mohamed.s.chebbi

mohamed.s.chebbi

New Member


Messages: 11

Your em0 interface has no IP address. Hence no network (or internet) connectivity.

I have internet connection on my laptop, my problem is that I'm not so good in networking. I want just the tool pkg(8) run to install mate and the French localization and use FreeBSD as an intermediate user.

I can download any Linux image but I LOVE FreeBSD.
 

kapil agrawal

New Member

Reaction score: 1
Messages: 1

@mohamed.s.chebbi : Was this issue resolved for you ?

This seems to be possibly a network issue between your Guest OS and your Host OS. Try enabling DHCP on your FreeBSD that should give your interface an IP address.
 
Top