I've had a working setup for a while now on a single default VLAN 1 with everything all talking nicely. I've wanted to segment the network with VLANs and I have run into my first issue.
I have a RaspberryPi running PiHole for DNS and I have the MikroTik setup to redirect any DNS request to the PiHole, just in case some sneaky manufacturer hard codes DNS into their appliance.
Using this in my config to achieve the redirect.
Code: Select all
add action=dst-nat chain=dstnat comment="DNS Rerouting" dst-address=\
!192.168.88.3 dst-port=53 log=yes log-prefix=redirect-gdns-udp protocol=\
udp src-address=!192.168.88.3 to-addresses=192.168.88.3 to-ports=53
add action=dst-nat chain=dstnat dst-address=!192.168.88.3 dst-port=53 log=yes \
log-prefix=redirect-gdns-tcp protocol=tcp src-address=!192.168.88.3 \
to-addresses=192.168.88.3 to-ports=53
add action=masquerade chain=srcnat dst-address=192.168.88.3 dst-port=53 \
log-prefix=masq protocol=udp src-address=192.168.88.0/24
add action=masquerade chain=srcnat dst-address=192.168.88.3 dst-port=53 \
log-prefix=masq protocol=tcp src-address=192.168.88.0/24
This all works just fine. Now today I have added in a VLAN and in DHCP server I specified 8.8.8.8 as the DNS server, which is fine as it should be redirected but it doesn't respond. If I disable the NAT rule it works fine. I'm failing to see my mistake here, and ideally I'd like to be able to not redirect to PiHole, perhaps for a Guest VLAN that can do whatever it wants.
It might be the way I have implemented the VLAN, so I include that here:
Code: Select all
/interface vlan
add interface=bridge name="VL666 Cisco" vlan-id=666
/ip pool
add name=dhcp ranges=192.168.88.10-192.168.88.254
add name=dhcp_vlan666 ranges=192.168.66.2-192.168.66.254
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge lease-time=1d name=LANDHCP
add address-pool=dhcp_vlan666 disabled=no interface="VL666 Cisco" name=Cisco
/interface bridge port
add bridge=bridge interface=ether2
add bridge=bridge interface=ether3
add bridge=bridge interface=ether4
add bridge=bridge interface=sfp1
add bridge=bridge interface=wlan1
add bridge=bridge interface=wlan2
add bridge=bridge interface=ether5
/interface bridge settings
set use-ip-firewall=yes use-ip-firewall-for-vlan=yes
/interface bridge vlan
add bridge=bridge tagged=bridge,ether5 vlan-ids=666
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
/ip address
add address=192.168.88.1/24 comment=defconf interface=ether2 network=192.168.88.0
add address=192.168.66.1/24 interface="VL666 Cisco" network=192.168.66.0
/ip dhcp-server network
add address=192.168.66.0/24 dns-server=8.8.8.8 gateway=192.168.66.1
add address=192.168.88.0/24 dns-server=192.168.88.3 gateway=192.168.88.1
I have started a diagram, which I've attached.