Question

What are the resolv.conf statments for ipv6

Posted August 21, 2020 489 views
FreeBSD

I have freebsd 12.1 OS and I need the ipv6 ip addresses for resolc.conf.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

I’m running a FreeBSD-12.1 image, updated using freebsd-update to FreeBSD-13.0-RELEASE.

When I enabled ipv6 on the droplet, the service /usr/local/etc/rc.d/digitalocean was being run on startup which wiped the ipv4 and ipv6 in /etc/rc.conf every boot. To solve your problem, there are 2x steps you’ll need to do:

1) configure ipv4/ipv6 addresses, defaultroute, and if desired, aliases.
(you can get all of the network info from the network tab of your droplet in the UI)

# /etc/rc.conf

# default routes
defaultrouter="111.222.111.1"
ipv6_defaultrouter="2607:f0d0:1002:51::1"

# assign ip addresses
ifconfig_vtnet0="inet  111.222.111.33 netmask 255.255.240.0"
ifconfig_vtnet0_ipv6="inet6 2607:f0d0:1002:51::a001 prefixlen 64"
ipv6_activate_all_interfaces="yes"

test this before continuing:

sudo service netif restart
sudo service routing restart

2) disable the digitalocean service to prevent your config from being wiped every reboot.

# /etc/rc.conf

# digitalocean="YES"
# for me, disabling the service in rc.conf had no effect,
# so I renamed the service
mv /usr/local/etc/rc.d/digitalocean /usr/local/etc/rc.d/digitalocean.orig