Public IP NAT Rule Issue

Hello,

I want to assign one of my WAN IPs (public IPs) to my User and I have configured my Router as below but still not working;

NAT Rule

Chain: srcnat
src-address: 192.168.100.20 (private ip)

Action: netmap
To Addresses: 301.102.XX.20 (public ip)

Note! The 301.102.XX.20 already added to WAN-Ethernet in Address list.

The User WAN IP not change to the assigned Public IP.

How do I make the assigned Public IP work for the User?

use action src-nat, not netmap.

Action changed to “src-nat” and still the same problem… user WAN IP not change to the 301.102.XX.20

ip 301.102.XX.20 is not a valid one, you can’t change it to that. src-nat is the correct action, check the order of other nat rules and move the new one up on top.

IP 301.102.XX.20 is just a sample here… I’m using valid public IP.

Yes, I understand that the rule is correct but is not working on my router, I don’t understand what could be the problem.

Even the action netmap should work, if not the problem.

MikroTk Guru Guys, please help out!!

What about order of NAT rules? They are evaluated from top to bottom, first one matching executes.

Attached images here are my settings…

The advertised network IP not route in the route list…
route_list.jpg
bgp_status.jpg
addresses.jpg
address_list.jpg
nat_rule.jpg

You have two rules in srcnat chain. The screenshots don’t show all the gory details, but … masquerade rule is higher than “normal” src-nat rule. If masquerade rule selection rules match the packets which src-nat rule is supposed to act on, then masquerade rule will do it’s job and src-nat rule won’t get evaluated (and executed).

If you’re unsure about it, create text export of NAT section, and copy-paste them here (execute /ip/firewall/nat/export to show NAT rules only in full detail).

I moved the src-nat rule to top and now working perfectly.

Thanks.