Community discussions

MikroTik App
 
Aegis13
just joined
Topic Author
Posts: 21
Joined: Wed Jan 28, 2009 6:32 pm

Dst-Nat and 2 exteranl IP addresses

Fri Jul 16, 2010 9:14 pm

I have a RB750. If possible I'd like to configure it with 2 external IP addresses from the block of 5 we get from provider. x.x.x.153 and x.x.x.154 and use dst-nat on 153 to map to internal 192.168.0.2 and dat-nat from 154 to map to internal 192.168.0.3.

I've looked at the load balancing info in the wiki but all the information appears to be for routing 2 external addresses to two different internal subnets. Is there a way to use a single internal subnet and have it route traffic correctly between the two external IP addresses?

Thank you,

Bret
 
fewi
Forum Guru
Forum Guru
Posts: 7734
Joined: Tue Aug 11, 2009 3:19 am

Re: Dst-Nat and 2 exteranl IP addresses

Fri Jul 16, 2010 9:31 pm

Just apply both IP addresses to the outside interface and then dst-nat them accordingly. The below assumes that ether1 faces your ISP and ether2 faces your LAN:
/ip address
add address=x.x.x.153/29 interface=ether1
add address=x.x.x.154/29 interface=ether1

/ip firewall nat
add chain=dstnat dst-address=192.168.0.2 action=dst-nat to-addresses=x.x.x.153
add chain=dstnat dst-address=192.168.0.3 action=dst-nat to-addresses=x.x.x.154
add chain=srcnat src-address=192.168.0.2 action=src-nat to-addresses=x.x.x.153
add chain=srcnat src-address=192.168.0.3 action=src-nat to-addresses=x.x.x.154
There's no load balancing involved as both IPs share the same outside subnet.
 
Aegis13
just joined
Topic Author
Posts: 21
Joined: Wed Jan 28, 2009 6:32 pm

Re: Dst-Nat and 2 exteranl IP addresses

Mon Jul 19, 2010 5:52 pm

Wow, never even dreamed it would be that easy. Thank you.

Who is online

Users browsing this forum: andkar and 27 guests