![]() ![]() Total DNS entries inserted into cache: 1381ĭNS entries removed from cache before expiry: 0 Afterwards show DNS statistics show dns forwarding statistics Nameservers configured for DNS forwardingġ.1.1.1 available via 'optionally configured'ġ.0.0.1 available via 'optionally configured'Ģ08.67.222.222 available via 'optionally configured'Ģ08.67.220.220 available via 'optionally configured' 118.3 Validate configurationĬheck the correct forwarding nameservers are used show dns forwarding nameservers Make DHCP clients use EdgeRouter as DNS server set service dhcp-server shared-network-name LAN subnet 192.168.1.0/24 dns-server 192.168.1.1Ĭommit and save the new config. Paste the following to the bash script #!/bin/bash Switch to the root user and create a bash script with vi in root home directory. # NB: the script implies blocklists use 0.0.0.0 as the blackhole IP. # Blackhole/IP to respond to DNS query if domain is on blocklist If you change blocklists you need to change the code. Sed -i "s/$/\/$blackhole_ip/" $tmp_blocklist # Add to end of all lines: '/$blackhole_ip' # Remove any comment lines/lines containing '#' # You could use regex matches to make this prettier and more flexible.įor i in -s "$i" | sed "s/0\.0\.0\.0 //" > $tmp_blocklist # Make sure we're starting with empty blocklists # Block configuration to be used by dnsmasqīlocklist="/etc/dnsmasq.d/nf" MUST NOT be sent, except as a source address as part of an initialization procedure by which the host learns its own IP address." Per RFC 1122, section 3.2.1.3 "This host on this network. Save the bash file by hitting escape, ':wq', and enter. sudo chmod a x ~/update-adblock-dnsmasq.sh Make sure you're root, chmod the script, and run the script. Make sure no errors were written to the console. (crontab -l echo "20 4 * * * /root/update-adblock-dnsmasq.Welcome to the unofficial Ubiquiti Subreddit! Then add the script to crontab.Ĭontab will generate a new blocklist everyday from your blocklist sources. This is a place to discuss all of Ubiquiti's products, such as the EdgeRouter, UniFi, AirFiber, etc. Announcements of new products in EA (Early Access) and GA (General Availability).Information you may have come across that could help others.Questions about problems you may have encountered with your product(s). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |