When adguard android support CIDR block

H3lper

Support
Staff member
Administrator
Moderator
Any help to block CIDR range?
Hi,
I'd like to point out first that AdGuard for Android firewall works with the apps, but not requests. However, that looks like a good feature request we'd like to see on our GitHub: AdguardTeam/AdguardForAndroid: Open bug tracker for Android version of AdGuard. (github.com)
If you don't mind, of course.

However, using filtering rules, we can make a few workarounds that will satisfy your needs:

You will need this modificator:
$network:
https://adguard.com/kb/general/ad-filtering/create-own-filters/#network-modifier
As an example, |8.8.8.*^$network this rule block all IP within 8.8.8.0 -- 8.8.8.255 range

A website that convert CIDR to RegEX online will come in handy as well, such as https://d-fault.nl/cidrtoregex

You can also use KillSwitch option and within AdGuard's low-level settings, assign a CIDR range to exclude from VPN.

Let me know what you think.
 

smexy

New Member
Hi,
I'd like to point out first that AdGuard for Android firewall works with the apps, but not requests. However, that looks like a good feature request we'd like to see on our GitHub: AdguardTeam/AdguardForAndroid: Open bug tracker for Android version of AdGuard. (github.com)
If you don't mind, of course.

However, using filtering rules, we can make a few workarounds that will satisfy your needs:

You will need this modificator:
$network:
https://adguard.com/kb/general/ad-filtering/create-own-filters/#network-modifier
As an example, |8.8.8.*^$network this rule block all IP within 8.8.8.0 -- 8.8.8.255 range

A website that convert CIDR to RegEX online will come in handy as well, such as https://d-fault.nl/cidrtoregex

You can also use KillSwitch option and within AdGuard's low-level settings, assign a CIDR range to exclude from VPN.

Let me know what you think.
Thank you alot for your help.

I Am not familiar at all with regex so, for example I need to block this CIDR 157.240.0.0/16

The regex value is: -

^(157\.240\.(?:[0-9]|[1-9][0-9]|1(?:[0-9][0-9])|2(?:[0-4][0-9]|5[0-5]))\.(?:[0-9]|[1-9][0-9]|1(?:[0-9][0-9])|2(?:[0-4][0-9]|5[0-5])))$

How to block it in adguard because I copy/ paste in user rules but not blocked any thing.
 

H3lper

Support
Staff member
Administrator
Moderator
Thank you alot for your help.

I Am not familiar at all with regex so, for example I need to block this CIDR 157.240.0.0/16

The regex value is: -

^(157\.240\.(?:[0-9]|[1-9][0-9]|1(?:[0-9][0-9])|2(?:[0-4][0-9]|5[0-5]))\.(?:[0-9]|[1-9][0-9]|1(?:[0-9][0-9])|2(?:[0-4][0-9]|5[0-5])))$

How to block it in adguard because I copy/ paste in user rules but not blocked any thing.
hi,


Try this

|^(157\.240\.(?:[0-9]|[1-9][0-9]|1(?:[0-9][0-9])|2(?:[0-4][0-9]|5[0-5]))\.(?:[0-9]|[1-9][0-9]|1(?:[0-9][0-9])|2(?:[0-4][0-9]|5[0-5])))$\$network


Paste it in the User Rules section. Let me know your results!
Don't hesitate to ping me again if it would not work.
 

smexy

New Member
hi,


Try this

|^(157\.240\.(?:[0-9]|[1-9][0-9]|1(?:[0-9][0-9])|2(?:[0-4][0-9]|5[0-5]))\.(?:[0-9]|[1-9][0-9]|1(?:[0-9][0-9])|2(?:[0-4][0-9]|5[0-5])))$\$network


Paste it in the User Rules section. Let me know your results!
Don't hesitate to ping me again if it would not work.
Thank you, but it didn't work
 
Top