2017年4月18日火曜日

ダイナミックDNSについて

FreeBSDが動作するあるサーバーで、So-netのダイナミックDNSサービスであるルータ接続IDサービスを利用していました。ところが、これが2017年の8月で終了になるようです。
ルータ接続IDサービス サービス終了のお知らせ
http://www.so-net.ne.jp/info/2017/op20170317_0019.html


1.提供終了サービス
   ルータ接続IDサービス

2.サービス新規受付停止日
   2017年3月30日 15時

3.サービス提供終了日
   2017年8月31日
外部からアクセスする必要があるサーバーなので、代替のサービスが必要です。「FreeBSD ダイナミックDNS」で探してみたところ、次のWWWページを見つけました
noipのインストールと設定
http://freebsdnotesandtips.blogspot.jp/2014/07/noip.html
NO-IPはnoipというFreeBSD向けのクライアントがあるようです。なのでこれを使ってみることにしました。

まずはNO-IPのアカウントを作成して、ホスト名を割り当てます(よくあるメールアドレスとパスワード、そしてサービスにログインして設定というタイプです)。
次にnoipクライアントのインストールをします。これは上記のWWWページのようにすればできてしまいました。
「最後の設定ファイルを作っておけ」は私の場合は不要で、make confで必要な情報、ユーザーIDとパスワードなどを入れていけば、設定ファイルが生成されました。
# cd /usr/ports/dns/noip
# 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       bge0
1       usbus0
2       usbus1
3       usbus2
4       usbus3
5       usbus4
6       usbus5
7       lo0
0      
Please enter the login/email string for no-ip.com  xxx.yyyyy@example.com
Please enter the password for user 'xxx.yyyyy@example.com'  ***********

Only one host [sakashita.ddns.net] is registered to this account.
It will be used.
Please enter an update interval:[30] 
Do you wish to run something at successful update?[N] (y/N)  ^M

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
# /usr/local/etc/rc.d/noip status
noip is not running.
# /usr/local/etc/rc.d/noip start
Starting noip.
# /usr/local/etc/rc.d/noip status
noip is running as pid 495.
#