FreeBSD 下使用No-ip 讓浮動ip有固定網域名稱

使用no-ip是為了讓clover這種窮學生用浮動ip的網路的狀況下,可以透過

noip產生一個固定的domain name 用來架設ftp或是telnet、putty 遠端

登入方便使用。

首先 先到no-ip官網 開一個host 給freebsd用然後

  • 在 /usr/ports/dns/noip 下,執行, make install clean

###############################################
You need to generate the noip config file 'no-ip2.conf' in
/usr/local/etc/no-ip2.conf. To do this automatically, run:

make conf

You need to register with www.no-ip.com to use this port.
###############################################

  • 建立一個新檔案。
 vi /usr/local/etc/no-ip2.conf

  • 執行 make conf

出現以下畫面...

(cd /usr/local/etc && /usr/local/bin/noip2 -C)

Auto configuration for FreeBSD 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 xl0
1 tun0

  • 選擇 tuno

Please enter the login/email string for no-ip.com #輸入註冊信箱位置
Please enter the password for user 'xx@xx.xxx' #輸入註冊密碼

Only one host [你申請的host name] 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 '/usr/local/etc/no-ip2.conf' created.

/usr/sbin/chown noip:noip /usr/local/etc/no-ip2.conf
/bin/chmod 0600 /usr/local/etc/no-ip2.conf

  • 完成後,執行 /usr/local/bin/noip2

  • cd /etc/rc.d

  • vi rc.local

寫入 /usr/local/bin/noip2 存檔後離開

  • chmod 555 rc.local
  • /usr/local/bin/noip2 -S 看是否出現在你注冊的網址


這樣一來,每次開機,就可以自動取得動態 DNS 了!
文章來原:http://phorum.study-area.org/viewtopic.php?t=14022&highlight=no-ip


noip指令


USAGE: noip2 [ -C [ -F][ -Y][ -U #min]
[ -u username][ -p password][ -x progname]]
[ -c file][ -d][ -D pid][ -i addr][ -S][ -M][ -h]

Version FreeBSD-2.1.1
Options: -C create configuration data
-F force NAT off
-Y select all hosts/groups
-U minutes set update interval
-u username use supplied username
-p password use supplied password
-x executable use supplied executable
-c config_file use alternate data path
-d increase debug verbosity
-D processID toggle debug flag for PID
-i IPaddress use supplied address
-I interface use supplied interface
-S show configuration data
-M permit multiple instances
-K processID terminate instance PID
-h help (this text)

留言

這個網誌中的熱門文章

使用Sublime Text 來作為C/C++的IDE in Windows(2) ~G++ Compiler

使用Sublime Text 來作為C/C++的IDE in Windows(3) ~CTags

PCB專有名詞