Temat: Dnsmasq - jak uruchomić tylko na wskazanych interface'ach
Witam,
Posiadam na 1043NDv1 OS jeszcze z nazwą LEDE Reboot (17.01-SNAPSHOT, r3794-dca4dfa)
Skonfigurowanych jest kilka interfejsów logicznych/wirtualnych:
LAN 192.168.10.0/24
LAN_AP 192.168.11.0/24
LAN_TV 192.168.12.0/24
WAN 192.168.8.0/24
WAN_OPT aaa.bbb.ccc.ddd/30Problem jest taki, że WAN_OPT (IP. AAA.BBB.CCC.DDD) działa też ta usługa:
root@LEDE:~# netstat -anpeWu |grep 53
udp 0 0 127.0.0.1:53 0.0.0.0:* 12756/dnsmasq
udp 0 0 192.168.10.1:53 0.0.0.0:* 12756/dnsmasq
udp 0 0 192.168.11.1:53 0.0.0.0:* 12756/dnsmasq
udp 0 0 192.168.12.1:53 0.0.0.0:* 12756/dnsmasq
udp 0 0 AAA.BBB.CCC.DDD:53 0.0.0.0:* 12756/dnsmasq
udp 0 0 127.0.0.1:53 0.0.0.0:* 12757/dnsmasq
udp 0 0 192.168.10.1:53 0.0.0.0:* 12757/dnsmasq
udp 0 0 192.168.11.1:53 0.0.0.0:* 12757/dnsmasq
udp 0 0 192.168.12.1:53 0.0.0.0:* 12757/dnsmasq
udp 0 0 AAA.BBB.CCC.DDD:53 0.0.0.0:* 12757/dnsmasq
udp 0 0 127.0.0.1:5353 0.0.0.0:* 11600/dnscrypt-prox
root@LEDE:~# netstat -anpeWt |grep 53
tcp 0 0 127.0.0.1:5353 0.0.0.0:* LISTEN 11600/dnscrypt-prox
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 12757/dnsmasq
tcp 0 0 192.168.10.1:53 0.0.0.0:* LISTEN 12757/dnsmasq
tcp 0 0 192.168.11.1:53 0.0.0.0:* LISTEN 12757/dnsmasq
tcp 0 0 192.168.12.1:53 0.0.0.0:* LISTEN 12757/dnsmasq
tcp 0 0 AAA.BBB.CCC.DDD:53 0.0.0.0:* LISTEN 12757/dnsmasqStarałem się ogarnąć temat i znalazłem poniższe, ale coś nie działa mi konfiguracja
https://forum.openwrt.org/t/dnsmasq-exc … ces/1535/7
Ogólnie używam DNScrypy oraz w DNSMasq zbudowane są dwie instancje
root@LEDE:~# cat /etc/config/dhcp
#bind-interfaces
config dnsmasq 'dns_bez_crypto'
option bind-interfaces
option resolvfile '/var/resolve_file'
option interface 'lan_tv'
option except-interface 'lan wan wan_opt lan_ap'
option listen-address '192.168.12.1'
option domainneeded '1'
option boguspriv '1'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan2/'
option domain 'lan2'
option expandhosts '1'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases_new'
option localservice '1'
option noresolv '0'
#list server '127.0.0.1#5353'
list server '194.146.251.101'
list server '194.146.251.100'
list server '208.67.222.222'
list server '208.67.220.220'
option nonwildcard '1'
option logqueries '1'
config dnsmasq 'dns_crypto'
option bind-interfaces
option interface 'lan_ap'
option interface 'lan'
option except-interface 'lan_tv wan wan_opt'
option listen-address '192.168.10.1'
option listen-address '192.168.11.1'
option domainneeded '1'
option boguspriv '1'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option localservice '1'
option noresolv '1'
list server '127.0.0.1#5353'
#list server '194.146.251.101'
#list server '194.146.251.100'
#list server '208.67.222.222'
#list server '208.67.220.220'
option nonwildcard '1'
option logqueries '1'
config dhcp 'lan'
option instance 'dns_crypto'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv6 'disabled'
option ra 'disabled'
config dhcp 'lan_ap'
option instance 'dns_crypto'
option interface 'lan_ap'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv6 'disabled'
option ra 'disabled'
config dhcp 'lan_tv'
option instance 'dns_bez_crypto'
option interface 'lan_tv'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv6 'disabled'
option ra 'disabled'
#config odhcpd 'odhcpd'
# option maindhcp '0'
# option leasefile '/tmp/hosts/odhcpd'
# option leasetrigger '/usr/sbin/odhcpd-update'Jak wymusić, aby każda z instancji dnsmasq działa tylko na wskazanym interface, a nie na wszystkich?
Pozdrawiam, Krzysiek