vbox pkg: Host does not resolve

After a fresh install of FreeBSD 14.0-RELEASE(on virtual box in windows), unable to update/install packages. The physical machine(desktop) is inside my office network. The same setup works on my office laptop(windows + virtualbox) when connected to office network via VPN without any addtional setup after fresh install.

Below is the output of non-working setup on my office Desktop
sh:
# cat /etc/rc.conf
hostname="freebsd"
ifconfig_em0="inet 10.169.213.139 netmask 255.255.254.0"
vboxguest_enable="YES"
vboxservice_enable="YES"
defaultrouter="10.169.212.1"
sh:
# cat /etc/resolv.conf
nameserver 10.47.194.85
nameserver 10.171.221.11
sh:
# netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags        Netif Expire
default            10.169.212.1    UGS              em0
10.169.212.0/23 link#1            U              em0
10.69.213.139    link#2            UHS              lo0
127.0.0.1        link#2            UH              lo0
 
I'm not a network specialist but your configuration is somewhat strange:

- The name servers aren't on the same subnet as your inet ip/mask.
- In the routing table, it should be: 10.169.213.139 link#2 UHS lo0
not 10.69.213.139 link#2 UHS lo0

For the first remark you should try 255.0.0.0 mask. For the second, I think there is a problem in the informations you give (a typo?).

Also, always use "bridged adapter" in the VM network settings, it avoids to use the NAT of VirtualBox which may be not in phase with the ip you want to set.
 
The name servers aren't on the same subnet as your inet ip/mask.
They don't have to. As long as they can be reached through routing it doesn't really matter where they are.
 
  1. 255.0.0.0 didn't work
  2. sorry its a typo and should be 10.169.213.139
  3. Yes, I've used a "bridged adapter"
 

Attachments

  • FreeBSD_vbox_settings.png
    FreeBSD_vbox_settings.png
    56 KB · Views: 44
Back
Top