force hotspot users to use another DNS Server

Hi,

i wanna force my hotspot users to use a differnt DNS server (OpenDNS).
The other devices should use the “normal” configured DNS.

I had this setup a while before but i cant find the instructions anymore.

Maybe someone have an idea?

greets from austria

Hi,

You can set up a simple nat rule to re direct all the dns requests from the hotspot to the open dns server.

/ip firewall nat add chain=dstnat src-address=hotspotsubnet protocol=udp dst-port=53 action=dstnat to-address=opendns ip

This will re direct all dns requests to the opendns server

thx @p3rad0x

but… it didn’t work
i setup the rule here: (for testing also tcp)

 8    chain=dstnat action=dst-nat to-addresses=208.67.222.222 protocol=udp 
      src-address=10.5.50.0/24 dst-port=53 log=no log-prefix="" 

 9    chain=dstnat action=dst-nat to-addresses=208.67.222.222 protocol=tcp 
      src-address=10.5.50.0/24 dst-port=53 log=no log-prefix=

any ideas?

no ideas anyone?

i tried around and now it seems to work:
if i set de “default” dns server (ip\dns) to OpenDNS and the apply the rule for my local network (to use google dns for example) it will work
but the otherway will not work ?!

I have the same problem.

The script is:

/ip firewall nat

add action=dst-nat chain=dstnat dst-port=53 protocol=udp src-address=
192.168.99.0/24 to-addresses=208.67.220.123 comment=“hotspot network”
add action=dst-nat chain=dstnat dst-port=53 in-interface=hs-bridge protocol=
udp to-addresses=208.67.222.222 comment=“hotspot bridge”
add action=dst-nat chain=dstnat dst-port=53 in-interface=LAN protocol=udp
to-addresses=8.8.8.8 comment=“lan bridge”


Why this works for some minutes and after this , stop to works?

Thanks