Community discussions

MikroTik App
 
aarango
Member Candidate
Member Candidate
Topic Author
Posts: 158
Joined: Wed Nov 30, 2016 7:55 am

Question about 2 subnet

Mon Aug 07, 2017 12:56 pm

Hi,

I have this plan:
2 ISP and 1 router Mikrotik.
Port 1 Mikrotik has 1 ISP connected
Port 2 Mikrotik has another ISP connected
Port 3 Mikrotik has a switch for internal network
Port 4 Mikrotik has another switch for internal network

Internal network is in subnet 192.168.90.0/32 (second ISP) and servers is in 192.168.1.0/32 (first ISP). From internal subnet I can ping servers and viceversa, its ok.

The question is, when I access from internal subnet (192.168.90.30) to any server (192.168.1.20), on server I see as source 192.168.1.1 ( main IP of ISP - same IP router really ). Are there way to see internal IP when I access from internal subnet to servers?

Thanks!
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: Question about 2 subnet

Mon Aug 07, 2017 2:26 pm

Yes, make adjustments to your Firewall NAT rules.
It looks like they are wrong right now, you should have NAT only for traffic outgoing to internet, not to your second LAN.
 
aarango
Member Candidate
Member Candidate
Topic Author
Posts: 158
Joined: Wed Nov 30, 2016 7:55 am

Re: Question about 2 subnet

Mon Aug 07, 2017 3:50 pm

Thanks for reply.

In NAT I have only a masquerade
[admin@MikroTik] /ip firewall nat> print
 0    chain=srcnat action=masquerade log=no 
Rest rules on NAT are for specific ports. Should I create any extra rule?

Regards.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: Question about 2 subnet

Mon Aug 07, 2017 3:54 pm

This rule is too broad!
You need to narrow it with output-interface, like it was before you modified it.
When you have to internet interfaces, create another rule like that.
 
aarango
Member Candidate
Member Candidate
Topic Author
Posts: 158
Joined: Wed Nov 30, 2016 7:55 am

Re: Question about 2 subnet

Tue Aug 08, 2017 8:48 am

This rule is too broad!
You need to narrow it with output-interface, like it was before you modified it.
When you have to internet interfaces, create another rule like that.
Could you let me know some more information? This is a real connection with employees working all time, I do not want to leave employees without internet.

Thanks you!
 
erikhp
Trainer
Trainer
Posts: 7
Joined: Sat Aug 22, 2009 2:12 am

Re: Question about 2 subnet

Tue Aug 08, 2017 10:17 am

Hello aarango, as pe1chl says, you should be more specific on NAT rules, the one you have:
 0    chain=srcnat action=masquerade log=no 
masquerade's all the traffic passing through the router, this is not recommended as it will consume (unnecessarily) a lot of resources in your router.
In your case, you should try src-nat/masquerade the traffic that goes to the outside of your network like:
 
 chain=srcnat action=masquerade out-interface=ether1 log=no log-prefix="" 
 chain=srcnat action=masquerade out-interface=ether2 log=no log-prefix="" 
This could work for you.
 
aarango
Member Candidate
Member Candidate
Topic Author
Posts: 158
Joined: Wed Nov 30, 2016 7:55 am

Re: Question about 2 subnet

Wed Aug 09, 2017 9:41 am

Hello aarango, as pe1chl says, you should be more specific on NAT rules, the one you have:
 0    chain=srcnat action=masquerade log=no
masquerade's all the traffic passing through the router, this is not recommended as it will consume (unnecessarily) a lot of resources in your router.
In your case, you should try src-nat/masquerade the traffic that goes to the outside of your network like:
 
 chain=srcnat action=masquerade out-interface=ether1 log=no log-prefix="" 
 chain=srcnat action=masquerade out-interface=ether2 log=no log-prefix="" 
This could work for you.
Done! and its working fine. Thanks!!!

Who is online

Users browsing this forum: vingjfg and 29 guests