Community discussions

MikroTik App
 
undecided
Member Candidate
Member Candidate
Topic Author
Posts: 107
Joined: Mon May 16, 2011 11:07 am

Adding additional public IP's to an interface

Thu Nov 14, 2013 8:47 am

Currently have my mikrotik configured with one wan interface called "wan", I've been assigned a public IP address/subnet which is a 30 subnet...so just the one usable IP address. My router is set to NAT/Masquerade out interface "wan".

My ISP will now issue me a few more IP's, so from a 30 subnet I will go to a 29 subnet. I will be using one of these new IP's for an email server, I want to dedicate this IP for email use only, no internet traffic should go via this IP.

My questions are, how do I assign two IP's to the same interface, and how do I NAT from both but only allow smtp from one...and the rest of the data from the other IP....the NAT is done on the interface name so not too sure how I tell it to differentiate.

Any help much appreciated!
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Adding additional public IP's to an interface

Thu Nov 14, 2013 10:31 am

if you have ip addresses from same subnet - then there will be issues - just assign address to the same interface.

for SRC nat you have two options - masquerade where source address is chosen automatically, ir you can use action=srcnat and set to what address packets passing should be source-natted.
 
undecided
Member Candidate
Member Candidate
Topic Author
Posts: 107
Joined: Mon May 16, 2011 11:07 am

Re: Adding additional public IP's to an interface

Thu Nov 14, 2013 4:28 pm

Thank you Janisk, I see what you mean about the "action=src-nat".

But how do i seperate the traffic so that internet traffic only goes down IP1 and SMTP only goes down IP2?

i currently have PCC load balancing across 4 wan links, I dont want to create a mangle rule that disrupts this. So the end result will be to have 1 of the 4 wan links configured with a 29 subnet, I will then continue splitting internet traffic across all 4 wan links using PCC, but I will have and extra IP assigned to one of the wan links and this will be dedicated to smtp only.

Thanks so far for your help!

Who is online

Users browsing this forum: deejay2, GoogleOther [Bot], GSULLCA, kakiharaNL and 159 guests