看板SetupBBS
標 題[Doc]ddclient-3.6.3 IN FreeBSD
發信站卡布奇諾 (Wed Aug 6 19:03:39 2003)
轉信站ptt!ctu-reader!ctu-peer!news.nctu!news.cis.nctu!news.cs.nthu!wfcbbs
1.請先安裝Perl主程式,不用安裝其它任何模組(module)
2.請先到http.dyndns.org註冊自已的帳號,與想要的DNS。
3.如有錯誤,請更正,謝謝。
4.測試成功平台FreeBSD 4.7R、ddclient-3.6.3
tar xvzf ddclient-3.6.3.tar.gz
#cd ddclient-3.6.3
#cp ddclient /usr/sbin/ # 注意:這裡是ddclient-3.6.3 目錄下的 ddclient
#vi /usr/sbin/ddclient
找出get_ip
$reply = `ifconfig $arg 2> /dev/null`; # 1554行
修改成
$reply = `/usr/sbin/showip.sh`;
# vi /usr/sbin/showip.sh
--------------------------------------------------
#!/bin/csh
echo `ifconfig tun0 | grep netmask | awk '{print $2 # 這裡請與下一行連成一行
}'` | awk '{n=0; do {n++} while ($n != ""); print$(n-1)}'
--------------------------------------------------
#chmod 755 /usr/sbin/showip.sh
#黃色部分為要修改的地方。
#cp sample-etc_ddclient.conf /etc/ddclient.conf
#vi ddclient.conf
use=if, if=
tun0 # 46行Interface代號
login=
帳號 # 54行 記得修改完要把 # 字號拿掉
password=
密碼
server=members.dyndns.org, # 65行
protocol=dyndns2
帳號.ath.cx # 改成你申請的DNS
#chmod 700 ddclient.conf
#cp sample-etc_rc.d_init.d_ddclient /usr/local/etc/rc.d/ddclient.sh
#chmod 755 ddclient.sh
#./ddclient.sh start
#vi /etc/rc.local
加入此行 /usr/local/etc/rc.d/ddclient.sh start # 開機自動執行
--
╭──╮╮ ╮╭ ╭╭──╮
→├──╮│ ││ │╭──┤
←
╰──╯╰─╰╯─╯╰──╯
--
※ Origin: 吳鳳技術學院 卡布奇諾 <bbs.wfc.edu.tw>
◆ From: 61-217-234-86.HINET-IP.hinet.net