انجمن‌های فارسی اوبونتو

کمک و پشتیبانی => شبکه و سرویس‌ دهنده‌ها => نویسنده: amin7x در 07 اردیبهشت 1396، 12:05 ب‌ظ

عنوان: مشکل ایجاد dns در اوبونتو
ارسال شده توسط: amin7x در 07 اردیبهشت 1396، 12:05 ب‌ظ
سلام و خسته نباشید.
من قصد دارم دامنه test.ir رو بر روی سرور مجازیم ست کنم.
۲ تا نیم سرور به آدرس های زیر به ایرنک دادم.

ns.tset.ir
ns2.test.ir

تنظیمات سرور رو هم بر اساس آموزش How To Configure Bind as an Authoritative-Only DNS Server on Ubuntu 14.04 رفتم جلو اما چون فقط یک سرور داشتم هر ۲ تا نیم سرور هارو یک آی پی تنظیم کردم. ولی متاسفانه توی سرور از وب سایت پینگ میگیرم اوکی هست ولی وقتی آدرس وب سایت رو توی کامپیوتر دکستاپ پینگ میگیرم با ارور Ping request could not find host test.ir. Please check the name and try again. مواجه میشم
تنظیماتم Bing9 به این صورته

فایل named.conf.local:
zone "test.ir" {
        type master;
        file "/etc/bind/zones/db.test.ir";
        allow-transfer { MY_PUBLIC_IP_ADDRESS; };
};

فایل named.conf.options:
options {
        directory "/var/cache/bind";

        recursion no;
        allow-transfer { none; };

        forwarders {
                8.8.8.8;
                8.8.4.4;
        };
       
        dnssec-validation auto;

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
};

فایل zone:

; BIND data file for local loopback interface
;
$TTL    604800
@       IN      SOA     ns.test.ir. info.test.ir. (
                              5         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;

; Name servers
test.ir.    IN      NS      ns.test.ir.
test.ir.    IN      NS      ns2.test.ir.

; A records for name servers
ns              IN      A       MY_PUBLIC_IP_ADDRESS
ns2             IN      A       MY_PUBLIC_IP_ADDRESS

; Other A records
@               IN      A       MY_PUBLIC_IP_ADDRESS
www             IN      A       MY_PUBLIC_IP_ADDRESS


فایل / etc / hosts :

127.0.0.1       localhost
MY_LOCAL_IP      VPS.site.com  VPS
MY_PUBLIC_IP_ADDRESS test.ir
MY_PUBLIC_IP_ADDRESS subdomain.test.ir
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters