Community discussions

MikroTik App
 
raabs
just joined
Topic Author
Posts: 4
Joined: Tue Oct 23, 2012 6:48 pm

Public IPs behind NAT

Tue Oct 23, 2012 7:08 pm

Hi All. I've lurked here for a long time and the help of this board has been invaluable but this is my first post. I've searched the board and googled the subject and spent days trying approaches that I have read but I'm stuck.

RB 750G, ROS 5.2 I am trying to setup a network with natted private addresses and a few public IPs.

I have a /29 from the provider which will expand shortly. I can get the natted addresses to connect using masquerade with the source addresse set to the private address network range (thinking it would nat only the private addresses and not the public). I cannot get the public IP's to connect. If I turn all of the interfaces into a switch with a master of ether1, then all will connect but routing rules/queues don't apply to the public ip's and I can't even see the traffic on them.

I'm not sure if I have to have the provider set something additional up or if I am just missing something. A network diagram is below. Thanks for any help!!

Image
 
raabs
just joined
Topic Author
Posts: 4
Joined: Tue Oct 23, 2012 6:48 pm

Re: Public IPs behind NAT

Wed Oct 24, 2012 5:42 pm

Can anybody help? There has got to be people doing this. Thanks in advance.
 
User avatar
hegars
just joined
Posts: 19
Joined: Sun Feb 05, 2012 9:30 am
Location: Melbourne, AU
Contact:

Re: Public IPs behind NAT

Mon Oct 29, 2012 6:08 am

What are you running on the external hosts?

How many external IP's do you need inside your network?

Because right now in your diagram you have network overlapping, that is the same 'network' is split over the ether1 and ether2-local which you cant really do.

205.83.26.216 <- Network Address
205.83.26.217 <- ISP Gateway
205.83.26.218 >- *potential host
205.83.26.219 >- Your Mikrotik
205.83.26.220 >- *potential host
205.83.26.221 >- *potential host
205.83.26.222 >- *potential host
205.83.26.223 <- Broadcast

You could use DNatting, but your "exteranl hosts" on the local side of the network would have internal addresses. so depending on what you want to achieve look at these
http://wiki.mikrotik.com/wiki/How_to_li ... Local_ones
http://wiki.mikrotik.com/wiki/Hairpin_NAT

Can your ISP give you a /30 on your link side and then route the /29 to that /30? this way you can safely have a DMZ and you will be able to protect all the host with external IPs on it with a firewall from the mikrotik.

/30
xxx.xxx.xxx.0 <- Network Address
xxx.xxx.xxx.1 <- ISP Gateway
xxx.xxx.xxx.2 <- Your Mikrotik
xxx.xxx.xxx.3 <- Broadcast

Then the route to the 29 net.
ip route 205.83.26.216 255.255.255.248 xxx.xxx.xxx.2

/29
205.83.26.216 <- Network Address
205.83.26.217 <- Your Mikrotik
205.83.26.218 >- *potential host
205.83.26.219 >- *potential host
205.83.26.220 >- *potential host
205.83.26.221 >- *potential host
205.83.26.222 >- *potential host
205.83.26.223 <- Broadcast

hope that helps