亚洲国产成人精品在线播放_日韩第一页在线观看_人人插人人摸精品在线视频_日韩黄色成人电影_国产人成无码视频在线观看_国产91热爆ts人妖系列_免费观看欧美一级_午夜影院操一操黄片_午夜大片免费爽爽爽影院_日本少妇中文三级

聯(lián)系我們

公司地址: 上海市滬宜公路1188號(hào)4號(hào)樓
     一層
聯(lián)系電話:021-31080981
電子郵箱:soline@soline.com.cn
郵政編碼:201802

linux下創(chuàng)建DDNS服務(wù)器

linux下創(chuàng)建DDNS服務(wù)器 1、先創(chuàng)建一個(gè)用戶myddns #useradd myddns 2、生成密碼 #dnssec-keygen -a HMAC-MD5 -b 128 -n USER myddns 在當(dāng)前目錄下生成了兩個(gè)文件: Kmyddns.+157+59363.key Kmyddns.+157+59363.private 3、配置DNS #vi /etc/named.conf 添加以下內(nèi)容: key myddns { algorithm HMAC-MD5.SIG-ALG.REG.INT; secret xEGzMJVu7aT81lC5QRzIg==; }; 其中secrect后的內(nèi)容是用vi打開(kāi)Kmyddns.+157+59363.private后,拷貝里面的密碼文件得來(lái)的! 4、配置DHCP #vi /etc/dhcpd.conf 先將第二行前面的“#”去掉,再在subnet 上面添加下面一行內(nèi)容: ddns-updates on; 在option domain-name 后,改成DNS的域名,例如“sunman.com” 在option domain-name-servers 后,填寫(xiě)好DNS服務(wù)器的IP地址,例如:192.168.1.112 然后在里面添加下面幾行內(nèi)容: key myddns { algorithm HMAC-MD5.SIG-ALG.REG.INT; secret xEGzMJVu7aT81lC5QRzIg==; } zone sunman.com. { primary 192.168.1.2; key myddns; } zone 1.168.192.in-addr.arpa. { primary 192.168.1.2; key myddns; } 保存退出! 5、開(kāi)啟DNS和DHCP服務(wù)器 #service named start #service dhcpd start 6、通過(guò)下面的命令排錯(cuò) #tail -n 20 /var/log/messages | grep named (指定顯示靠后的20行內(nèi)容) #tail /var/log/messages | grep dhcpd (全部顯示所有內(nèi)容) 7、linux客戶端通過(guò)dhclient命令動(dòng)態(tài)獲取到IP,這時(shí)在DNS服務(wù)器的/var/named/chroot/var/named/下會(huì)生成兩個(gè)擴(kuò)展名是.jnl的文件。 還有一點(diǎn)要注意,linux客戶端還必須執(zhí)行下面的工作 #cp /usr/share/doc/dhclient-3.0pl2/dhclient.conf.sample /etc/dhclient.conf 生成一個(gè)dhclient.conf配置文件 #vi /etc/dhclient.conf 修改第一行內(nèi)容,將雙引號(hào)里的內(nèi)容刪掉,添加上自己的主機(jī)名。 最后再執(zhí)行dhclient命令來(lái)獲取IP。 /etc/named.conf文件內(nèi)容: options { directory "/var/named"; listen-on ports 53 { 127.0.0.1; 192.168.1.112; }; forward first; forwarders {202.38.64.1;202.96.199.133;}; }; zone "." IN { type hint; file "named.ca"; }; zone "localhost" IN { type master; file "localhost.zone"; }; zone "0.0.127.in-addr.arpa" IN { type master; file "localhost.arpa"; }; key myddns { algorithm HMAC-MD5.SIG-ALG.REG.INT; secret xEGzMJVu7aT81lC5QRzIg==; }; zone "sunman.com" IN { type master; file "sunman.zone"; allow-update { key myddns; }; }; zone "1.168.192.in-addr.arpa" IN { type master; file "sunman.arpa"; allow-update { key myddns; }; }; key "rndc-key" { algorithm hmac-md5; secret "pq18UO7rODLStf5XVdg17Q=="; }; controls { inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { "rndc-key"; }; }; /etc/dhcpd.conf配置文件內(nèi)容: ddns-update-style interim; #ignore client-updates; ddns-updates on; subnet 192.168.1.0 netmask 255.255.255.0 { # --- default gateway option routers 192.168.1.1; option subnet-mask 255.255.255.0; option nis-domain "domain.org"; option domain-name "sunman.com"; option domain-name-servers 192.168.1.112; option time-offset -18000; # Eastern Standard Time # option ntp-servers 192.168.1.1; # option netbios-name-servers 192.168.1.1; # --- Selects point-to-point node (default is hybrid). Don't change this unless # -- you understand Netbios very well # option netbios-node-type 2; range 192.168.1.128 192.168.1.255; range 192.168.1.10 192.168.1.100; default-lease-time 21600; max-lease-time 43200; # we want the nameserver to appear at a fixed address host ns { next-server marvin.redhat.com; hardware ethernet 12:34:56:78:AB:CD; fixed-address 207.175.42.254; } } key myddns { algorithm HMAC-MD5.SIG-ALG.REG.INT; secret xEGzMJVu7aT81lC5QRzIg==; } zone sunman.com. { primary 192.168.1.2; key myddns; } zone 1.168.192.in-addr.arpa. { primary 192.168.1.2; key myddns; }