Hello All,
I’m trying to see if this is even achievable, so basically I have a Mikrotik router (IP: 192.168.0.5) and a client ( IP:192.168.0.170) this client uses a static Gateway and DNS which is the IP of the router, as for the DNS I’m using Adguard home with local IP 192.168.0.7, I searched online and tried all possible configs that I could find online and still doesn’t work it either works and masks the client’s IP with the router’s or the client’s IP appears on the dashboard but drops internet connection after, I even tried Hairpin but still didn’t work after. Anyone have tried to do this and worked?
is there a tutorial somewhere cause now I’m just thinking of giving up.
How are you configuring things (LAN devices, router, …) to use Adguard home? In certain cases it’s not possible for adguard server to see LAN device’s IP address (e.g. if DHCP server sets router’s IP address as DNS server or if router is redirecting DNS requests to interna server), in other cases it’s possible to configure things right. But as I said, it very much depends on how exactly you want to have it done.
- Check if your device, like the latest settings of the latest updates made to the programs, doesn’t give a damn about the DNS you give him and uses his own method.
- Set the AdGuard IP as DNS provided from your DHCP Server / Network
I’m using the adguard through DNS IP, not through an app/software, and the issue is that we don’t have DHCP, all of our IPs’ are static (Don’t ask me why even I don’t know and that’s an issue for me always) so I need to make this plausible using either MikroTik’s DNS which is set on all user’s PC (192.168.0.5)
As I said that’s my main issue our DNS configs and IP configuration is static on all devices.
If the MikroTik router is not the gateway, swap the IPs…
the mikrotik is both the gateway and the dns on the employee’s device
Yes, it’s possible. How exactly, it depends. If clients are using router as resolver and you simply have:
/ip dns
set allow-remote-requests=yes servers=192.168.0.7
Then it most likely won’t work, because from Adguard’s perspective, the client is router. There is some DNS extension that allows resolver to pass address of original client, but I doubt that RouterOS has that (plus Adguard would have to support it too).
But if you use (or you’d switch to) NAT-based redirection to Adguard, then you can see two possible solutions in this thread: http://forum.mikrotik.com/t/mikrotik-with-pi-hole-config-for-my-clients-ip-to-show-in-the-pi-hole-logs/159917/1
That’s what I did although it worked in Adguard, although it didn’t work when I tried this with pi-hole.
It doesn’t matter what DNS software you use, it works on network level.