IbzŪF¦A]wnFAѨMF{ѰfDAåB[]FӤH²𤧫A`Odzƭn}lӵLiJ Server []FIA[]BJ̭Aܭn@IOyzDW٥nb Internet WiHQdz~nIѺ¦ڭ̪DW](DΨLC)Ȼ{ IP AH IP OФOSΡAҥH~|HDW٨ӨN IPCLAzDW٭nQdߨ~ΰڡIoӮɭԡA@ӡyXkzDWٴNܭnFInXkDANon DNS tί䪺zDڡILApGڭ̪DOϥμo쪺Tw IP OHSӦpӽ DNS DW١HNonϥΰʺA DNS toIboӳ`Aڭ̥Dnb Client ݪ]wAӤOb]w DNS DI ^_^ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#!/bin/bash
# # History and lastlog #====================================================================== # Date Who What #====================================================================== # 2002/08/05 VBird Use the older scripts to modify and adding some # modules to fit everyone's needed. # 2002/11/14 VBird delet the integer type declare! # 2003/08/26 VBird [J iptables.rule 䴩I # sg function ҦI ####################################################################### #====================== INPUT SESSION ================================= # 1. пJzb http://www.adsldns.org ӽШ쪺bKXPDW password="your.password" email="your.email" hostname="your.host.name" # 2. method
пJzsW Internet k, adsl P cable
# 3. o̽пJzntzHHXh
E-Mail
# 4. zm{ؿ
# 5. What jobs
is your needed?
#######################################################################
# 2. Detect
the old IP file
#######################################################################
# UoӨƦbs
IP O_ۦPIH
# oӨƦbN
IP }Hz
# oӨƦbs
DNS t
# oӨƦbs
# oӨƨoz
DNS DWP IP O_ۦPI
#
# 2. compare with older IP and newer IP. And e-mail to you
#======================
EMAIL and UPDATE SESSION job 2 ================
# 2. compare with older IP and newer IP. And e-mail to you
# 3. check if the DNS name == newip
#======================
SHARE IP MECHANIME job 3 ======================
# 2. compare with older IP and newer IP. And e-mail to you
# 3. check if the DNS name == newip
|
1. U script
òʨAؿG
[root@test root]# wget http://vbird.org.cn/download/vbird/ping_net_card.sh [root@test root]# mkdir -p /usr/local/pingcard [root@test root]# cp ping_net_card.sh /usr/local/pingcard [root@test root]# chmod 744 /usr/local/pingcard/ping_net_card.sh [root@test root]# vi /usr/local/pingcard/ping_net_card.sh # oӮɭԶiJ vi eAШ̷ӱzݨDӭק INPUT I @ 2. ק crontab [root@test root]# vi /etc/crontab # ....sW[@G */3 * * * * root /usr/local/pingcard/ping_net_card.sh |
0. UɮסG
[root@test root]# wget http://www.no-ip.com/client/linux/noip-2.0.12.tar.gz # Ϊ̨쳾U [root@test root]# wget http://vbird.org.cn/download/linux_server/noip-2.0.12.tar.gz @ 1. YåBsĶΦw [root@test root]# cd /usr/local/src [root@test src]# tar -zxvf /root/noip-2.0.12.tar.gz [root@test src]# cd noip-2.0.12 # `N@UAoӥؿ̭ɦW README.FIRST ɮסAаȥݤ@UeI [root@test noip-2.0.12]# make && make install # o˷|ND{w˦b /usr/local/bin/noip2 ӥDѼɩb # /usr/local/etc/no-ip2.conf I @ Auto configuration for Linux 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 eth0 1 ppp0 1 <==o̽пJzOϥΨ@Ӥs Internet H Please enter the login/email string for no-ip.com kiki@yahoo.com.tw Please enter the password for user 'kiki@yahoo.com.tw' ************ @ Only one host [kiki.no-ip.org] is registered to this account. It will be used. Do you wish to run something at successful update?[N] (y/N) n @ New configuration file '/tmp/no-ip2.conf' created. @ mv /tmp/no-ip2.conf /usr/local/etc/no-ip2.conf @ [root@test noip-2.0.12]# /usr/local/bin/noip2 # o˴NiHz noip2 ۰ʪszoI ^_^ @ 3. noip2 yk² [root@test root]# noip2 [-CS] ѼƻG -C Gs]wѼơAY]wڭ̤WJrNNI @@ pGzӥHW no-ip DWٮɡAN@wݭnϥ noip2 -C ӭs]wѼɮסI -S GNثe noip2 pܥXӡI pG[ѼơANON noip2 `nbO̭oI(ܦ daemon oI) dҡG [root@test root]# noip2 -S Process 32632, started as /usr/local/src/noip-2.0.12/noip2 Using configuration from /usr/local/etc/no-ip2.conf Last IP Address set 140.116.142.213 Account kiki@yahoo.com.tw configured for: host kiki.no-ip.org Address check every 1 minute, directly connected via /dev/ppp0. # @IWܪNOzUɪ@ǬTI @ 4. ]w}ɱҰ noip2 [root@test root]# vi /etc/rc.d/rc.local # [JUo@G /usr/local/bin/noip2 |