Adguard with Portmaster
What worked?
Everything worked when either adguard or postmaster were off
What did not work?
DNS errors on the entire internet when both adguard and postmaster are on
Additional information
Debug-Info: https://support.safing.io/privatebin/?9b5ea6910306cb75#5hk4ck9xdAkdXNNXdzddvp5gBt3qPTMqPpDDm1yGxVto
it has something to do with Privacy Filter Module, turning it off seems to work, i suspect its the incoming connection block rule.
Hey @Nirgranth, thanks for raising this issue.
What might be happening is that both the Portmaster and Adguard want to redirect DNS requests in order to handle them. Or alternatively, Adblock blocks DNS requests that don't go to their servers. If that is the case it means that these two solutions are not compatible with eachother and that you can only use one of them.
Alternatively, you can just configure the AdGuard DNS Server within Portmaster, which somewhat gives you both services. Here is our guide to configure DNS Servers within Portmaster: https://docs.safing.io/portmaster/guides/dns-configuration
Could you please tell us which Adguard package you installed? This way we can test this and add this to the compaibility list.
~~If you disable the Privacy Filter Module, the Portmaster stops redirecting DNS requests, which means that Adguard will fully take over. It has the same effect as turning off Portmaster in this case.~~ See next comment.
Sorry, I have to correct that. Disabling the Privacy Filter Module does not stop the Portmaster from redirecting DNS requests. If it works if it is disabled, this is very interesting.
Do you see any blocked connections that might be causing this? Good places to look would be Adguard App, if it shows in the Portmaster UI, or the "Unidentified Processes" app.
it just does not accept them as it is as incoming connection block rule in Privacy Filter Module, Adding a exception for them works, but ips might change on restart, (everything works even after a reboot of device and network),



it still blocks some things from system although the system dns client works now

Thanks for the screenshots!
I'm not sure how exactly you are running adguard. Are you running it on your router or on your device directly?
If you are worried about IPs changing, you can also use an "Allow LAN" rule instead.
Adguard is currently running on the device. i am not sure switching it to a pi hole would help, Thanks Allow Lan works fine. By default it works because it allows incoming connections on portsLAN 5353, 5535 and 1900, and adguard seems to send them on random ports. Might have to configure adguard to send on those ports. (will check if thats possible and update)

i am pretty sure adguard filter dns requests before portmaster, then they get blocked by portmaster.
as I understand AdGuard is compatible when adding the "Allow LAN" rule - added this to the software reports and hence closing this issue.
If I misunderstood please let me know

Hey @celphogeek, thanks for asking this question and thanks @Nirgranth for the screenshot.
Please keep in mind that we don't have closed issues on our radar - we literally don't see them with how we manage issues. In case you an issue needs more attention, please reopen it, or create a new issue.
use
or turn off
use
or turn off
After a lot of tries, I think this should be the way to let AdGuard (version 7.22.3 latest) fully compatible with Portmaster while reducing most of the annoying drawbacks I know.
- Uninstall Portmaster, Adguard.
- Restart the computer, then install Portmaster first (v1 latest is recommended as it is more stable to VPN and UI is native, less bugs).
- Restart, then install Adguard.
- Restart, then let both run. Let Portmaster capture Adguard Svc traffic then shut Adguard down. From this point on, there are two ways to configure both of the apps. The former one in my experience is more stable and less prone to conflicts. First choice:
- Configure Portmaster like in the quote with a few changes: Outgoing: Only use the last three allow rules. Incoming: Add another Block rule *.
- Configure Adguard:
- Settings -> General Settings -> Advanced Settings -> Exclude apps from filtering. At there, whitelist the path where portmaster-core.exe is in.
- Settings -> DNS Protection -> create a custom DNS with DNS upstream 127.0.0.1. Use that DNS.
- Settings -> Network -> uncheck Use WFP network driver. This is to avoid HTTPS filtering from Adguard not working due to using the same WPF driver as PM. Second way:
- Configure Portmaster the same in the first choice, but also whitelist your preferred DNS server you intend to setup in Adguard in Outgoing rules. Set it at the top.
- Configure Adguard. Do step 1 as in first choice. In step 2, choose or create custom DNS server you like. Then do 3 as in first choice.
- Restart your computer.
@oruphonics1 i went through a lot when it didnt work, glad you figured it out
@oruphonics1 i went through a lot when it didnt work, glad you figured it out
tbh even with this setup this is not really reliable. Certain VPNs (Proton, for example, in my experience), might crash Adguard all of a sudden. TDI driver from Adguard is also on the way to be depreciated, and it also decreases your network speed noticeably. And if you also use Chrome (you better not) or some Chromium-based browser, TDI driver may not even work depending on your setup. Luckily their new driver, SockFilter, is on the way to be implemented (finally) on version 7.x and later on 8.x (gonna take a long time there), so I hope at that point Adguard and Portmaster will play nicer with each other.