--[[ ●DDNS 自動更新スクリプト【No-ip用】   pp のIPアドレスが更新されたらDDNSサービスに通知します。 <説明> ・No-IP の仕様は以下 http://www.noip.com/integrate/request ]] --------------------------## 設定値 ##-------------------------------- -- ユーザ名 username = "hogehoge@foo.com" -- パスワード password = "hoge" -- 更新するドメイン名(複数の場合は、カンマ区切り) hostname = "hoge.servehttp.com" -- IPアドレスの変更が無くても更新を行う時間(秒/86400秒 = 1日) timeout = 86400 -- 出力する SYSLOG のレベル(info, debug, notice) log_level = "info" -- 監視する pp 番号(1-) find_ppnum = 1 ----------------------## 設定値ここまで ##---------------------------- -- HTTP要求用のテーブル noipsend = { url = "http://dynupdate.no-ip.com/nic/update?hostname="..hostname, method = "GET", auth_type="basic", auth_name=username, auth_pass=password, } -- IPアドレスの更新と判断するログ find_message = "PP%["..string.format("%02d",find_ppnum).."%] PPP/IPCP up" ------------------------------------------------------------ -- メインルーチン -- ------------------------------------------------------------ local rtn, str, a, b, success while (true) do rtn = rt.httprequest(noipsend) -- 次回、実行待ち rtn,str = rt.syslogwatch(find_message, 1, timeout) end