Providing Internet Access to Network Services

FreeBSD is more often used as a server than a desktop system, so not surprisingly it is very useful for running a number of network services. However, unless you have purchased a static IP address from your Internet Service Provider, you will run into difficulty trying to share these services with other computers over the Internet. Fortunately, there is a free service called noip which allows one to serve other clients over the Internet, even though one has a dynamic IP address. In and of itself noip won't be an extremely useful tool, but in conjunction with the other networking pages it should be a powerful addition to your configuration.

In order to allow users from outside of our lan to use the ftp, we'll need to setup noip. First go to www.no-ip.info and register an account for free. Once you login you will need to add a host, which will serve as the Internet address that other clients will be able to connect to you at. You will need to make a unique choice for the first part of the hostname, and then choose one of the provided default endings, such as no-ip.info. Thus, if you typed in xaenn, for example, and used no-ip.info, then clients would connect to you at xaenn.no-ip.info. Once you've added a host you are ready to start configuring noip on your FreeBSD system.

cd /usr/ports/dns/noip
make install clean

Now we need to setup the configuration, by using the following commands

make conf

bsd# make conf
(cd /usr/local/etc && /usr/local/bin/noip2 -C)

Auto configuration for FreeBSD client of no-ip.com.

Multiple network devices have been detected.

Please select the Internet interface from this list.

By typing the number associated with it.
0       rl0
1       plip0

You should be able to recognize your network interface, in my case it is rl0, so I choose '0'.

Please enter the login/email string for no-ip.com user@name.com
Please enter the password for user 'user@name.com' ***********

Enter the email address that you used for your no-ip account, and the corresponding password.

Only one host [username.no-ip.info] is registered to this account.
It will be used.
Please enter an update interval:[30]

If you have multiple accounts you will have to choose one. Otherwise, it will choose for you, like in my case. Hit 'enter' to take the default interval of 30 minutes. It should be sufficient.

Do you wish to run something at successful update?[N] (y/N) N

It is not necessary to run anything on successful update.

New configuration file '/usr/local/etc/no-ip2.conf' created.

/usr/sbin/chown noip:noip /usr/local/etc/no-ip2.conf
/bin/chmod 0600 /usr/local/etc/no-ip2.conf

Now that noip is configured, we just need to add the following line to /etc/rc.conf

noip_enable="YES"

This will set noip to run at startup, automatically updating our dynamic ip address to keep our hostname linked to our current ip address.