Multiple Public IP from one interface

Hello,

My ISP provides me 5 static IP addresses.(Lets say 12.123.12.123 - 124 - 125 - 126 - 127) Simply what i want to do is, devices connected from ether2 interface use 12.123.12.123 public ip and devices connected to ether3 interface use 12.123.12.124. It’s not important if i use only ether1 for wan or another port. I tried with second port but when i bind second ip to that port from IP > Addresses i lost connection from ether1 port and unable to access internet. I have a bridge interface that covers ether2 and some another ports (ether1 wan not included) for guest vlan connection with my unifi devices. Can you guys help me?
Thanks.

I want repaint my house with same color of my friend house, how much paint I need and what color should I buy it?

/export hide-sensitive file=anynameyouwish

My young padawan …
You need to understand how the network works. If you have a Wan port with L3 addresses on it, you may use:

  • routing with an additional transfer network (which you do not have now)
    -bridging - but all the client devices have to be in the same bridge with a Wan port
    -nat - 1:1 NAT with translation from a public IP from Wan to a specific private IP from Wan. But i would recommend to use dst-nat and src-nat to be sure, that you will not masquarade the outgoing traffic to a single ip

When my DSL provider gave me up to eight addresses, I did pretty much what you want. I had several LANs and each one would use a different IP on the WAN side.
ETH 1 - Internet connection with four static addresses (for example a.b.c.61, a.b.c.94, a.b.c.145, a.b.c.216)
ETH 2 - .201 LAN - 192.168.201.0/24 - Used a.b.c.61 for internet traffic
ETH 3 - .202 LAN - 192.168.202.0/24 - Used a.b.c.94 for internet traffic
ETH 4 - .203 LAN - 192.168.203.0/24 - Used a.b.c.145 for internet traffic
ETH 5 - .204 LAN - 192.168.204.0/24 - Used a.b.c.216 for internet traffic
Outbound traffic from each LAN would masquerade using the desired IP. Inbound NAT traffic would specify the inbound public IP and port.
Each step of a multi-step port knock used a different IP and port.
Firewall rules kept the four LANs apart except as desired.