thank you in advance for any support
I'm making a DNS redirect solution for Mikrotik hotspot, where I need redirect all DNS request from Hotspot in order to redirect them to my DNS server without change any parameters on routerboard.
Actually, I do some research and I'm doing it with the same Nat rule using dst-nat:
Code: Select all
/ip firewall nat add chain=pre-hotspot protocol=udp dst-port=53 hotspot=auth action=dst-nat to-addresses=xxx.xxx.xxx.xxx
1) all DNS request by unauthenticated hotspot users come to hotspot DNS Proxy on port 64872 using default dynamic rules (in this way I can use correctly captive portal for login)
2) all DNS request by authenticated hotspot users are intercepted with the dst-nat rule and redirect to my DNS server without pass into DNS Proxy
The onyl issue that I've have is that with this configuration, authenticated user cannot see status page on any page on hotspot 'cause its DNS request are redirected to the external DNS server that cannot solve hotstpot DNS name.
The, I think that the only way is to act this dst-net redirection rule after hotspot DNS proxy, catching DNS request outcoming from hotspot DNS proxy and redirect him to my DNS; does anyone know I can do this?
I've already tried all chain hotspot, hs-auth but I cannot do it