dns/noip
If you don't have your own domain then contacting your computer remotely can be difficult. A common solution is to use a dynamic DNS service such as No-IP. This way you can always connect to your machine using the same hostname e.g. myserver.noip.me. This works by running a service on your computer that will check your external IP at a chosen interval. If it has changed then a message is sent to No-IP advising them, and the new IP address for myserver.noip.me is updated.
Even if you have your own domain, it is useful to use a service like No-IP as a backup.
If you haven't already created an account on No-IP, and set up at least one hostname, then head over to their sign-up page first before you install the port.
Then install dns/noip
either from packages or build it from the ports collection.
Run the following command to set up No-IP with your login and hostname details. I recommend you set the interval between external IP checks to 5 minutes in order to avoid long periods of time when your host is inaccessible.
# /usr/local/bin/noip2 -C
Next we change the ownership of the no-ip2.conf configuration file to the new noip user as it is currently owned by root, and the permissions are set to 600 (read/write by owner only).
# chown noip /usr/local/etc/no-ip2.conf
Now we add the noip service to /etc/rc.conf so that it starts every time the computer boots.
# service noip enable
And finally we start the service.
# service noip start