- dnsmasq سرویسی برای راه اندازی یک DNS سرور کوچک برای شبکه های متوسط و کوچک می باشد.
- Dnsmasq provides Domain Name System (DNS) forwarder, Dynamic Host Configuration Protocol (DHCP) server, router advertisement and network boot features for small computer networks, created as free software.
- در این آموزش قصد راه اندازی رو نداریم تنها به کانفیگ رکورد های forward و reverse اشاره می کنیم.
- رکورد های forward یعنی تبدیل دامنه به آی پی
- رکورد های reverse یعنی تبدیل آی پی به دامنه (ها)
- توجه : در این آموزش رکورد ها یا دامنه های non-public رو بررسی می کنیم.
- برای این منظور فایل کانفیگ را باز می کنیم و خطوط زیر رو اضافه می کنیم.
nano /etc/dnsmasq.conf
address=/network.local.lan/192.168.10.0
ptr-record=0.10.168.192.in-addr.arpa,network.local.lan
#dnsmasq config, for a complete example, see:
# http://oss.segetech.com/intra/srv/dnsmasq.conf
#log all dns queries
log-queries
#dont use hosts nameservers
no-resolv
#use cloudflare as default nameservers, prefer 1^4
server=1.0.0.1
server=1.1.1.1
strict-order
#serve all .company queries using a specific nameserver
server=/company/10.0.0.1
#explicitly define host-ip mappings
address=/local.ir/10.0.0.3
address=/www.local.ir/10.0.0.3
#
address=/files.local.ir/10.0.0.4
address=/www.files.local.ir/10.0.0.4
#
address=/panel.local.ir/10.0.0.5
address=/www.panel.local.ir/10.0.0.5
#
address=/network.local.lan/192.168.10.0
ptr-record=0.10.168.192.in-addr.arpa,network.local.lan
- تست شده بر روی debian 9.x