Skip to content

Instantly share code, notes, and snippets.

@bernard-wagner
Created May 29, 2017 19:43
Show Gist options
  • Save bernard-wagner/127196ba083786d52bb65930807582e8 to your computer and use it in GitHub Desktop.
Save bernard-wagner/127196ba083786d52bb65930807582e8 to your computer and use it in GitHub Desktop.
/ip firewall layer7-protocol add name=domain.com regexp=domain.com
/ip firewall mangle add chain=prerouting dst-address=<routeripaddress> layer7-protocol=domain.com action=mark-connection new-connection-mark=domain.com-forward protocol=tcp dst-port=53
/ip firewall mangle add chain=prerouting dst-address=<routeripaddress> layer7-protocol=domain.com action=mark-connection new-connection-mark=domain.com-forward protocol=udp dst-port=53
/ip firewall nat add action=dst-nat chain=dstnat connection-mark=domain.com-forward to-addresses=<UnoTellyDNSServerIPAddress>
/ip firewall nat add action=masquerade chain=srcnat connection-mark=domain.com-forward
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment