Hi.
I intend to change destination port of packet to another port and vise versa.
i have a dns server which is run on port 5353. since RouterOS DNS setting does not supports custom dns port i need to change the dns packet port 53 to port 5353.
and when the packet receive from my dns server port 5353 redirecting it to port 53 on input chain for RouterOS DNS client.
is there any way to do it with mangle or even nat?
thanks.
Some kind of NAT would probably do it. Which one - SRC or DST - depends on particular layout: is your DNS server on WAN segment or in DMZ/LAN? Connection from where - WAN or LAN or both - do you want to translate? Etc.
my dns server is in WAN.
And connections from where do you want to redirect? LAN, WAN or both? Redirections from WAN to WAN won’t work using NAT (those would have to be hairpin NAT … usually it’s LAN2LAN though), redirections from LAN should be possible.
i want to redirect RouterOS DNS client it self to another port and serve regular dns server to clients in lan.