Blocking Ports

When AdGuard AdBlock works as VPN on my Android phone, it allows me to create custom rules that can block local IP's on specific ports (||192.168.X.X:2869^ or ||192.168.X.X:5555^), but I can't figure out how to make AdGuard block entire ports. What is the syntax for blocking a port for all IP's?
 

jmhenrique

New Member
Code:
/.*:((?=(([6-9]\d{3,})|\d{5,}))(?!(80|443|8080)$))/$network
Hi!

I use this regex rule to block all ports above 6000 and whitelist ports 80,443 and 8080. It works great on windows and android (program/browser plugin) but not on linux (browser plugin), I believe it is some specific feature of browsers for linux. I haven't tested it on ios/iphone.

(On linux, numeric regex dont worked with /$network.)
 

zartan

New Member
Code:
/.*:((?=(([6-9]\d{3,})|\d{5,}))(?!(80|443|8080)$))/$network
Hi!

I use this regex rule to block all ports above 6000 and whitelist ports 80,443 and 8080. It works great on windows and android (program/browser plugin) but not on linux (browser plugin), I believe it is some specific feature of browsers for linux. I haven't tested it on ios/iphone.

(On linux, numeric regex dont worked with /$network.)
I'm not sure what your intention was however, as far as I'm concerned, I was looking for a way to block only one specific port, for a certain application which uses multiple tcpip. I was able to do just that with the following rule (where xxxx needs to be replaced by your specific port number):
Code:
/.+:xxxx/$network
The rule you suggested above seems to be blocking more than it's supposed to on some ipv6 addresses. I'll spend some time with the syntax and I'll get back here if I find the culprit. Lastly I found this article here, you may be interested in.
 
Top