Skip to content

Instantly share code, notes, and snippets.

@gmanual
Created June 5, 2019 00:36
Show Gist options
  • Save gmanual/4e3cc74eef70a503a9ef41820437b76b to your computer and use it in GitHub Desktop.
Save gmanual/4e3cc74eef70a503a9ef41820437b76b to your computer and use it in GitHub Desktop.
# 3rd Party DNS configured for Mikrotik.
/ip dns set servers=1.1.1.1,1.0.0.1
# DHCP server set to give out internal DNS server.
/ip dhcp-server network add address=<network> dns-server=<dns ip> gateway=<mikrotik ip>
# Add DNS IP to LAN interface Disabled
/ip address add address=<dns ip> disabled=yes interface=<lan interface> network=<dns ip>
# Configure Netwatch to ping/poll the GRE Tunnel IP address.
# In the event the Site-to-Site tunnel down, activate /32 IP address of DNS IP locally, which will take over DNS, then use ISP Servers.
/tool netwatch add down-script="/ip address enable [find address=\"<dns ip>/32\"]" host=<gre ip> up-script="/ip address disable [find address=\"<dns ip>/32\"]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment