What are the resolv.conf statments for ipv6

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

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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

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

test this before continuing:

sudo service netif restart
sudo service routing restart
  1. 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