I have a WiFi network set up with Two Unifi Access Points and a Mikrotik router.
Network : 192.168.1.0/24
Guest : 10.1.21.0/24
The Guest network is assigning IP addresses but users are unable to get out to the network. The Access Point that is used to cater for the guests is on Ether3 LAN port on the router. This had been working for a period of time but only stopped recently and I cannot figure out how to get it up and running again.
Any help would be greatly appreciated. Config is below.
[admin@Hartes] > export
# may/19/2023 17:02:06 by RouterOS 6.49.7
# software id = 0RUF-MX7T
#
# model = RB951G-2HnD
# serial number = DE350F
/interface bridge
add admin-mac=DC:2C:6E:A3:AB:D5 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=ireland distance=indoors frequency=auto installation=indoor ssid=\
MikroTik-A3ABD9 wireless-protocol=nv2-nstreme-802.11
/interface vlan
add interface=ether3 name=vlan21_guest vlan-id=21
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip dhcp-server
add disabled=no interface=bridge name=defconf
/ip pool
add name=pool_vlan21 ranges=10.1.21.2-10.1.21.250
/ip dhcp-server
add address-pool=pool_vlan21 disabled=no interface=vlan21_guest lease-time=30m \
name=dhcp_vlan21
/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 disabled=yes interface=wlan1
add bridge=bridge interface=ether1
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add interface=ether2 list=LAN
add interface=ether3 list=LAN
add interface=ether4 list=LAN
add interface=ether5 list=LAN
add interface=wlan1 list=WAN
add interface=ether1 list=LAN
add interface=bridge list=LAN
/interface wireless cap
set bridge=bridge interfaces=wlan1
/ip address
add address=10.1.21.0/24 interface=vlan21_guest network=10.1.21.0
add address=192.168.1.0/24 interface=ether1 network=192.168.1.0
/ip dhcp-client
add comment=defconf disabled=no interface=wlan1
/ip dhcp-server network
add address=0.0.0.0/24 comment=defconf gateway=0.0.0.0 netmask=24
add address=10.1.21.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=10.1.21.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip dns static
add address=192.168.1.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
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
/ip route
add disabled=yes distance=1 gateway=192.168.1.254
/system clock
set time-zone-name=Europe/Dublin
/system identity
set name=*******
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
[admin@Hartes] >
Before suggesting fixes, you need to have a reasonable plan. Then the configuration should be much easier. What was the sequence you used to configure your router, and what guides/documentation did you use?
I would suggest going back and rethinking your whole config, because it is far from “standard”. See New User Pathway To Config Success for some useful links to other info. And if you expect more help, provide a network diagram. See New User Posting For Assistance for some guidelines about what is expected.
Why is your wifi your “WAN” interface?
I would first get the guest vlan working, then apply firewall. See The DEFACTO DEFAULT FIREWALL Setup for help understanding the firewall. You need to block networks the guest should not be able to connect to first (your local networks you do not want the guest to be able to access), then allow everything from guest network (so the internet can be reached). You need to modify both the input chain (for access to the router itself) and the forward chain (traffic that is routed by the router, received on one interface and forwarded out another).
And next question: is the UniFi access point vlan 241 set up with guest policy? I don’t use the guest policy on my UAP-AC-LR access points, so I am not sure, but it can limit what networks the SSID is allowed to access. Ref: What exactly does “Apply guest policies” do?
You have bridge (and I don’t think you should have ether1-ether5) since these are members of bridge. And now I noticed you have your vlan21_guest as a subinterface of ether3 (instead of bridge), and ether3 is part of the bridge. That’s not correct.