[USG Flex H Series] - External Block List Adblock/uBlock origin parser
Guru Member
Hello everyone,
the feature of External Block List (EBL) is to permit to the Flex H Series to download a third party .txt files, that contains a series of hostname/http site to being blocked by the firewall as "malicious site" filtered by DNS/URL Threat filter.
So, it's possible to define a plain text file that as, for example:
- samsung.com
- *.zyx.com
- bla bla bla
And the firewall, when the list is applied, consider these hostname as ostile and blocked by the DNS/URL Threat filter.
Here an explanation on how the EBL works:
The problem is that: the flat file that the EBL feature would like to have is a fixed format that permit only IPs/hostnames/URLs in a single file format.
But… in the majority of cases, on internet, we found an adblock list that have another fixed format (for example an adblock list or ublock origin list have a different format to parse the txt file).
So… the only way to work with the EBL feature is to get the adblock list, parse it into the EBL format and load it into the EBL feature (remember that EBL require a valid URL in which you have the txt file — "http://<myserver>/ebllist.txt", is not possible to manually upload a file).
I've created a ZyFeed parser project into github, that parse the standardized adblock list into a plain text and put out as txt file; then I use my web server to serve it for the EBL.
Here the project:
But is very frustrating use a parser and an own web server to work with the EBL feature.
So… my idea is to introduce an AdBlock/uBlock origin/AdGuard parser directly into the EBL feature; also because, as explain before, those types of list are the most common used.
What do you think?
Thank you
Comments
-
Hi Maverick87,
Thank you for sharing this idea and your workaround.
To help us evaluate this further, could you let us know if there are any commercial firewalls that support ABP filter syntax? If so, please share the details, as this would be a helpful reference for our team.
Zyxel Tina
-
Hi @Zyxel_Tina,
Unfortunately I don't know generally, any other commercial firewalls, so it's difficult to me know who have the ABP filter syntax.For sure commercial DNS firewalls (like NextDNS or Control D) and for sure commercial web proxies (like AdGuard, AdBlock plus).
Also probably solutions like OPNsense which uses AdGuard Home and pfSense which uses pfBlockerNG packet. Also OpenWrt probably work.Anyway, I've found this:
An ABP (Adblock Plus) / AdGuard syntax list contains 5 main types of instructions, ranging from basic domain blocking to advanced webpage code manipulation.
Here is the breakdown of what you can find inside, highlighting what a hardware firewall (via DNS filtering like AdGuard Home) can and cannot process:What a Firewall CAN Do (DNS Level)
Firewalls only see domain names, so they extract and apply only these two rules while ignoring everything else:1. Domain-Level Network Blocking: Rules like
||://example.com^block all requests to a specific domain and its subdomains.2. Domain-Level Exceptions (Whitelist): Rules starting with
@@(e.g.,@@||://example.com^) unblock specific domains to prevent breaking legitimate website functions.What a Firewall CANNOT Do (Browser/App Level Only)
Because web traffic is encrypted via HTTPS and firewalls do not inspect the webpage's internal code, they discard these advanced rules (which require a browser extension like uBlock Origin or a local app):3. Specific URL Paths & Modifiers: Rules targeting specific folders or file types (e.g.,
||://example.com*or||example.com^$script). A DNS firewall cannot see anything after the/in a URL.4. Cosmetic Rules (CSS / Element Hiding): Rules containing
##(e.g.,example.com##.ad-banner) hide empty white boxes, pop-ups, and first-party ads directly inside the page's HTML/CSS layout.5. Scriptlets & Anti-Adblock Bypass: Rules containing
##+js(...)or#%#//scriptlet(...)inject tiny pieces of safe JavaScript to neutralize anti-adblock walls and complex video ads (like on YouTube or Twitch).(Note: Lists also contain Comments & Metadata starting with
!, such as! Title: EasyList, which are purely informational).So, necessary the part that you can take in consideration is only the number #1 and #2; you can also take #3, #4, #5 but you need to configure the SSL Inspection (and you need to use the certificate released by firewall, for every devices such as computer but also PC/Tablet/IoT and TVs … so is not feasible).
Anyway: you can implement a full ABP-parser and then only point #1 and #2 are taken in consideration, so #3, #4, #5 format are discarded.
Categories
- All Categories
- 442 Beta Program
- 3.1K Nebula
- 245 Nebula Ideas
- 6.9K Security
- 815 USG FLEX H Series
- 394 Security Ideas
- Threat Watch!
- 1.8K Switch
- 88 Switch Ideas
- 1.5K Wireless
- 60 Wireless Ideas
- 7.3K Consumer Product
- 334 Service & License
- 543 News and Release
- 107 Security Advisories
- 31 Education Center
- 10 [Campaign] Zyxel Network Detective
- 5.7K FAQ
- 34 Documents
- 89 About Community
- 125 Security Highlight
Zyxel Employee