Riesil som to z AI a poziadavky boli 2 oddelene siete (napr. personal a hostia). Najlepsie rozhodnutie bolo vytvorit VLAN.
V budove je jeden hlavny MK na ktorom je zdroj internetu a 2 AP. Kedze capsman sa mi zdal dost zlozity, tak som vytvoril (ako som uz spominal vyssie).
Kladne mozem jednu siet 5GHz, alebo 2.4GHz vynut a pouzit len jednu siet, lebo signal z tych AP sa siri velmi biedne. Avsak nechal som zatial obe pasma zpnute.
Spravil som to tak, ze su tam vlastne 4 WLAN
Siet 2.4GHz a 5GHz pre hosti
Siet 2.4GHz a 5GHz pre pesonal
Su nastavene identicky a ako som pisal zmenene su len system identity, IP adresy pre AP, 192.168.150.5, resp. 192.168.150.6 a kanaly pre wifi ab sa neprekryvali.
Predpokladal som, ze to bude fungovat. Ono to sice funguje, ale nie dobre.
Takto asi vyzera hlavny MK
/interface bridge
add name=bridge1 vlan-filtering=yes
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1 name=pppoe-out1 use-peer-dns=yes user=xxx
/interface wireguard
add comment=wg_server_linux listen-port=51832 mtu=1420 name=wireguard1
/interface vlan
add interface=bridge1 name=vlan_20 vlan-id=20
/interface list
add name=LAN
/ip pool
add name=dhcp_pool0 ranges=192.168.0.2-192.168.0.254
add name=dhcp_pool1 ranges=192.168.150.100-192.168.150.254
add name=pool_vlan_20 ranges=192.168.20.10-192.168.20.100
add name=dhcp_pool3 ranges=192.168.20.100-192.168.20.200
/ip dhcp-server
add address-pool=dhcp_pool1 interface=bridge1 name=dhcp1
add address-pool=dhcp_pool3 interface=vlan_20 name=dhcp2
/port
set 0 name=serial0
/interface bridge port
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether3
add bridge=bridge1 interface=ether4
add bridge=bridge1 interface=ether7
add bridge=bridge1 interface=ether5
add bridge=bridge1 interface=ether6
add bridge=bridge1 interface=ether8
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface bridge vlan
add bridge=bridge1 tagged=bridge1,ether7 vlan-ids=20
/interface list member
add interface=bridge1 list=LAN
/interface wireguard peers
add allowed-address=0.0.0.0/0 comment=wg_client endpoint-address=wireg.net endpoint-port=51832 interface=wireguard1 name=peer2 persistent-keepalive=25s preshared-key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=" public-key=\
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx="
/ip address
add address=192.168.150.1/24 interface=bridge1 network=192.168.150.0
add address=10.10.5.3/24 interface=wireguard1 network=10.10.5.0
add address=192.168.20.1/24 interface=vlan_20 network=192.168.20.0
/ip cloud
set update-time=no
/ip dhcp-client
add interface=ether1
/ip dhcp-server network
add address=192.168.20.0/24 dns-server=1.1.1.1,8.8.8.8 gateway=192.168.20.1
add address=192.168.150.0/24 dns-server=192.168.150.1 gateway=192.168.150.1
/ip dns
set allow-remote-requests=yes
/ip firewall filter
add action=accept chain=input comment="accept established,related,untracked" connection-state=established,related,untracked
add action=drop chain=forward comment=BLOKUJ_GUEST_TO_PERSONAL dst-address=192.168.150.0/24 src-address=192.168.20.0/24
add action=accept chain=input comment="Allow WireGuard management" disabled=yes in-interface=wireguard1
add action=accept chain=forward comment="Allow WG access to LAN" disabled=yes in-interface=wireguard1
add action=drop chain=input comment="drop invalid" connection-state=invalid
add action=accept chain=input comment="accept ICMP" in-interface=pppoe-out1 protocol=icmp
add action=accept chain=input comment="allow Winbox" in-interface=pppoe-out1 port=8291 protocol=tcp
add action=accept chain=input comment="allow SSH" in-interface=pppoe-out1 port=22 protocol=tcp
add action=drop chain=input comment="block everything else" in-interface=pppoe-out1
add action=fasttrack-connection chain=forward connection-state=established,related hw-offload=yes
/ip firewall nat
add action=masquerade chain=srcnat out-interface=pppoe-out1
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh port=2200
set api disabled=yes
/system clock
set time-zone-autodetect=no time-zone-name=Europe/Bratislava
/system note
set show-at-login=no
/system ntp client
set enabled=yes
/system ntp client servers
add address=0.sk.pool.ntp.org
add address=1.sk.pool.ntp.org
/system routerboard settings
set enter-setup-on=delete-key
/tool bandwidth-server
set enabled=no
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN