Community discussions

MikroTik App
 
ozanoral
just joined
Topic Author
Posts: 4
Joined: Wed Aug 19, 2020 9:44 am

Multiple Public IP from one interface

Thu May 27, 2021 5:30 pm

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.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Multiple Public IP from one interface

Thu May 27, 2021 7:28 pm

I want repaint my house with same color of my friend house, how much paint I need and what color should I buy it?
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 18958
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Multiple Public IP from one interface

Thu May 27, 2021 7:33 pm

/export hide-sensitive file=anynameyouwish
 
User avatar
czolo
Member
Member
Posts: 423
Joined: Fri Mar 04, 2005 9:49 am
Location: Poland (Warsaw)
Contact:

Re: Multiple Public IP from one interface

Fri May 28, 2021 7:35 am

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
 
User avatar
k6ccc
Forum Guru
Forum Guru
Posts: 1490
Joined: Fri May 13, 2016 12:01 am
Location: Glendora, CA, USA (near Los Angeles)
Contact:

Re: Multiple Public IP from one interface

Fri May 28, 2021 6:49 pm

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.

Who is online

Users browsing this forum: BrianTax, coreshock, johnson73, loloski and 97 guests