Multiple IP on one WAN interface with multiple LANs

Hi

I have RB2011UAS-2HnD-IN, I’m trying to get working below configuration:

WAN:
eth1-gateway, with three public IP addresses: 80.53.17.54/29, 80.53.17.55/29, 80.53.17.56/29 - for all of them gateway is 80.53.17.53

LAN:
three bridges: LAN1-bridge (eth2, eth3, weth4), LAN2-bridge (eth5), LAN3-bridge (eth6, eth7, eth8, eth9, eth10), on each of them I have separated DHCP server with corresponding addresses: 192.168.11.0/24, 192.168.3.0/24, 192.168.0.0/24.

Currently DHCP provide proper IP addresses depending on used port.

NAT is working properly for each LAN (I’ve added src-nat rule) but all of them are outgoing on the same IP - this is my problem. I’m trying to map each LAN network to specific WAN IP. I was trying with mangle rules, but I didn’t find any example with multiple IP on the same interface - are example base on different interface (one interface per WAN IP).

Can you help me providing some example how to properly add mangle rules to make this configuration working?

br
kjw

WAN:
eth1-gateway, with three public IP addresses: 80.53.17.54/29, 80.53.17.55/29, 80.53.17.56/29 - for all of them gateway is 80.53.17.53

what you mean by that?
what is the configuration?

Hi,

Be sure that you have 3 ip addresses configured on eth1 and must must have 3 firewall -->nat rules
with 3 different source address and output interface.

Regards.

Hi

on interface eth1-gateway I have defined three IP addresses, all of them have the same gateway and in fact belong to the same subnetwork (my ISP provide me five IP addresses)

br
kjw

Hi

can I with firewall nat rule define connection between public IP and LAN? as an interface I use proper bridge (LAN network) and as IP use 0.0.0.0.0/0 then it works for each LAN but each LAN was outgoing using first public IP

br
kjw

try this.

/ip firewall nat
add chain=srcnat action=src-nat to-addresses=80.53.17.54 src-address=192.168.11.0/24
add chain=srcnat action=src-nat to-addresses=80.53.17.55 src-address=192.168.3.0/24
add chain=srcnat action=src-nat to-addresses=80.53.17.56 src-address=192.168.0.0/24