Community discussions

MikroTik App
 
adrcomms
newbie
Topic Author
Posts: 35
Joined: Fri Feb 10, 2012 11:58 am
Contact:

How to create a gateway

Sun Sep 01, 2013 12:08 pm

Hi Forum

I have just got a /22 ipv4 range from ripe and have a downstream carrier that is announcing my IP's.

The downstream providor has given me a public ip and route to use on our router for peering and this works fine, we can access the net, i can also issue public ip's to customers can these are present and show the correct public ip.

The issue im having is that i have nat pool for some customers and want them to be presented over just one of our public ip's, what i need to know is what route rule should i add and how.

I have the 1st public from our /22 range sat on the WAN int, if i add a rule to say 0.0.0.0/0 via 185.32.xxx.x then traffic stops.

Adrian
 
CelticComms
Forum Guru
Forum Guru
Posts: 1765
Joined: Wed May 02, 2012 5:48 am

Re: How to create a gateway

Sun Sep 01, 2013 3:35 pm

Typically for the NATed customers their default route would be sending traffic towards the NAT point and there you would be using a SRC NAT rule to create the NATed traffic.

Can you show the config that you have tried?
 
adrcomms
newbie
Topic Author
Posts: 35
Joined: Fri Feb 10, 2012 11:58 am
Contact:

Re: How to create a gateway

Sun Sep 01, 2013 10:35 pm

I only have Masq rules for the nat so all 172.16.x.x go out via the set interface i.e wan

can you give me a example

my public ip 185.32.10x.xxx and my nat range is 172.16.x.x

Adrian
 
CelticComms
Forum Guru
Forum Guru
Posts: 1765
Joined: Wed May 02, 2012 5:48 am

Re: How to create a gateway

Mon Sep 02, 2013 2:42 am

If you want certain traffic to head out the WAN interface using a different specific public IP different from that which the Masquerade rule will use then place a SRC NAT rule with suitable selectors (e.g. SRC Address) above the Masquerade rule and use Action SRC NAT - e.g.:
add action=src-nat chain=srcnat out-interface=etherX src-address=E.F.G.H-J.K.L.M to-addresses=A.B.C.D
 
adrcomms
newbie
Topic Author
Posts: 35
Joined: Fri Feb 10, 2012 11:58 am
Contact:

Re: How to create a gateway

Mon Sep 02, 2013 10:34 am

That worked great thanks, I just added ctp and udp srcnat rule

thanks Adrian

Who is online

Users browsing this forum: anav and 67 guests