2011年3月1日 星期二

Linux使用no-ip固定動態ip

 


轉:
http://4271569.spaces.live.com/blog/cns!F1EA4F91324DA556!762.entry
http://blog.xuite.net/neutrogena/DCWen/21562243


 


下載no-ip的Linux客戶端:http://www.no-ip.com/downloads.php


 




 


 


tar -zxvf /xxxxx/noip-duc-linux.tar.gz  //從你存放壓縮檔的目錄解壓

cd /noip-2.1.9-1 //移動至no-ip目錄下


less README.FIRST //看 README.FIRST 檔案內容說明 ( 提到將 noip2-Linux 檔案, 另存成 noip2 )


cp binaries/noip2-Linux noip2  <-- 複製 noip2-Linux 檔案, 另存成 noip2


 




make

make install  //安裝DNS Updata


Please select the Internet interface from this list.

By typing the number associated with it.
0       eth0
1       ppp0
1  <-- 因使用撥接上網 ppp0, 所以選擇 1

  

** 設定於 no-ip 註冊時的帳號及密螞

Please enter the login/email string for no-ip.com  xxxx@gmail.com  <-- 輸入在 no-ip 註冊時的帳號
Please enter the password for user 'xxxx@gmail.com' *****  <-- 輸入在 no-ip 註冊時的密碼

 

Only one host [****.no-ip.biz] is registered to this account.
It will be used.
Do you wish to run something at successful update?[N] (y/N) n

mv /tmp/no-ip2.conf /usr/local/etc/no-ip2.conf  <-- 剛剛所做的設定, 將放在 no-ip2.conf 檔案中

 

 

 

** 啟動 no-ip client ( 動態 IP 對應主機名稱 )

** 將撥接上網的電腦動態 IP, 與在 no-ip 註冊的主機名稱, 做 DNS 的對應

# /usr/local/bin/noip2

 

 

 

** 設定每次開機就啟動 no-ip client

# vi /etc/rc.d/rc.local

 增加以下:

/usr/local/bin/noip2

 

 

 

** noip2 指令的使用

# noip2 [-參數]

參數:
C:重新設定參數。若有兩個以上的 no-ip 主機名稱時,就需使用 noip2 -C 來重新設定參數檔案!
S:將目前 noip2 的狀況顯示出來!





沒有留言:

張貼留言