首先安裝ddclient,然後檢查/dev/default/ddclient,我的config如下:
# Set to "true" if ddclient should be run every time a new ppp connection is
# established. This might be useful, if you are using dial-on-demand.
run_ipup="false"
# Set to "true" if ddclient should run in daemon mode
# If this is changed to true, run_ipup must be set to false.
run_daemon="true"
# Set the time interval between the updates of the dynamic DNS name in seconds.
# This option only takes effect if the ddclient runs in daemon mode.
daemon_interval="3000"
最後一個參數設定你要多久檢查一次。
然後編輯/etc/ddclient.conf,我的config如下:
protocol=dyndns2
use=web, web=checkip.dyndns.com, web-skip='IP Address'
server=members.dyndns.com
login=帳號
password='你的密碼'
DNS代稱.selfip.org
以上只有斜體字要視情況修改,另外之前安裝ddclient的時候也有問一些問題,
基本上就是記錄在這裡,不過我覺得很奇怪的是,原本server的部份是叫做
members.dyndns.org,可是這個位址我怎麼找都找不到、也連不上。
後來突發奇想,把org改成com就可以了...這...
如果改完以後想馬上知道結果,就把/etc/default/ddclient的時間改短一點,最短好像也是一分鐘。
然後先關閉ddclient:sudo /etc/init.d/ddclient stop,這時候記得去把快取檔案刪除:
sudo rm -rf /var/cache/ddclient/ddclient.cache
再把ddclient打開即可:sudo /etc/init.d/ddclient restart
或者先用ddclient -daemon=0 -verbose來檢查一下是否正常。
為了避免以後重灌又忘記,特此一留。
沒有留言:
張貼留言