Multiple Subnets with Bridge - What am I missing?

Hello,
I want to configure a hAP for two Subnets. One should be bridged from a Non-Mikrotik Device to hAP Port 2-4. Port 5 should be running another Subnet with own DHCP. I want to allow access to the internet from Subnet on Port 5 and also later a IPsec connection.

Bridged Subnet Settings (Working fine):
Non Mikrotik Device
192.168.160.0/24
Bridged to hAP Port 2-4

Another Subnet Settings (No access to internet):
Mikrotik hAP
192.168.16.0/24
Only on Port 5

What am I missing? I cant access the internet from Port 5.

My compact config:

# 2023-08-23 13:03:03 by RouterOS 7.11
# software id = 5CWC-SHTX
#
# model = RB951Ui-2nD
# serial number = HE308Txxxxx
/interface bridge
add admin-mac=48:A9:8A:50:E6:8A auto-mac=no comment=defconf name=bridge
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
    country=germany disabled=no distance=indoors frequency=auto installation=\
    indoor mode=station-pseudobridge ssid=rtr-nsl-vodafone wireless-protocol=\
    802.11
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk group-ciphers=\
    tkip,aes-ccm mode=dynamic-keys supplicant-identity=MikroTik \
    unicast-ciphers=tkip,aes-ccm
/ip hotspot profile
set [ find default=yes ] html-directory=hotspot
/ip pool
add name=default-dhcp ranges=192.168.16.100-192.168.16.200
/ip dhcp-server
add address-pool=default-dhcp interface=ether5 lease-time=10m name=defconf
/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=wlan1
add bridge=bridge interface=ether1
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add interface=wlan1 list=WAN
add interface=ether1 list=WAN
add interface=ether2 list=LAN
add interface=ether3 list=LAN
add interface=ether4 list=LAN
add interface=ether5 list=LAN
/ip address
add address=192.168.16.1/24 interface=ether5 network=192.168.16.0
/ip dhcp-client
# DHCP client can not run on slave or passthrough interface!
add comment=defconf interface=ether1
add interface=bridge
/ip dhcp-server network
add address=192.168.16.0/24 comment=defconf dns-server=192.168.16.1 gateway=\
    192.168.16.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/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=drop chain=input comment="defconf: drop all not coming from LAN" \
    in-interface-list=!LAN
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
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
    ipsec-policy=out,none out-interface-list=WAN
/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
/system clock
set time-zone-name=Europe/Berlin
/system identity
set name=rtr-cs-tompkins2
/system note
set show-at-login=no
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN

Hey.

There is no default route on your Router. All devices behind ether5 get your routers address (192.168.16.1) as default gateway, but the router has no information where to send the packets.
The DHCP client is set to ether1, but that won’t work, because ether1 is part of the bridge. You can change the DHCP client interface to the bridge interface and activate the “set default route” and “DNS Server” option for the DHCP client. Maybe that will solve the default route problem.

The next thing to look at is the firewall. There could be more problems. Maybe I have a look at the rules later…

What you need is to stop describing requirements mixed in with config. I dont care a rats ass how you think the hapac should be configured its pointless.
What you need to do is
a. identify all the user(s)/device(s) / groups of users/devices (including external users and admin, not just local users/devices)
b. identify the traffic flows they need to accomplish.

Attach a network diagram which provides context of what equipment is involved, and how they are connected and which ports/subnets are intended and what the ISP (s) relationship is to that network.

Once the context and the entire case is understand, then an optimal configuation can be derived.
One question I have is why do you ahve one subnet coming in from some uknown entity but then you want to create an new one on the hap.
So do you envisage the hap as an ap/switch or a full router creating a double nat scenario.
Do you have control of the upstream router ???

@Zaesch
Ether1 was from defconf and not active. There is a DHCP Client running on bridge which defaults already to “Add Default Route: yes”.

@anav:
Like this?
Sorry, but if I dont add the config, someone else will ask for it.
Yes, we have control on the upstream router, but it’s very baseline. No static routes, no DMZ, etc.
firefox_2023-08-24_09-11-25.png

Was thinking about the VLAN Solution today. But after some reading this is not an option at the moment, because there will be no switch between the port and the device. And the network interface of the device cant be configured as vlan.


edit: Got it. I added bridge in Interface List as WAN and now I got connection to the Internet on ether5.