$2.5/mo Vultr cloud server with FreeBSD and ipv6 DDNS

Recently I need a low cost and stable (I choose FreeBSD for the stability) cloud server instance. Vultr‘s $2.5/mo plan is the one I found the cheapest with one click FreeBSD deployment.

However, the $2.5/mo plan is not only limited to their New York/Atlanta servers but also restricted to IPv6 accessibility. Your time are probably worth more than $1/mo obtaining an IPv4 address. Even so, I tried and noted the steps in this article.

Check if you have IPv6 access or not

You can visit https://ipv6-test.com to test your network. If you don’t have IPv6 access, you can’t connect to the to be created IPv6-only VM instance. If so, you should stop here until you have your IPv6 connectivity available.

One click deployment

  1. register a Vultr account and sign in.
  2. choose server – choose Cloud Compute
  3. Server location – choose New York (NJ) or Atlanta
  4. Server type – I chose FreeBSD 12.1 X64
  5. Server size – 10GB $2.5/mo IPv6 only
  6. SSH KEYS – I had input my public key but it didn’t setup a user account with ssh key login like what Google Cloud Platform does. Therefore, you may skip this.
  7. Click Deploy Now.

Then you can login your VM instance via the link on the upper right corner of your server information page. The account is root with a random generated default password.

Setup user account

Add a new user (example from FreeBSD online handbook)

# adduser
Username: jru
Full name: J. Random User
Uid (Leave empty for default):
Login group [jru]:
Login group is jru. Invite jru into other groups? []: wheel
Login class [default]:
Shell (sh csh tcsh zsh nologin) [sh]: zsh
Home directory [/home/jru]:
Home directory permissions (Leave empty for default):
Use password-based authentication? [yes]:
Use an empty password? (yes/no) [no]:
Use a random password? (yes/no) [no]:
Enter password:
Enter password again:
Lock out the account after creation? [no]:
Username   : jru
Password   : ****
Full Name  : J. Random User
Uid        : 1001
Class      :
Groups     : jru wheel
Home       : /home/jru
Shell      : /usr/local/bin/zsh
Locked     : no
OK? (yes/no): yes
adduser: INFO: Successfully added (jru) to the user database.
Add another user? (yes/no): no

Install sudo if you’re used to it. Remember to use visudo to include wheel group or your administrator account.

# pkg install sudo
# visudo
## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL) ALL
## Same thing without a password

For DDNS service, use dynv6.com, which supports IPv6 assignment and IPv6 update client

Free plans of many popular DDNS services like noip.com don’t have full support of IPv6 assignment and IPv6 update client together. Fortunately, https://dynv6.com does. Just visit it and register a free hostname.

Install the cron job to automatically update your IPv6 ip on dynv6.com

Notice that I already switched to my user account rather than root

Install curl

$ sudo pkg install curl

Install cron job

$ crontab -e
*/5 * * * * /usr/local/bin/curl "https://dynv6.com/api/update?hostname=YOUR_DYNV6_HOSTNAME&token=YOUR_DYNV6_ACCESS_TOKEN&ipv6=auto&ipv6prefix=auto"

– MAILTO=”” for avoiding from system mails’ bombarding.
– */5 means updating per 5 minutes, please read FreeBSD online handbook for more information.
– See dynv6.com API doc for their IP update APIs. Maybe you would like to use their SSH API for further security concern.

That’s it. Now you should be able to access your FreeBSD VM via your DDNS domain after the first cron update!

Leave a Reply