Hi, I'm having trouble getting some aspects of our router config to work. (I'm a programmer not a network admin.)
4 weeks of reading the wiki, asking admins and looking around on the net still leave some things unclear.
That is what we are trying to make work:
NetworkTopology.png
We got 5 IPs from the ISP. Those should be "mapped" to 5 LANs.
The LAN-interfaces are set up as 5 switch groups plus a 3 ports which are purely a switch.
The two web-servers need to be accessible from the outside on port 80 and 433.
User1, Office and RemoteUser need to be able to manage/ remote control any of the servers.
The workers need to be able to access the NAS. (to avoid routing in favor of switching, I consider moving it to .2.0)
User1, User2, Office and RemoteUser need to be able to access the NAS.
User1 and User2 are sometimes gaming so need some ports open for that.
RemoteUser should be able to join in old LAN-games. (nice to have)
Office and RemoteUser should connect to the LAN as securely as possible. I would prefer IPsec with certificates and xAuth but could not get that to work yet. OpenVPN with certificates is working.
All of the PCs and laptops, the Controller and the workers run Windows10 Pro, while the web- and db-servers run Linux.
Problem:
While the different LANs can ping the other gateways, they can not reach any computer on another LAN. That also makes my openVPN useless other than to control the router. It seems the packages are not even routed. I disabled the firewall and it had no effect. Rules to log all traffic on the input and forward chains show no packages from the ping attempts. However pings to the gateways do show up in the log. I can ping the machines on all LANs from the router. The funny part is - it did work once for a few hours. Sadly I have no idea if or what I changed. Regretfully I did not make a backup right away.
As a side note. Can some one explain what the difference is between masquerading and src-nat? It seems very similar to me, but I read that for our setup src-net + dst-nat is the way to go.
I also want to get IPsec to work for Windows10 road-warriors but I post that as a separate question later.
[admin@MikroTik] > export
may/01/2016 12:07:57 by RouterOS 6.35.1
software id = 20TM-IYW2
/interface ethernet
set [ find default-name=ether1 ] name=e01-WAN-Master
set [ find default-name=ether2 ] name="e02-Control-Master(Solo)"
set [ find default-name=ether3 ] name=e03-LAN-User1-Master
set [ find default-name=ether4 ] master-port=e03-LAN-User1-Master name=e04-LAN-User1
set [ find default-name=ether5 ] master-port=e03-LAN-User1-Master name=e05-LAN-User1
set [ find default-name=ether6 ] master-port=e03-LAN-User1-Master name=e06-LAN-User1
set [ find default-name=ether7 ] master-port=e03-LAN-User1-Master name=e07-LAN-User1
set [ find default-name=ether8 ] master-port=e03-LAN-User1-Master name=e08-LAN-User1
set [ find default-name=ether9 ] name=e09-LAN-Servers1-Master
set [ find default-name=ether10 ] master-port=e09-LAN-Servers1-Master name=e10-LAN-Servers1
set [ find default-name=ether11 ] master-port=e09-LAN-Servers1-Master name=e11-LAN-Servers1
set [ find default-name=ether12 ] master-port=e09-LAN-Servers1-Master name=e12-LAN-Servers1
set [ find default-name=ether13 ] name=e13-LAN-Workers-Master
set [ find default-name=ether14 ] master-port=e13-LAN-Workers-Master name=e14-LAN-Workers
set [ find default-name=ether15 ] master-port=e13-LAN-Workers-Master name=e15-LAN-Workers
set [ find default-name=ether16 ] master-port=e13-LAN-Workers-Master name=e16-LAN-Workers
set [ find default-name=ether17 ] name=e17-LAN-User2-Master
set [ find default-name=ether18 ] master-port=e17-LAN-User2-Master name=e18-LAN-User2
set [ find default-name=ether19 ] master-port=e17-LAN-User2-Master name=e19-LAN-User2
set [ find default-name=ether20 ] master-port=e17-LAN-User2-Master name=e20-LAN-User2
set [ find default-name=ether21 ] name=e21-LAN-Servers2
set [ find default-name=ether22 ] name=e22-LAN-Switch-Master
set [ find default-name=ether23 ] master-port=e22-LAN-Switch-Master name=e23-LAN-Switch
set [ find default-name=ether24 ] master-port=e22-LAN-Switch-Master name=e24-LAN-Switch
set [ find default-name=sfp1 ] master-port=e01-WAN-Master name=sfp1-WAN
/ip route
add distance=1 gateway=1.2.3.97
/ip pool
add name=dhcp_pool_User1 ranges=192.168.0.100-192.168.0.200
add name=dhcp_pool_Servers1 ranges=192.168.1.100-192.168.1.200
add name=dhcp_pool_Workers ranges=192.168.2.100-192.168.2.200
add name=dhcp_pool_User2 ranges=192.168.3.100-192.168.3.200
add name=dhcp_pool_Servers2 ranges=192.168.4.100-192.168.4.200
/ip dhcp-server
add address-pool=dhcp_pool_User1 disabled=no interface=e03-LAN-User1-Master lease-time=3d name=dhcp-LAN-User1
add address-pool=dhcp_pool_Servers1 disabled=no interface=e09-LAN-Servers1-Master lease-time=3d name=dhcp-LAN-Servers1
add address-pool=dhcp_pool_Workers disabled=no interface=e13-LAN-Workers-Master lease-time=3d name=dhcp-LAN-Workers
add address-pool=dhcp_pool_User2 disabled=no interface=e17-LAN-User2-Master lease-time=3d name=dhcp-LAN-User2
add address-pool=dhcp_pool_Servers2 disabled=no interface=e21-LAN-Servers2 lease-time=3d name=dhcp-LAN-Servers2
/ip dhcp-server network
add address=192.168.0.0/24 dns-server=192.168.0.1,212.54.44.54,212.54.40.25 gateway=192.168.0.1
add address=192.168.1.0/24 dns-server=192.168.1.1,212.54.44.54,212.54.40.25 gateway=192.168.1.1
add address=192.168.2.0/24 dns-server=192.168.2.1,212.54.44.54,212.54.40.25 gateway=192.168.2.1
add address=192.168.3.0/24 dns-server=192.168.3.1,212.54.44.54,212.54.40.25 gateway=192.168.3.1
add address=192.168.4.0/24 dns-server=192.168.4.1,212.54.44.54,212.54.40.25 gateway=192.168.4.1
/ip dns
set servers=212.54.44.54,212.54.40.25,8.8.8.8,8.8.4.4
/ip dns static
add address=192.168.1.10 name=company-web
add address=192.168.1.15 name=company-db
/ip firewall filter
RouterOS - RouterOS - MikroTik Documentation
plus rules to open ports for some games, DNS, IPsec, openVPN is on port 433
/ip firewall nat
add action=src-nat chain=srcnat out-interface=e01-WAN-Master src-address=192.168.0.0/24 to-addresses=1.2.3.98
add action=src-nat chain=srcnat out-interface=e01-WAN-Master src-address=192.168.1.0/24 to-addresses=1.2.3.99
add action=src-nat chain=srcnat out-interface=e01-WAN-Master src-address=192.168.2.0/24 to-addresses=1.2.3.100
add action=src-nat chain=srcnat out-interface=e01-WAN-Master src-address=192.168.3.0/24 to-addresses=1.2.3.101
add action=src-nat chain=srcnat out-interface=e01-WAN-Master src-address=192.168.4.0/24 to-addresses=1.2.3.102
add action=dst-nat chain=dstnat comment="HTTP to Webserver1" dst-address=1.2.3.99 dst-port=80 in-interface=e01-WAN-Master protocol=tcp to-addresses=192.168.1.10 to-ports=80
plus a few more to forward other ports
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=e03-LAN-User1-Master type=internal
add interface=e17-LAN-User2-Master type=internal
add forced-ip=1.2.3.98 interface=e01-WAN-Master type=external
add disabled=yes interface=e04-LAN-User1 type=internal
add disabled=yes interface=e05-LAN-User1 type=internal
add disabled=yes interface=e06-LAN-User1 type=internal
add disabled=yes interface=e07-LAN-User1 type=internal
add disabled=yes interface=e08-LAN-User1 type=internal
IPsec and openVPN settings omitted to make it not any longer than it already is
can provide those if needed
>