i am setting up my home network and need some help to understand firewall / routing please.
Last week i successfully setup my RB5009 with VLANS following the guide from pcunite.
I added an aruba switch to the trunk port ether8 and it's working fine. I can reach the WAN and also communicate between VLANS, which i want to be able to.
My use case is that if i connect a computer to the BLUE VLAn it should route normally to WAN and when i connect a computer to the GREEN VLAN it should go through a IPsec to NordVPN (to access streaming content of another country).
So i followed the guide at https://support.nordvpn.com/Connectivit ... ordVPN.htm and that part worked great as well.
But when I have the VPN active my clients cannot communicate anymore to the other VLANS. A ping from a client with IP 192.168.2.27 to 192.168.1.3 fails with a response from a host in the VPN Network (185.196.x.x address: Reply from 185.196.xx.x: Destination host unreachable.) I am toggling the VPN on/off by activating/deactivating the address list 'over-vpn' btw.
What is the best way to route any traffic intended for any of my own VLANS to go to them and not over the IPsec tunnel?
Here is my config:
Code: Select all
# jan/11/2022 14:15:26 by RouterOS 7.2rc1
# software id = C5MD-RX8K
#
# model = RB5009UG+S+
/interface bridge
add name=BR1 protocol-mode=none vlan-filtering=yes
/interface vlan
add interface=BR1 name=BASE_VLAN vlan-id=99
add interface=BR1 name=BLUE_VLAN vlan-id=10
add interface=BR1 name=GREEN_VLAN vlan-id=20
/interface list
add name=WAN
add name=VLAN
add name=BASE
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip dhcp-server option
add code=43 name=unifi value=0x0104C0A80103
/ip ipsec mode-config
add name=NordVPN responder=no src-address-list=over-vpn
/ip ipsec policy group
add name=NordVPN
/ip ipsec profile
add name=NordVPN
/ip ipsec peer
add address=xxxxx.nordvpn.com exchange-mode=ike2 name=NordVPN profile=\
NordVPN
/ip ipsec proposal
add name=NordVPN pfs-group=none
/ip pool
add name=BLUE_POOL ranges=192.168.1.20-192.168.1.254
add name=GREEN_POOL ranges=192.168.2.20-192.168.2.254
add name=BASE_POOL ranges=192.168.88.20-192.168.88.254
/ip dhcp-server
add address-pool=BLUE_POOL interface=BLUE_VLAN name=BLUE_DHCP
add address-pool=GREEN_POOL interface=GREEN_VLAN name=GREEN_DHCP
add address-pool=BASE_POOL interface=BASE_VLAN name=BASE_DHCP
/interface bridge port
add bridge=BR1 frame-types=admit-only-untagged-and-priority-tagged interface=\
ether2 pvid=99
add bridge=BR1 frame-types=admit-only-untagged-and-priority-tagged interface=\
ether3 pvid=10
add bridge=BR1 frame-types=admit-only-untagged-and-priority-tagged interface=\
ether4 pvid=20
add bridge=BR1 frame-types=admit-only-vlan-tagged interface=ether5
add bridge=BR1 frame-types=admit-only-vlan-tagged interface=ether6
add bridge=BR1 frame-types=admit-only-vlan-tagged interface=ether7
add bridge=BR1 frame-types=admit-only-vlan-tagged interface=ether8
add bridge=BR1 frame-types=admit-only-vlan-tagged interface=sfp-sfpplus1
/ip neighbor discovery-settings
set discover-interface-list=all
/interface bridge vlan
add bridge=BR1 tagged=BR1,ether3,ether5,ether6,ether7,ether8,sfp-sfpplus1 \
vlan-ids=10
add bridge=BR1 tagged=ether4,ether5,ether6,ether7,ether8,sfp-sfpplus1,BR1 \
vlan-ids=20
add bridge=BR1 tagged=BR1,ether2,ether5,ether6,ether7,ether8,sfp-sfpplus1 \
vlan-ids=99
/interface detect-internet
set detect-interface-list=all
/interface list member
add interface=ether1 list=WAN
add interface=BASE_VLAN list=VLAN
add interface=BLUE_VLAN list=VLAN
add interface=GREEN_VLAN list=VLAN
add interface=BASE_VLAN list=BASE
/ip address
add address=192.168.88.1/24 interface=BASE_VLAN network=192.168.88.0
add address=192.168.1.1/24 interface=BLUE_VLAN network=192.168.1.0
add address=192.168.2.1/24 interface=GREEN_VLAN network=192.168.2.0
/ip dhcp-client
add comment=defconf interface=ether1
/ip dhcp-server lease
add address=192.168.1.8 client-id=1:0:a0:98:63:9a:97 mac-address=\
00:A0:98:63:9A:97 server=BLUE_DHCP
add address=192.168.1.10 client-id=1:2:25:90:9c:d6:9b mac-address=\
02:25:90:9C:D6:9B server=BLUE_DHCP
add address=192.168.1.3 client-id=1:2:25:90:87:0:b5 mac-address=\
02:25:90:87:00:B5 server=BLUE_DHCP
add address=192.168.1.9 client-id=1:2:25:90:40:ed:c3 mac-address=\
02:25:90:40:ED:C3 server=BLUE_DHCP
add address=192.168.1.6 client-id=1:2:25:90:14:fa:a mac-address=\
02:25:90:14:FA:0A server=BLUE_DHCP
add address=192.168.1.5 client-id=1:2:25:90:ba:b5:82 mac-address=\
02:25:90:BA:B5:82 server=BLUE_DHCP
/ip dhcp-server network
add address=192.168.1.0/24 dns-server=192.168.1.1 gateway=192.168.1.1
add address=192.168.2.0/24 dns-server=192.168.2.1 gateway=192.168.2.1
add address=192.168.88.0/24 dns-server=192.168.88.1 gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes servers=1.1.1.1,1.0.0.1 use-doh-server=\
https://cloudflare-dns.com/dns-query verify-doh-cert=yes
/ip dns static
add address=192.168.88.1 name=router.lan
add address=192.168.88.2 name=switch.lan
add address=192.168.1.4 name=freenas.lan
add address=192.168.1.5 name=nextcloud.lan
add address=192.168.1.7 name=unifi.lan
add address=192.168.1.9 name=zoneminder.lan
/ip firewall address-list
add address=192.168.2.0/24 list=over-vpn
/ip firewall filter
add action=accept chain=input comment="Allow Estab & Related" \
connection-state=established,related
add action=accept chain=input comment="Allow VLAN" in-interface-list=VLAN
add action=accept chain=input comment="Allow Base_Vlan Full Access" \
in-interface=BASE_VLAN
add action=drop chain=input comment=Drop
add action=accept chain=forward comment="Allow Estab & Related" \
connection-state=established,related
add action=accept chain=forward comment="VLAN Internet Access only" \
connection-state=new disabled=yes in-interface-list=VLAN \
out-interface-list=WAN
add action=accept chain=forward comment=\
"VLAN Internet Access and VLAN access" connection-state=new \
in-interface-list=VLAN out-interface-list=all
add action=drop chain=forward comment=Drop
/ip firewall nat
add action=masquerade chain=srcnat comment="Default masquerade" \
out-interface-list=WAN
/ip ipsec identity
add auth-method=eap certificate="" eap-methods=eap-mschapv2 generate-policy=\
port-strict mode-config=NordVPN peer=NordVPN policy-template-group=\
NordVPN username=xxxxx
/ip ipsec policy
add dst-address=0.0.0.0/0 group=NordVPN proposal=NordVPN src-address=\
0.0.0.0/0 template=yes
/system clock
set time-zone-name=America/New_York
/system identity
set name=RouterSwitchAP
/system routerboard settings
set cpu-frequency=auto
/tool mac-server
set allowed-interface-list=VLAN
/tool mac-server mac-winbox
set allowed-interface-list=VLAN