/ip firewall nat
add chain=srcnat src-address=192.168.0.0/24
dst-address=192.168.0.10 protocol=tcp dst-port=999
out-interface=bridge action=masquerade
Out interface name should be your bridge name.
LAN and WAN are “interface list” in the default configurations.
Bridge and up-link ethernet interface are then member of the LAN and WAN list.
Many default rules, and settings use these WAN and LAN “interface list” names (access and forward rules, NAT, MAC server, discover , … )
Interfaces as ports to the bridge are “slave” interfaces, settings must be on the bridge then, not on the interface.
But … LAN and WAN are just names, they have no other reserved meaning. (They could be assigned to any named object … interface, bridge, switch, address pool, etc ,etc)
You are mixing stuff up…
Assuming you have a fixed wanip static
Rule1 default or normal source nat type rule
add chain=srcnat action=src-nat out-interface=wan to address=whatever your fixed WANIP is…
Rule2 new sourcenat rule to cover off Hairpin
add chain=srcnat action=masquerade comment=“HairpinNAT” src-address=192.168.0.0/24 dst-address=192.168.0/24
If your WAN is dynamic, the Destination rule is a bit more complex…
add chain=srcnat action=masquerade out-interface=WAN
add chain=srcnat action=masquerade comment=“HairpinNAT” src-address=192.168.0.0/24 dst-address=192.168.0.0/24 (as above)
Since we don’t know how to identify directly the incoming WANIP, we get around that with the dst-address-type local which says the destination address is on the router.
We also state that the destination address is not the subnet (which leaves the router interface and thus the wanip).