How to configure Web filtering on a Digi device without using an external service

If you need to allow access to specific DNS hostnames on your Digi device, please set those host names in the DNS servers list.

Configuration> Services>DNS>DNS servers

 

The Web GUI does not currently support wildcard masks in the hostnames.

If you wish to use a wildcard mask, please add the “WC-“name before the DNS hostname.

Further, with a script, we will replace this name with the specific wildcard mask.

To avoid using any other DNS servers which can be assigned to the WAN interfaces via DHCP protocols

Do not forget to set the option “Use DNS” to Never

 

DAL system use Google DNS server with IP address 8.8.8.8 as a fallback DNS server in the event that none of its WAN-style connections have DNS servers (i.e. the DHCP WAN interface isn't providing a DNS server, “USE_DNS” is set to never, or a static IP doesn't have a DNS server configured).

Due to this, we have to set a route to this server via the Loopback interface.

 

 

The final step is to set up a script that runs on a regular basis like this:

 

 

if grep -q "WC-" "/var/run/dnsmasq.conf"; then

echo "Add Wildcard"

sed -i 's/WC-/./g' /var/run/dnsmasq.conf

action stop dnsmasq

sleep 1

initctl add dnsmasq ":unknown:/sbin/dnsmasq --ignore-conf-error -C /var/run/dnsmasq.conf -k"

fi

Which replaces “WC-” with “*” in the conf file and then restarts dnsmasq without reloading the DAL config

 

 

Last updated: Jan 01, 2024

Recently Viewed

No recently viewed articles

Did you find this article helpful?