با سلام و احترام
بنده برای راه اندازی GEO DNS Server بوسیله bind9 بر روی سرور Ubuntu به نحو زیر عمل کردم .
1 - نصب bind9
2 - تغییر فایل :
sudo vi etcdefault/bind9
# run resolvconf? RESOLVCONF=no # startup options for the server OPTIONS="-4 -u bind"
3 - تغییر فایل :
etcbind/named.conf.options
acl "trusted" { 192.168.1.88/29; # Test }; options { directory "/var/cache/bind"; recursion yes; # enables resursive queries allow-recursion { trusted; }; # allows recursive queries from "trusted" clients listen-on { 192.168.1.93; }; # ns1 private IP address - listen on private network only allow-transfer { none; }; # disable zone transfers by default forwarders { 8.8.8.8; 8.8.4.4; }; // to talk to, you may need to fix the firewall to allow multiple // ports to talk. See http://www.kb.cert.org/vuls/id/800113 // If your ISP provided one or more IP addresses for stable // nameservers, you probably want to use them as forwarders. // Uncomment the following block, and insert the addresses replacing // the all-0's placeholder. // forwarders { // 0.0.0.0; // }; //======================================================================== // If BIND logs error messages about the root key being expired, // you will need to update your keys. See https://www.isc.org/bind-keys //======================================================================== dnssec-validation auto; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { any; }; };
4 - ساخت فایل zone به شکل زیر
A : db.example.local
$TTL 604800 @ IN SOA example.local. admin.example.local. ( 3 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; ; name servers - NS records IN NS example.local. ; name servers - A records example.local. IN A 192.168.1.93 ; 193.178.201.88/29 - A records host1.example.local. IN A 192.168.1.91 host2.example.local. IN A 192.168.1.94 test.example.local. IN A 192.168.1.95
B:db.example.test
$TTL 604800 @ IN SOA example.local. admin.example.local. ( 3 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; ; name servers - NS records IN NS example.local. ; name servers - A records example.local. IN A 192.168.1.93 ; 193.178.201.88/29 - A records host1.example.local. IN A 192.168.1.91 host2.example.local. IN A 192.168.1.94 test.example.local. IN A 192.168.1.92
C:cat db.192.168.1
$TTL 604800 @ IN SOA example.local. admin.example.local. ( 5 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; name servers 1.168.192.in-addr.arpa IN NS example.local. ; PTR Records 93 IN PTR example.local. ; 192.168.1.93 91 IN PTR host1.example.local. ; 192.168.1.91 94 IN PTR host2.example.local. ; 192.168.1.94 95 IN PTR test.example.local. ; 192.168.1.95 91 IN PTR test.example.local. ; 192.168.1.91
5 - ویرایش فایل :
named.conf.default-zones
view "Iran" { match-clients { 192.168.1.91; }; zone "chavoosh.local" { file "/etc/bind/zones/db.example.local"; type master; }; zone "1.168.192.in-addr.arpa" { type master; file "/etc/bind/zones/db.192.168.1"; # 192.168.1.0/24 subnet }; }; view "USA" { match-clients { 192.168.1.94; }; zone "chavoosh.local" { file "/etc/bind/zones/db.example.test"; type master; }; zone "1.168.192.in-addr.arpa" { type master; file "/etc/bind/zones/db.192.168.1"; # 192.168.1.0/24 subnet }; };
در ادامه با دستورات زیر کانفیگ را چک کردم و خطایی بر روی تنظیمات دریافت نکردم .
sudo named-checkconf
sudo named-checkzone example.local db.example.local
sudo named-checkzone example.local db.example.test
sudo named-checkzone 1.168.192.in-addr.arpa etcbindzonesdb.192.168.1
و سرویس را ریستارت میکنم .
حالا از روی یک کلاینت دستور nslookup را میگیرم نام دامین DNS Server را نمیاره ولی توی تبدیل نام به IP درست عمل میکنه و وقتی من آدرس کلاینتم را عوض می کنم ، آدرس IP اعلامی برای test.example.local نیز طبق آنچه در view تعریف کردم تغییر میکند.
ولی مشکل با ترجمه IP به نام هست که نمیتونه !
دوستان اگه راهنمایی در مورد تنظیمات بنده و چگونگی تصحیح Reverse DNS و مشکلی که هست دارند ممنون میشم در اختیار اینجانب بزارند .
منبع آموزشی کاملی هم در این بابا هست لطف کنید معرفی کنید . چون من این تنظیمات را طبق راه نمایی های چند سایت انجام دادم و به این نتیجه رسیدم .
با تشکر
این پست در تاریخ {{ dateString(new Date(post.deleteDate)) }} توسط {{ post.deletedByUser }} حذف شده است.
دلیل حذف: {{ post.deleteReason ?? 'نامشخص' }}
زمان پاسخ گویی روز های شنبه الی چهارشنبه ساعت 9 الی 18
فقط به موضوعات مربوط به محصولات آموزشی و فروش پاسخ داده می شود