看板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