I am trying to setup guest access point fully isolated from LAN. It is connected via switch to router, and I used VLAN ID 36 for the traffic from guest SSID to main router, the network address is 192.168.36.0/24 for L3/IP communication.
By full isolation I mean:
- access allowed only to WAN (NATed),
- no management access to router,
- no network discovery or scanning access router (do not reply on non-VLAN networks),
- no L2 access to anything else than VLAN36,
- no L3 access to anything besides WAN and own 192.168.36.0/24 network.
What I don’t understand is, why router replies on dst-address=192.168.88.1 for packets received on interface=guest-vlan-36.
I know I’ve got firewall rule configured to accept incoming ICMP requests, and I want router to be ping-able on each interface (in own VLAN) to check connectivity stability - response time to router.
However, guest-vlan-36 interface doesn’t have 192.168.88.1 associated with it, but 192.168.36.1. It shouldn’t reply to that IP address via this interface. The same is true, if I try ping 192.168.31.1, which is address of guest-vlan-31 interface.
If I disable the final drop rule on input chain, the VLAN ID 36 can even access www router management interface on any of those IP addresses.
Packet sniff on access point:
0 time=1.431 num=1 direction=rx src-mac=76:C1:DB:CF:E8:8C dst-mac=78:9A:18:13:2B:05 vlan=36 interface=guest-36-wlan1 src-address=192.168.36.2 dst-address=192.168.88.1
protocol=ip ip-protocol=icmp size=102 cpu=2 ip-packet-size=84 ip-header-size=20 dscp=0 identification=3597 fragment-offset=0 ttl=64
1 time=1.431 num=2 direction=tx src-mac=76:C1:DB:CF:E8:8C dst-mac=78:9A:18:13:2B:05 vlan=36 interface=ether1 src-address=192.168.36.2 dst-address=192.168.88.1
protocol=ip ip-protocol=icmp size=102 cpu=2 ip-packet-size=84 ip-header-size=20 dscp=0 identification=3597 fragment-offset=0 ttl=64
2 time=1.431 num=3 direction=rx src-mac=78:9A:18:13:2B:05 dst-mac=76:C1:DB:CF:E8:8C vlan=36 interface=ether1 src-address=192.168.88.1 dst-address=192.168.36.2
protocol=ip ip-protocol=icmp size=102 cpu=3 ip-packet-size=84 ip-header-size=20 dscp=0 identification=2984 fragment-offset=0 ttl=64
3 time=1.431 num=4 direction=tx src-mac=78:9A:18:13:2B:05 dst-mac=76:C1:DB:CF:E8:8C vlan=36 interface=guest-36-wlan1 src-address=192.168.88.1 dst-address=192.168.36.2
protocol=ip ip-protocol=icmp size=102 cpu=3 ip-packet-size=84 ip-header-size=20 dscp=0 identification=2984 fragment-offset=0 ttl=64
Packet sniff on router:
0 time=3.554 num=1 direction=rx src-mac=76:C1:DB:CF:E8:8C dst-mac=78:9A:18:13:2B:05 vlan=36 interface=ether2 src-address=192.168.36.2 dst-address=192.168.88.1
protocol=ip ip-protocol=icmp size=102 cpu=0 ip-packet-size=84 ip-header-size=20 dscp=0 identification=3597 fragment-offset=0 ttl=64
1 time=3.554 num=2 direction=rx src-mac=76:C1:DB:CF:E8:8C dst-mac=78:9A:18:13:2B:05 vlan=36 interface=bridge src-address=192.168.36.2 dst-address=192.168.88.1
protocol=ip ip-protocol=icmp size=102 cpu=0 ip-packet-size=84 ip-header-size=20 dscp=0 identification=3597 fragment-offset=0 ttl=64
2 time=3.554 num=3 direction=rx src-mac=76:C1:DB:CF:E8:8C dst-mac=78:9A:18:13:2B:05 interface=guest-vlan-36 src-address=192.168.36.2 dst-address=192.168.88.1
protocol=ip ip-protocol=icmp size=98 cpu=0 ip-packet-size=84 ip-header-size=20 dscp=0 identification=3597 fragment-offset=0 ttl=64
3 time=3.554 num=4 direction=tx src-mac=78:9A:18:13:2B:05 dst-mac=76:C1:DB:CF:E8:8C interface=guest-vlan-36 src-address=192.168.88.1 dst-address=192.168.36.2
protocol=ip ip-protocol=icmp size=98 cpu=0 ip-packet-size=84 ip-header-size=20 dscp=0 identification=2984 fragment-offset=0 ttl=64
4 time=3.554 num=5 direction=tx src-mac=78:9A:18:13:2B:05 dst-mac=76:C1:DB:CF:E8:8C vlan=36 interface=bridge src-address=192.168.88.1 dst-address=192.168.36.2
protocol=ip ip-protocol=icmp size=102 cpu=0 ip-packet-size=84 ip-header-size=20 dscp=0 identification=2984 fragment-offset=0 ttl=64
5 time=3.554 num=6 direction=tx src-mac=78:9A:18:13:2B:05 dst-mac=76:C1:DB:CF:E8:8C vlan=36 interface=ether2 src-address=192.168.88.1 dst-address=192.168.36.2
protocol=ip ip-protocol=icmp size=102 cpu=0 ip-packet-size=84 ip-header-size=20 dscp=0 identification=2984 fragment-offset=0 ttl=64
The edge router has following configuration:
/interface bridge
add admin-mac=11:22:33:44:55:66 auto-mac=no comment=defconf fast-forward=no name=bridge vlan-filtering=yes
/interface vlan
add interface=bridge name=guest-vlan-31 vlan-id=31
add interface=bridge name=guest-vlan-36 vlan-id=36
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wifiwave2 datapath
add bridge=bridge client-isolation=yes name=guest vlan-id=31
/interface wifiwave2 security
add authentication-types=wpa2-psk,wpa3-psk disabled=no ft=yes name=private
add authentication-types=wpa2-psk,wpa3-psk disabled=no ft=yes name=guest
/interface wifiwave2
set [ find default-name=wifi1 ] channel.frequency=5500 .skip-dfs-channels=10min-cac .width=20/40/80mhz configuration.country=Slovakia .mode=ap .ssid=MY_NET_SSID-Private .tx-power=21 disabled=no security=private security.authentication-types=wpa2-psk,wpa3-psk .ft=yes
set [ find default-name=wifi2 ] channel.band=2ghz-ax .frequency=2412 .skip-dfs-channels=10min-cac .width=20mhz configuration.country=Slovakia .mode=ap .ssid=MY_NET_SSID-Private .tx-power=14 disabled=no security=private security.authentication-types=wpa2-psk,wpa3-psk .ft=\
yes
add configuration.mode=ap .ssid=MY_NET_SSID datapath=guest disabled=no mac-address=11:22:33:44:55:66 master-interface=wifi1 name=wifi3 security=guest security.ft=yes
add configuration.mode=ap .ssid=MY_NET_SSID datapath=guest disabled=no mac-address=11:22:33:44:55:66 master-interface=wifi2 name=wifi4 security=guest security.ft=yes
/ip pool
add name=dhcp ranges=192.168.88.140-192.168.88.254
add name=dhcp-guest-31 ranges=192.168.31.2-192.168.31.254
add name=dhcp-guest-36 ranges=192.168.36.2-192.168.36.254
/ip dhcp-server
add address-pool=dhcp interface=bridge lease-time=10m name=defconf
add address-pool=dhcp-guest-31 interface=guest-vlan-31 name=dhcp-guest-31
add address-pool=dhcp-guest-36 interface=guest-vlan-36 name=dhcp-guest-36
/interface bridge filter
add action=drop chain=forward in-interface=wifi3
add action=drop chain=forward out-interface=wifi3
add action=drop chain=forward in-interface=wifi4
add action=drop chain=forward out-interface=wifi4
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge comment=defconf edge=yes-discover interface=wifi1
add bridge=bridge comment=defconf edge=yes-discover interface=wifi2
add bridge=bridge edge=yes-discover interface=wifi3
add bridge=bridge edge=yes-discover interface=wifi4
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface bridge vlan
add bridge=bridge tagged=ether2,bridge vlan-ids=31
add bridge=bridge tagged=wifi3 vlan-ids=31
add bridge=bridge tagged=wifi4 vlan-ids=31
add bridge=bridge tagged=ether2,bridge vlan-ids=36
/interface dot1x server
add interface=LAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
/interface wifiwave2 access-list
# REDACTED
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=192.168.88.0
add address=192.168.31.1/24 interface=guest-vlan-31 network=192.168.31.0
add address=192.168.36.1/24 interface=guest-vlan-36 network=192.168.36.0
/ip dhcp-client
add comment=defconf interface=ether1
/ip dhcp-server lease
# REDACTED
/ip dhcp-server network
add address=192.168.31.0/24 domain=lan-guest gateway=192.168.31.1
add address=192.168.36.0/24 domain=lan-guest-36 gateway=192.168.36.1
add address=192.168.88.0/24 comment=defconf dns-server=192.168.88.1 domain=lan gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes
/ip dns static
# REDACTED
/ip firewall address-list
add address=192.168.88.2-192.168.88.254 list=allowed_to_router
/ip firewall filter
add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=accept chain=input src-address-list=allowed_to_router
add action=drop chain=input
add action=accept chain=forward comment="defconf: accept in ipsec policy" ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related hw-offload=yes
add action=accept chain=forward comment="defconf: accept established,related, untracked" connection-state=established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat connection-state=new in-interface-list=WAN
add action=accept chain=forward in-interface=guest-vlan-31 out-interface-list=WAN
add action=drop chain=forward out-interface=guest-vlan-31
add action=drop chain=forward in-interface=guest-vlan-31
add action=accept chain=forward in-interface=guest-vlan-36 out-interface-list=WAN
add action=drop chain=forward in-interface=guest-vlan-36
add action=drop chain=forward out-interface=guest-vlan-36
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN
/ip service
set telnet disabled=yes
set ftp disabled=yes
set api disabled=yes
set winbox disabled=yes
set api-ssl disabled=yes
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
/ipv6 firewall filter
add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid
add action=accept chain=input comment="defconf: accept ICMPv6" protocol=icmpv6
add action=accept chain=input comment="defconf: accept UDP traceroute" port=33434-33534 protocol=udp
add action=accept chain=input comment="defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=udp src-address=fe80::/10
add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 protocol=udp
add action=accept chain=input comment="defconf: accept ipsec AH" protocol=ipsec-ah
add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=ipsec-esp
add action=accept chain=input comment="defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=input comment="defconf: drop everything else not coming from LAN" in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid
add action=drop chain=forward comment="defconf: drop packets with bad src ipv6" src-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" hop-limit=equal:1 protocol=icmpv6
add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=icmpv6
add action=accept chain=forward comment="defconf: accept HIP" protocol=139
add action=accept chain=forward comment="defconf: accept IKE" dst-port=500,4500 protocol=udp
add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=ipsec-ah
add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=ipsec-esp
add action=accept chain=forward comment="defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=forward comment="defconf: drop everything else not coming from LAN" in-interface-list=!LAN