Solved 12.1-STABLE on OVH VPS unable to connect to the internet - NIC appears configured, ping and ping6 return "no route to host"

I've recently installed the raw virtual image of FreeBSD 12.1-STABLE onto a VPS provided through OVH. I'm able to login via the KVM on my control panel, but the machine is unreachable by SSH. It turns out that's because the machine isn't able to connect to the internet.

I'm able to ping the interface vtnet0 at its given IPv4 address, but # ping 8.8.8.8 or any # ping6 returns some form of "no route to host".

Here is the output for # ifconfig:
ifconfig_output.png


And here is the output of # netstat -rn:
netstat_output.png


And here's the content of /etc/rc.conf:
rc.conf.png


Section 11.5 of the handbook has led me to believe that the NIC is configured, but at this point I'm not really sure what to change or investigate to get online. Any guidance is appreciated.
 
I'm able to ping the interface vtnet0 at its given IPv4 address, but # ping 8.8.8.8 or any # ping6 returns some form of "no route to host".
You have no default gateway. Note that IPv6 doesn't work at all, you don't have a global IPv6 address, only a link-local.
 
  • Like
Reactions: del
If I remember correctly OVH did something weird with the gateway address. It provides an address that's not in the network range you're being assigned. FreeBSD really doesn't like that. Which might explain why your default gateway isn't set by DHCP.
 
  • Thanks
Reactions: del
You are correct, Sir. How I resolved this was by first re-installing Debian on the VPS, running

Code:
# apt install network-manager
# nmcli device show ${INTERFACE_NAME}

to get all of the necessary info about the VPS's default network configuration, then reinstalled FreeBSD on the server and altered my /etc/rc.conf to look like
Code:
ifconfig_vtnet0="inet $EXTERNAL_IPv4 netmask 255.255.255.255 broadcast $EXTERNAL_IPv4"
static_routes="net1 net2"
route_net1="$GATEWAY_IPv4 -interface vtnet0"
route_net2="default $GATEWAY_IPv4 "
ifconfig_vtnet0_ipv6="inet6 $EXTERNAL_IPv6 prefixlen 64"
ipv6_defaultrouter="$GATEWAY_IPv6"

I'm able to ping a nameserver and ssh into the machine now. Thanks! I'd also like to lend credit to Tim Chase, I used his blog and this article a lot in trying to figure out how to make my server run FreeBSD. The rc file above is a copy of Tim's own basic networking configuration.
 
Back
Top