Fedora36: Domain settings

(If you cannot use DiCE, please see here.Common Settings: Domain Settings

[root@www ~]# dnf -y install wget
[root@www ~]# dnf -y install glibc

Download DiCE and unzip it.

[root@www ~]# cd /usr/local/bin
[root@www bin]# wget https://rcg.jp/download/DiCE.tar.gz
[root@www bin]# tar xzvf DiCE.tar.gz
[root@www bin]# rm -f DiCE.tar.gz
[root@www bin]# cd

DiCE settings.

Install the library.

[root@www ~]# dnf install ld-linux.so.2

Reply with ‘y’.

Is this ok [y/d/N]: y

Change the character code to “EUC-JP”.

Select “Setup” → “Terminal”.


Change “Kanji(receive)” and “Kanji(transmit)” to EUC and click “OK”.



[root@www ~]# setarch `uname -m` /usr/local/bin/DiCE/diced
=-=-=- DiCE DynamicDNS Client -=-=-=
Version 0.19 for Japanese
Copyright(c) 2001 sarad

Please specify how to detect the IP address
(0) 自動検出 Auto detect (1) ローカルのネットワークアダプタから検出 Detected from local network adapter (2) 外部のスクリプトから検出 Detection from an external script <現在:0> <Current: 0> (N)変更しない Do not change (P)戻る Return >2 ------------------------------------------------- スクリプトのURLを入力してください
Enter script URL
<現在:> <Current: No> (N)変更しない Do not change (P)戻る Return >http://dyn.value-domain.com/cgi-bin/dyn.fcg? ------------------------------------------------- プライベートIPアドレスも検出対象ですか?
Are private IP addresses also subject to detection?
(Y/N) <現在:いいえ> <Current: No> (P)戻る Return >N ------------------------------------------------- IPアドレスの検出をテストしますか?
Do you want to test IP address detection?
(Y/N) (P)戻る >Y 検出IPアドレス>***.***.***.***
Click here to check if the above detection IP address is not displayed.
Confirm IP address
------------------------------------------------- IPアドレスの検出をテストしますか?
Do you want to test IP address detection?
(Y/N) (P)戻る >N ------------------------------------------------- IPアドレスをチェックする間隔を指定してください(分)
Specify the interval for checking IP addresses (minutes)
設定可能範囲は5分以上です The settable range is 5 minutes or more. <現在:60> <Current: 60> (N)変更しない Do not change (P)戻る Return >5 ================================================= DNSサーバーの負荷を軽減するために頻繁なDNS更新を防ぐ必要があります 前回の更新から一定時間DNS更新処理を行わないように保護時間を設定して ください(分) 設定可能範囲は10分から1440分です
Frequent DNS updates should be prevented to reduce load on DNS servers Set the protection time to prevent DNS update processing for a certain period of time from the last update (minutes) The configurable range is 10 minutes to 1440 minutes.
<現在:60> <Current: 60> (N)変更しない Do not change (P)戻る Return >10 ================================================= 設定を保存しますか?
Save settings?
(Y/N) (P)戻る >Y 設定を保存しました
I saved the setting

Added DiCE events.

Set according to the domain (VALUE DOMAIN).


Add new event
Enter the DynamicDNS service name List supported services with "?"
(P)戻る Return >? ZENNO.COM livedoor MyDNS.JP pcc.jp JPN.ch MyIP.US @nifty StaticCling MyServer ddns.ca p2p did.expoze.com Dynamx WebReactor unicc Earth DNS2Go instat Now.nu dynDNS.it onamae.com DION ODN RegisterFly DHS Netservers todd USA cjb Dyn.ee BIGLOBE dnip 3domain miniDNS my-domain ZoneEdit ZiVE yi ysdn theBBS SelfHOsT ddo.jp No-IP nicolas eNom CyberGate EveryDNS Microtech ieServer HAMMERNODE GetmyIP Dynup Dynu dyns DynDSL DynDNSdk dyndns DtDNS dnsQ dhs DDNS.nu cheapnet changeIP ARTofDNS VALUEDOMAIN ODS JSPEED IPDYN DnsTokyo ================================================= 新しくイベントを追加します ホスト名を入力してください
Add new event Please enter a host name
(P)戻る Return >VALUEDOMAIN ================================================= ドメイン名を入力してください "?"でドメイン一覧を表示します
Please enter your domain name Display domain list with "?"
(P)戻る >Domain name ================================================= ホスト名を入力してください
Please enter a host name
(P)戻る Return >* ================================================= ログインユーザ名を入力してください
Please enter your login username
(P)戻る Return > ================================================= ログインパスワードを入力してください
Please enter your login password
(P)戻る Return >Login password ================================================= 登録するIPアドレスを入力してください 空白にすると現在のIPアドレスを自動検出します
Please enter the IP address to register Leave blank to auto detect current IP address
(P)戻る Return > ================================================= このイベントに題名を付けてください
Please give this event a title
(P)戻る Return >VALUEDOMAIN-ドメイン名 このイベントを実行するスケジュールを設定します ------------------------------------------------- 実行する頻度を指定してください (番号入力)
Set a schedule to run this event ------------------------------------------------- Specify how often to run (enter number)
(0)1回のみ Only once (1)1日1回 Once a day (2)1週間に1回 Once a week (3)1ヵ月に1回 Once a month (4)その他の周期 Other cycles (5)IPアドレス変化時 When IP address changes (6)起動時 Startup (P)戻る Return >4 ------------------------------------------------- 実行する周期を指定してください
Please specify the cycle to run
<現在:9> <Current: 9> (0)3分毎 Every 3 minutes (1)5分毎 Every 5 minutes (2)10分毎 Every 10 minutes (3)30分毎 Every 30 minutes (4)1時間毎 Every hour (5)2時間毎 Every 2 hours (6)6時間毎 Every 6 hours (7)12時間毎 Every 12 hours (8)24時間毎 Every 24 hours (9)7日毎 Every 7 days (10)14日毎 Every 14 days (11)21日毎 Every 21 days (12)28日毎 Every 28 days (13)35日毎 Every 35 days (14)56日毎 Every 56 days (15)84日毎 Every 84 days (N)変更しない Do not change (P)戻る Return >0 ================================================= ================================================= このイベントを有効にしますか?
Enable this event?
(Y/N) (イベントの有効/無効は"EN/DIS"コマンドで切替えられます) (Event enable/disable can be switched by "EN/DIS" command) >Y ================================================= イベントを保存しますか?
Save event?
(Y/N) >Y イベント"VALUE-DOMAIN-server.jp"を保存しました Saved event "VALUE-DOMAIN-server.jp" ================================================= :

Activate transfer and exit.

:ex 0
+ 4/8 17:00 にVALUEDOMAIN-server.jpが実行されました VALUEDOMAIN-server.jp was executed on 4/8 17:00
  IPアドレスを更新しました Updated IP address

Change “Kanji(receive)” and “Kanji(transmit)” to UTF-8 and click “OK”.




[root@www ~]# vi /usr/local/bin/update_ip_script.sh

# Store your domain, password, hostname, and current IP address in variables

# Store URLs and values in variables
NS_SERVER="ns1.value-domain.com"  # Store the DNS server address


if [ "${HOST}" = "" ]; then

# Error Messages
ERROR_MSG_VDIP="Error detecting IP address configured in VALUE-DOMAIN settings"
ERROR_MSG_CURRENTIP="Error detecting current IP address"
UPDATE_SUCCESS_MSG="IP address update successful"
UPDATE_ERROR_MSG="IP address update error"
EMAIL_SUBJECT="IP address update error"

# Obtain IP address configured in VALUE-DOMAIN settings
IPGETLOG=`host ${FQDN} ${NS_SERVER} 2>&1`
VDIP=`echo "${IPGETLOG}" | grep "has address" | awk '{ print $NF }' | egrep ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$`
if [ $? -ne 0 ]; then
    echo "${FQDN} ${ERROR_MSG_VDIP}" | logger -t $(basename $0)
    echo ${IPGETLOG} | logger -t $(basename $0)

# Obtain current IP address
IPGETLOG=`curl "${IPINFO_URL}" 2>&1`
echo "${IPGETLOG}" | egrep ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ > /dev/null 2>&1
if [ $? -eq 0 ]; then
    CURRENTIP=`echo "${IPGETLOG}" | tail -n 1 | awk '{ print $NF }'`
    echo "${DOMAIN} ${ERROR_MSG_CURRENTIP}" | logger -t $(basename $0)
    echo "${IPGETLOG}" | logger -t $(basename $0)

# Create URL query parameters

# Combine with the base URL for VALUE-DOMAIN update

# Update VALUE-DOMAIN configured IP address
# (Only if VALUE-DOMAIN configured IP address is different from current IP address)
if [ "${VDIP}" != "${CURRENTIP}" ]; then
    IPUPDATE=`wget -q -O - "${VD_UPDATE_URL}"`
    echo ${IPUPDATE} | grep -q OK
    if [ $? -eq 0 ]; then
        echo "${FQDN} ${UPDATE_SUCCESS_MSG} ${VDIP} to ${CURRENTIP}" | logger -t $(basename $0)
        echo "${FQDN} ${UPDATE_ERROR_MSG}" | logger -t $(basename $0)
        echo ${IPUPDATE} | logger -t $(basename $0)
        echo ${UPDATE_ERROR_MSG}
        echo ${IPUPDATE}
        ) | mail -s "${SCRIPT##*/}${EMAIL_SUBJECT}" root
        exit 1


[root@www ~]# chmod +x /usr/local/bin/update_ip_script.sh


[root@www ~]# /usr/local/bin/update_ip_script.sh ドメイン パスワード "*"


[root@www ~]# vi /etc/cron.d/ddns-update
*/3 * * * * root /usr/local/bin/update_ip_script.sh ドメイン パスワード "*"