Hello,
I’m using “pcunite Router-Switch-AP all in one device” even more simplified.
Basically I just wanted to isolate Wifi and decent security.
Here is my configuration with sensitive data removed.
# apr/09/2023 08:38:26 by RouterOS 7.8
# software id = aaaa
# model = C53UiG+5HPaxD2HPaxD
# serial number = bbbb
/interface bridge
add name=BR1 protocol-mode=none vlan-filtering=yes
/interface wifiwave2
set [ find default-name=wifi1 ] channel.band=5ghz-ax .skip-dfs-channels=\
10min-cac .width=20/40/80mhz configuration.country=xxx .mode=ap \
.ssid=MikroTik-A disabled=no security.authentication-types=wpa2-psk,wpa3-psk .passphrase=blabla
set [ find default-name=wifi2 ] channel.band=2ghz-ax .skip-dfs-channels=\
10min-cac .width=20/40mhz configuration.country=xxx .mode=ap .ssid=\
MikroTik-B disabled=no security.authentication-types=wpa2-psk,wpa3-psk .passphrase=blabla
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1 name=pppoe-out1 password=bla user=bla
/ipv6 settings
set disable-ipv6=yes
/ip cloud
set ddns-enabled=yes
/interface vlan
add interface=BR1 name=BASE_VLAN vlan-id=99
add interface=BR1 name=BLUE_VLAN vlan-id=10
/interface list
add name=WAN
add name=VLAN
add name=BASE
/ip pool
add name=BASE_POOL ranges=192.168.88.10-192.168.88.254
add name=BLUE_POOL ranges=10.0.10.2-10.0.10.254
/ip dhcp-server
add address-pool=BASE_POOL interface=BASE_VLAN lease-time=8h name=BASE_DHCP
add address-pool=BLUE_POOL interface=BLUE_VLAN lease-time=8h name=BLUE_DHCP
/interface bridge port
add bridge=BR1 frame-types=admit-only-untagged-and-priority-tagged interface=wifi1 pvid=10
add bridge=BR1 frame-types=admit-only-untagged-and-priority-tagged interface=wifi2 pvid=10
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=99
add bridge=BR1 frame-types=admit-only-untagged-and-priority-tagged interface=ether4 pvid=99
add bridge=BR1 frame-types=admit-only-untagged-and-priority-tagged interface=ether5 pvid=99
/interface bridge vlan
add bridge=BR1 tagged=BR1 vlan-ids=10
add bridge=BR1 tagged=BR1 vlan-ids=99
/interface list member
add interface=ether1 list=WAN
add interface=pppoe-out1 list=WAN
add interface=BLUE_VLAN list=VLAN
add interface=BASE_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=10.0.10.1/24 interface=BLUE_VLAN network=10.0.10.0
/ip dhcp-server network
add address=10.0.10.0/24 dns-server=10.0.10.1 gateway=10.0.10.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 use-doh-server=https://dns.quad9.net/dns-query verify-doh-cert=yes
/ip dns static
add address=9.9.9.9 name=dns.quad9.net
add address=149.112.112.112 name=dns.quad9.net
/ip firewall filter
1. add action=accept chain=input comment="Allow Estab & Related" connection-state=established,related
2. add action=accept chain=input comment="Allow VLAN DNS" dst-port=53 in-interface-list=VLAN protocol=udp
3. add action=accept chain=input comment="Allow VLAN DNS" dst-port=53 in-interface-list=VLAN protocol=tcp
4. add action=accept chain=input comment="Allow Base_Vlan Full Access" in-interface=BASE_VLAN
5. add action=drop chain=input comment=Drop
6. add action=accept chain=forward comment="Allow Estab & Related" connection-state=established,related
7. add action=accept chain=forward comment="VLAN Internet Access only" connection-state=new in-interface-list=VLAN out-interface-list=WAN
8. add action=accept chain=forward comment="allow port forwarding" connection-nat-state=dstnat
9. add action=drop chain=forward comment=Drop
/ip firewall nat
add action=masquerade chain=srcnat comment="Default masquerade" out-interface-list=WAN
add action=dst-nat chain=dstnat dst-port=xxxx protocol=tcp to-addresses=192.168.88.100 to-ports=xxxx
/ip service
set telnet disabled=yes
set ftp disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/system clock set time-zone-name=bla/bla
/system identity set name=RouterSwitchAP
/tool bandwidth-server set enabled=no
/tool graphing set store-every=24hours
My questions are related to the firewall.
- is the rule #3 really needed? Seems like the DNS traffic use the udp protocol, not tcp
- On the forward chain, the order for #7 & #8 matter? Is there any effect if I move the “allow port forwarding” before “VLAN Internet Access”?
- On the default configuration I saw the fasttrack-connection rule on the forward chain. Am I missing something if I didn’t have any fasttrack-connection rule?
Thank you.
Best regards,