#Used for updating the ip subnet in DNSMasq NetIF= sleep 20 ipa=$(ip -4 addr show $NetIF | grep -m 1 -oP '(?<=inet\s)\d+(\.\d+){3}' | grep -E -o "([0-9]{1,3}[\.]){2}[0-9]{1,3}" |head -1 ) ipa="$ipa"".0" sed -i '/dhcp-range/c\dhcp-range='"$ipa"',proxy' /etc/dnsmasq.conf service dnsmasq restart