NAT - Round Robin srcnat

Hi everyone,
I have a 192.168.0.2 proxy and I need to NAT him to multiple public IP addresses.

When a request is sent to 192.168.0.2 I want him to use 5.5.5.1 public IP, next 5.5.5.2 then 5.5.5.3, and then 5.5.5.1 again.

How can I do that?

Thanks in advance.

The /ip firewall filter nat to-addresses parameter accepts an address range. I don’t know if it behaves in an round-robin fashion or if it’s strictly meant to map networks in a 1:1 fashion. You’ll have to try it out.

Because you weren’t clear are you using the built-in web proxy and I assume you want to use multiple public IPs because you are hitting a connection based limit on a single masquerade.

If you are simply trying to load-balance 3 ISP connections their are easier ways to do that with nth based load balancing.

Hi idlemind and thanks for your reply.
The proxy server is not on Mikrotik router but is installed on a Linux dedicate VM.
My goal is to rotate the proxy requests to internet through 3 differents public IP’s.

proxy IP 1.1.1.1 → mikrotik public IP 1 on eth 5 → internet
proxy IP 1.1.1.1 → mikrotik public IP 2 on eth 5 → internet
proxy IP 1.1.1.1 → mikrotik public IP 3 on eth 5 → internet
proxy IP 1.1.1.1 → mikrotik public IP 1 on eth 5 → internet

Thanks and sorry for my bad english.

Maybe give 3 internal IPs to the proxy and perform the rotation there? It would be easy to then 1:1 NAT each of the 3 IPs on the MikroTik.

Assuming using a range of 3 addresses in to-addresses part of the srcnat rule doesn’t do what you want.

Am also looking for this kind of a setup. My situation is similar but it’s Google constantly flagging connections as suspicious since only one IP is NATTED.
I would want to have like 5 IPs natting in a round robin setup.

Again assuming the address range doesn’t work you could you use connection marking to cycle through similar 1:1 NAT rules like you would otherwise do when load balancing an ISP connection.