What's new

How do I block an advertisement URL

buis

Occasional Visitor
Quick question, I can't figure it out. I use Diversion and SkyNet and tailscale But now I have to block 4 advertisement URLs. Where do I do this and how? I'm really stuck.
In Diversion?
 
Quick question, I can't figure it out. I use Diversion and SkyNet and tailscale But now I have to block 4 advertisement URLs. Where do I do this and how? I'm really stuck.
In Diversion?
In Skynet one can block specific URL's. See here: https://github.com/Adamm00/IPSet_ASUS?tab=readme-ov-file#example-ban-commands

Example Ban Commands:​

  • firewall ban ip 8.8.8.8 "Apples": Ban the specified IP with the comment "Apples".
  • firewall ban range 8.8.8.8/24 "Apples": Ban the specified CIDR block with the comment "Apples".
  • firewall ban domain google.com: Ban the specified URL.
  • firewall ban country "pk cn sa": Ban known IPs for the specified countries.
  • firewall ban asn AS123456: Ban the specified ASN.
Or one can use Firewall > URL Filter in the router GUI to block URL's if one isn't using addon scripts that enhance router firewall functions.
[Wireless Router] How to set up the URL Filter - Black/White List?(Firewall)

Edit to add: As requested above, please remove the "Tutorial" tag from your initial post title. The "Tutorial" tag generally applies to actual tutorials that explain/detail how to perform something, not questions about how to do something.
 
Hi there, Since you already have Diversion running that is also an option for domain-level blocking. In the Diversion menu go to option 3 to manage the whitelist and blacklist, then add each domain to the blacklist. This blocks DNS resolution for the whole domain rather than going through the firewall.
The SkyNet approach bennor mentioned works at the firewall level and can block specific IPs as well as domains by resolving them to their IPs. Both methods complement each other - Diversion handles DNS, SkyNet handles firewall rules.
Worth knowing: both methods work at domain level, not URL path level. So if the ad URL is something like ads.example.com/banner.jpg you can block ads.example.com and it will catch everything from that domain. But if the ads are being served from a shared domain like cdn.example.com/ads/something then blocking the whole domain would likely break other things that rely on the same CDN. In that case a browser-level ad blocker like uBlock Origin would be a better fit.
Let me know how you get on.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top