Quantcast
Channel: MikroTik
Viewing all articles
Browse latest Browse all 15172

Beginner Basics • VLAN Isolation with IOT and Guest

$
0
0
Hi,

I bought a Mikrotik hap ax3 for my personal use. I'm an IT guy but not a network specialist and I struggle to end my network configuration. I spent a lot of time looking at different topics here and youtube videos but I can't find a way to enable VLAN filtering on my bridge. As soon as I activate it, I'm kicked out of my network and I have to reset my router.

My use case is quite simple, I want to have 4 Vlans :
- LAN with all my IT stuff and my PC (kind of admin network)
- IOT
- Camera
- Guest

LAN can access to all networks but all other networks are isolated.

I think i did all the firewall setting correctly but I guess I have an issue with the LAN configuration as everything is blocked as soon as I active VLAN Filtering.

By the way, once it will work I will remove the two default wifi, wifi 1 and wifi 2

Here is my configuration, would you have any suggestions and recommendations to improve it ?

Many thanks
Code:
/interface bridgeadd admin-mac=48:A9:8A:BD:F2:91 auto-mac=no comment=defconf name=bridge/interface wifiwave2set [ find default-name=wifi1 ] channel.band=5ghz-ax .skip-dfs-channels=\    10min-cac .width=20/40/80mhz configuration.mode=ap .ssid=MikroTik-BDF295 \    disabled=no security.authentication-types=wpa2-psk,wpa3-psk \    .connect-priority=0set [ find default-name=wifi2 ] channel.band=2ghz-ax .skip-dfs-channels=\    10min-cac .width=20/40mhz configuration.mode=ap .ssid=MikroTik-BDF296 \    disabled=no security.authentication-types=wpa2-psk,wpa3-psk/interface vlanadd interface=bridge name=vlan-camera-30 vlan-id=30add interface=bridge name=vlan-guest-90 vlan-id=90add interface=bridge name=vlan-io-20 vlan-id=20add interface=bridge name=vlan-lan vlan-id=1/interface wifiwave2add channel.band=5ghz-ax .skip-dfs-channels=10min-cac .width=20/40/80+80mhz \    configuration.mode=ap .ssid=CCGuests datapath.vlan-id=90 disabled=no \    mac-address=4A:A9:8A:BD:F2:98 master-interface=wifi1 name=CCGuest \    security.authentication-types=wpa2-psk,wpa3-psk .connect-priority=0add channel.band="(unknown)" .skip-dfs-channels=10min-cac .width="(unknown)" \    configuration.mode=ap .ssid=CCHome disabled=no mac-address=\    4A:A9:8A:BD:F2:95 master-interface=wifi1 name=CCHome \    security.authentication-types=wpa2-psk,wpa3-psk .connect-priority=0/interface listadd comment=defconf name=WANadd comment=defconf name=LAN/interface wifiwave2 securityadd authentication-types=wpa2-psk,wpa3-psk comment="IO / Camera" \    connect-priority=0 disabled=no name="IO / Camera"/interface wifiwave2add channel.band=5ghz-ax .skip-dfs-channels=10min-cac .width=20/40/80+80mhz \    configuration.mode=ap .ssid=CCCa datapath.vlan-id=30 disabled=no \    mac-address=4A:A9:8A:BD:F2:97 master-interface=wifi1 name=CCCamera \    security="IO / Camera" security.connect-priority=0add channel.band=2ghz-ax .skip-dfs-channels=10min-cac .width=20/40mhz \    configuration.mode=ap .ssid=CCIO2G datapath.vlan-id=20 disabled=no \    mac-address=4A:A9:8A:BD:F2:96 master-interface=wifi2 name=CCIO2G \    security="IO / Camera" security.connect-priority=0/ip pooladd name=default-dhcp ranges=192.168.88.10-192.168.88.254add name=dhcp_pool_io ranges=192.168.20.2-192.168.20.254add name=dhcp_pool_guest ranges=10.10.10.2-10.10.10.254add name=dhcp_pool-camera ranges=192.168.30.2-192.168.30.254/ip dhcp-serveradd address-pool=default-dhcp interface=bridge lease-time=10m name=defconfadd address-pool=dhcp_pool_io interface=vlan-io-20 lease-time=10m name=\    dhcp_ioadd address-pool=dhcp_pool_guest interface=vlan-guest-90 lease-time=10m name=\    dhcp-guestadd address-pool=dhcp_pool-camera interface=vlan-camera-30 lease-time=10m \    name=dhcp1/interface bridge portadd bridge=bridge comment=defconf interface=ether2add bridge=bridge comment=defconf interface=ether3add bridge=bridge comment=defconf interface=ether4add bridge=bridge comment=defconf interface=ether5add bridge=bridge comment=defconf interface=wifi1add bridge=bridge comment=defconf interface=wifi2add bridge=bridge interface=CCGuest pvid=90add bridge=bridge interface=CCIO2G pvid=20add bridge=bridge interface=CCCamera pvid=30add bridge=bridge interface=CCHome pvid=10/ip neighbor discovery-settingsset discover-interface-list=LAN/interface bridge vlanadd bridge=bridge comment=VLAN_HOME_1 tagged=\    bridge,CCHome,ether2,ether3,ether4,ether5 vlan-ids=1add bridge=bridge comment=VLAN_IO_20 tagged=CCIO2G,bridge vlan-ids=20add bridge=bridge comment=VLAN_CAMERA_30 tagged=CCCamera,bridge vlan-ids=30add bridge=bridge comment=VLAN_GUEST_90 tagged=CCGuest,bridge vlan-ids=90/interface list memberadd comment=defconf interface=bridge list=LANadd comment=defconf interface=ether1 list=WAN/ip addressadd address=192.168.88.1/24 comment=defconf interface=bridge network=\    192.168.88.0add address=10.10.10.1/24 comment="GUEST IP" interface=vlan-guest-90 network=\    10.10.10.0add address=192.168.20.1/24 comment=vlan-io interface=vlan-io-20 network=\    192.168.20.0add address=192.168.30.1/24 comment=vlan-camera interface=vlan-camera-30 \    network=192.168.30.0/ip dhcp-clientadd comment=defconf interface=ether1/ip dhcp-server networkadd address=10.10.10.0/24 gateway=10.10.10.1add address=192.168.20.0/24 gateway=192.168.20.1add address=192.168.30.0/24 gateway=192.168.30.1add address=192.168.88.0/24 comment=defconf dns-server=192.168.88.1 gateway=\    192.168.88.1/ip dnsset allow-remote-requests=yes/ip dns staticadd address=192.168.88.1 comment=defconf name=router.lan/ip firewall filteradd action=accept chain=input comment=\    "defconf: accept established,related,untracked" connection-state=\    established,related,untrackedadd action=drop chain=input comment="defconf: drop invalid" connection-state=\    invalidadd action=accept chain=input comment="defconf: accept ICMP" protocol=icmpadd action=accept chain=input comment=\    "defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1add action=drop chain=input comment="defconf: drop all not coming from LAN" \    in-interface-list=!LANadd action=accept chain=forward comment="defconf: accept in ipsec policy" \    ipsec-policy=in,ipsecadd action=accept chain=forward comment="defconf: accept out ipsec policy" \    ipsec-policy=out,ipsecadd action=fasttrack-connection chain=forward comment="defconf: fasttrack" \    connection-state=established,related hw-offload=yesadd action=accept chain=forward comment=\    "defconf: accept established,related, untracked" connection-state=\    established,related,untrackedadd action=drop chain=forward comment="defconf: drop invalid" \    connection-state=invalidadd action=drop chain=forward comment=\    "defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \    connection-state=new in-interface-list=WANadd action=drop chain=forward comment="Drop Guest to Mgt" dst-address=\    192.168.88.0/24 src-address=10.10.10.0/24add action=drop chain=forward comment="Drop Guest to IO" dst-address=\    192.168.20.0/24 src-address=10.10.10.0/24add action=drop chain=forward comment="Drop Guest to Camera" dst-address=\    192.168.30.0/24 src-address=10.10.10.0/24add action=drop chain=input comment="Drop Guest Input" src-address=\    10.10.10.0/24add action=drop chain=forward comment="Drop IOT To Mgt" dst-address=\    192.168.88.0/24 src-address=192.168.20.0/24add action=drop chain=forward comment="Drop IOT to Camera" dst-address=\    192.168.30.0/24 src-address=192.168.20.0/24add action=drop chain=forward comment="Drop IOT to Guest" dst-address=\    10.10.10.0/24 src-address=192.168.20.0/24add action=drop chain=input comment="Drop IOT Input" src-address=\    192.168.20.0/24add action=drop chain=forward comment="Drop Camera to Mgt" dst-address=\    192.168.88.0/24 src-address=192.168.30.0/24add action=drop chain=forward comment="Drop Camera to IOT" dst-address=\    192.168.20.0/24 src-address=192.168.30.0/24add action=drop chain=forward comment="Drop Camera to Guest" dst-address=\    10.10.10.0/24 src-address=192.168.30.0/24add action=drop chain=input comment="Drop Camera Input" src-address=\    192.168.30.0/24/ip firewall natadd action=masquerade chain=srcnat comment="defconf: masquerade" \    ipsec-policy=out,none out-interface-list=WAN/ipv6 firewall address-listadd address=::/128 comment="defconf: unspecified address" list=bad_ipv6add address=::1/128 comment="defconf: lo" list=bad_ipv6add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6add address=100::/64 comment="defconf: discard only " list=bad_ipv6add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6/ipv6 firewall filteradd action=accept chain=input comment=\    "defconf: accept established,related,untracked" connection-state=\    established,related,untrackedadd action=drop chain=input comment="defconf: drop invalid" connection-state=\    invalidadd action=accept chain=input comment="defconf: accept ICMPv6" protocol=\    icmpv6add action=accept chain=input comment="defconf: accept UDP traceroute" port=\    33434-33534 protocol=udpadd action=accept chain=input comment=\    "defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\    udp src-address=fe80::/10add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \    protocol=udpadd action=accept chain=input comment="defconf: accept ipsec AH" protocol=\    ipsec-ahadd action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\    ipsec-espadd action=accept chain=input comment=\    "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsecadd action=drop chain=input comment=\    "defconf: drop everything else not coming from LAN" in-interface-list=\    !LANadd action=accept chain=forward comment=\    "defconf: accept established,related,untracked" connection-state=\    established,related,untrackedadd action=drop chain=forward comment="defconf: drop invalid" \    connection-state=invalidadd action=drop chain=forward comment=\    "defconf: drop packets with bad src ipv6" src-address-list=bad_ipv6add action=drop chain=forward comment=\    "defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \    hop-limit=equal:1 protocol=icmpv6add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\    icmpv6add action=accept chain=forward comment="defconf: accept HIP" protocol=139add action=accept chain=forward comment="defconf: accept IKE" dst-port=\    500,4500 protocol=udpadd action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\    ipsec-ahadd action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\    ipsec-espadd action=accept chain=forward comment=\    "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsecadd action=drop chain=forward comment=\    "defconf: drop everything else not coming from LAN" in-interface-list=\    !LAN/system clockset time-zone-name=Europe/Paris/system noteset show-at-login=no/tool mac-serverset allowed-interface-list=LAN/tool mac-server mac-winboxset allowed-interface-list=LAN

Statistics: Posted by DGK — Wed Dec 27, 2023 11:54 pm



Viewing all articles
Browse latest Browse all 15172

Trending Articles