Skip to content

Instantly share code, notes, and snippets.

@dbrgn
Last active April 6, 2020 08:11
Show Gist options
  • Save dbrgn/8243aaaa0a0e47eda094 to your computer and use it in GitHub Desktop.
Save dbrgn/8243aaaa0a0e47eda094 to your computer and use it in GitHub Desktop.
Mikrotik RouterOS: Block DNS lookups for names containing "samsung"
/ip firewall filter add
chain=input
action=drop
comment="deny DNS resolution containing 'samsung' from SmartTV"
protocol=udp dst-port=53
content="samsung"
src-mac-address=<smartv-mac-addr>
/ip firewall filter add
chain=forward
action=drop
comment="deny DNS resolution containing 'samsung' from SmartTV"
protocol=udp dst-port=53
content="samsung"
src-mac-address=<smartv-mac-addr>
@FelixHaller
Copy link

Hi. Do you know how to filter for a complete domain (e.g. "samsung.headquarter.com") in content . Everytime I add periods to my string the rules stop to match.

@sijpesteijn
Copy link

It's a regular expression. A dot has a special meaning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment