Firewall

How to block all traffic from local network to Internet on port 2042 TCP ?

Place an appropriate filter in the forward chain of IP Firewall.

/ip firewall filter
add chain=forward action=reject reject-with=icmp-port-unreachable protocol=tcp dst-port=2042