Community discussions

MikroTik App
 
joie
newbie
Topic Author
Posts: 49
Joined: Tue May 22, 2007 10:49 pm

Route internal subnet to locally assigned public subnet

Sun Feb 27, 2011 10:08 am

I've got an internal 192.168.1.X/24 subnet with 192.168.1.1 as the gateway and an external 204.228.X.X/29 public subnet with web and email ports dst-nat to local IP's. I masquarade my internal subnet to the internet and all works well except it also masquarades my internals to the nated IP's, so all my internal PC's show up as 192.168.1.1 in the server log files. If I connect to www.domainname.com from an internal PC with IP 192.1689.1.100 and then go look at the log files on the server it shows the connection is from 192.168.1.1. Is there a way to bypass maquarade and route the internal 192.168.1.X/24 to the public IP's so that the PC's will show there local IP in the server log files and not the masquaraded IP.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Route internal subnet to locally assigned public subnet

Sun Feb 27, 2011 6:50 pm

No, unless you connect to the inside IP directly (which you aren't if you connect by DNS names resolving to public IPs$.
http://wiki.mikrotik.com/wiki/Hairpin_NAT
 
vlad8
Frequent Visitor
Frequent Visitor
Posts: 61
Joined: Wed Feb 09, 2011 3:42 pm

Re: Route internal subnet to locally assigned public subnet

Mon Feb 28, 2011 2:54 pm

you could assign public ips to internal servers instead of doing dst-nat
 
joie
newbie
Topic Author
Posts: 49
Joined: Tue May 22, 2007 10:49 pm

Re: Route internal subnet to locally assigned public subnet

Tue Mar 01, 2011 6:48 am

Well damn.

I had tried everything I could think of so I figured it wasn't possible but I was hoping I'd overlooked something.

Vlad, More servers than IP's plus even if I had an IP per server I'd still NAT for the firewall.

Thanks for the response guys.
 
vlad8
Frequent Visitor
Frequent Visitor
Posts: 61
Joined: Wed Feb 09, 2011 3:42 pm

Re: Route internal subnet to locally assigned public subnet

Wed May 18, 2011 6:24 pm

Vlad, More servers than IP's plus even if I had an IP per server I'd still NAT for the firewall.
if you have public ips on each server there's no reason why you'd masquerade them...
NAT and firewall filter don't need eachother to run