Question

Setting in FreeBSD 11.1 /etc/rc.conf getting reset

I have been having an issue where my settings in the /etc/rc.conf file are getting reset. Namely my ip configurations are being blanked out. When that happens and I reboot, I have no connectivity and must restore through the console. I then restore the rc.conf from backup. But then it blanks out again.

The file currently contains:

hostname=""

# DigitalOcean Dynamic Configuration lines and the immediate line below it,
# are removed each boot. Hostname is set each boot.

# DigitalOcean Dynamic Configuration
defaultrouter=""
# DigitalOcean Dynamic Configuration
ifconfig_vtnet0="inet  netmask "
# DigitalOcean Dynamic Configuration
ifconfig_vtnet0_alias0="inet  netmask "
# DigitalOcean Dynamic Configuration
ifconfig_vtnet1="inet  netmask "
# DigitalOcean Dynamic Configuration
ifconfig_vtnet0_ipv6="inet6  prefixlen "
# DigitalOcean Dynamic Configuration
ipv6_defaultrouter=""
# DigitalOcean Dynamic Configuration
ipv6_activate_all_interfaces="yes"

I have considered making the rc.conf file read only, but I’d rather fix the root problem. Anyone have any insights?


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.

Take a look at:

/usr/local/etc/rc.d/digitalocean

On boot up, this script sets the network information based on your droplet’s configuration. If you want to keep the network settings static, this script can be removed.

I noticed this doesn’t seem to cater for floating IP addresses. Is there any solution on that