Hello! I am attempting to configure a “router on a stick” and am at the point where I just need to ask for help.
The goal is Router → Switch → WAN device, where the WAN device is on a VLAN by itself and all traffic goes directly to the router, and the other ports of the switch are on my home network, not part of the WAN device. I currently have a working setup, but it is Router → dstnat → switch → WAN device, so the rest of the switch is not part of the home network. It is not possible to run another cable from the router to the switch - I need to use the existing link.
The target diagram is attached. Everything is working, including the VLANs, except like I said the “barn switch” is dstnat’d with only the starlink device plugged in. This is what I want to fix.
The switch is on SWOS, and I had difficulty understanding how to configure it. I reverted all the VLAN config on the switch and need to start over.
Once again, to summarize, the goal is to add a VLAN ID=5 where only the starlink interface on the switch is a member. All traffic must flow to the router to ingress/egress from the starlink device. The other ports of the switch should be on the home network (VLAN ID unspecified). I do not have a management VLAN, and I do not have a VLAN for the home network. I know these are best practices but have not implemented it - this is just a home network hobby project.
Thank you so much for any help, I have sunk many hours into this.
Here is my router config:
# 2024-11-19 22:55:09 by RouterOS 7.16.1
# software id = **ELIDED**
#
# model = RB2011iLS
# serial number = **ELIDED**
/interface bridge
add comment="main bridge" ingress-filtering=no name=local port-cost-mode=\
short protocol-mode=none vlan-filtering=yes
/interface ethernet
set [ find default-name=ether1 ] comment="DSL Modem"
set [ find default-name=ether2 ] comment=kitchen-ap
set [ find default-name=ether3 ] comment=Curator
set [ find default-name=ether4 ] comment=zion
set [ find default-name=ether6 ] comment="Movie Room Firestick"
set [ find default-name=ether7 ] comment="Downstairs Work Ethernet"
set [ find default-name=ether8 ] comment="Living Room TV"
set [ find default-name=ether9 ] comment="**ELIDED** Work Ethernet"
set [ find default-name=ether10 ] comment=downstairs-ap
/interface vlan
add interface=local name=GUEST_VLAN vlan-id=30
add interface=local name=TDS_VLAN vlan-id=40
add disabled=yes interface=local name=WAN_VLAN vlan-id=5
add interface=local name=WORK_VLAN vlan-id=20
/interface list
add name=WAN
add name=VLAN
add name=BASE
add comment=defconf name=LAN
/interface lte apn
set [ find default=yes ] ip-type=ipv4 use-network-apn=no
/ip ipsec proposal
set [ find default=yes ] auth-algorithms=sha256,sha1 enc-algorithms=\
aes-256-cbc,aes-128-cbc
/ip pool
add name=dhcp_pool0 ranges=192.168.1.100-192.168.1.254
add name=work-dhcp-pool ranges=192.168.2.100-192.168.2.254
add name=guest-dhcp-pool ranges=192.168.3.100-192.168.3.254
add name=tds-pool ranges=192.168.4.100-192.168.4.254
/ip dhcp-server
add address-pool=dhcp_pool0 interface=local name=dhcp1
add address-pool=work-dhcp-pool interface=WORK_VLAN lease-time=10m name=\
work-dhcp-server
add address-pool=guest-dhcp-pool interface=GUEST_VLAN lease-time=10m name=\
guest-dhcp-server
add address-pool=tds-pool interface=TDS_VLAN name=tds-dhcp-server
/ip smb users
set [ find default=yes ] disabled=yes
/port
set 0 name=serial0
/ppp profile
add bridge=local local-address=192.168.1.1 name=mainProfile remote-address=\
dhcp_pool0
/routing bgp template
set default disabled=no output.network=bgp-networks
/routing ospf instance
add disabled=no name=default-v2
/routing ospf area
add disabled=yes instance=default-v2 name=backbone-v2
/interface bridge port
add bridge=local ingress-filtering=no interface=ether4 internal-path-cost=10 \
path-cost=10
add bridge=local ingress-filtering=no interface=ether3 internal-path-cost=10 \
path-cost=10
add bridge=local ingress-filtering=no interface=ether5 internal-path-cost=10 \
path-cost=10
add bridge=local ingress-filtering=no interface=ether6 internal-path-cost=10 \
path-cost=10
add bridge=local frame-types=admit-only-untagged-and-priority-tagged \
ingress-filtering=no interface=ether7 internal-path-cost=10 path-cost=10 \
pvid=20
add bridge=local ingress-filtering=no interface=ether8 internal-path-cost=10 \
path-cost=10
add bridge=local frame-types=admit-only-untagged-and-priority-tagged \
ingress-filtering=no interface=ether9 internal-path-cost=10 path-cost=10 \
pvid=20
add bridge=local ingress-filtering=no interface=ether10 internal-path-cost=10 \
path-cost=10
add bridge=local ingress-filtering=no interface=ether2 internal-path-cost=10 \
path-cost=10
add bridge=local disabled=yes ingress-filtering=no interface=sfp1 \
internal-path-cost=10 path-cost=10
/ip firewall connection tracking
set udp-timeout=10s
/ip neighbor discovery-settings
set discover-interface-list=!BASE
/ip settings
set max-neighbor-entries=8192
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface bridge vlan
add bridge=local tagged=local,ether2,ether10 vlan-ids=20
add bridge=local tagged=local,ether2,ether10 vlan-ids=30
# sfp1 not a bridge port
add bridge=local disabled=yes tagged=sfp1 vlan-ids=5
add bridge=local comment="backup internet" tagged=ether2,ether10,local \
vlan-ids=40
/interface l2tp-server server
set default-profile=mainProfile enabled=yes use-ipsec=yes
/interface list member
add interface=ether1 list=WAN
add interface=WORK_VLAN list=VLAN
add interface=GUEST_VLAN list=VLAN
add interface=local list=LAN
add disabled=yes interface=WAN_VLAN list=WAN
add interface=sfp1 list=WAN
add interface=TDS_VLAN list=VLAN
/interface ovpn-server server
set auth=sha1,md5
/ip address
add address=192.168.1.1/24 interface=local network=192.168.1.0
add address=192.168.2.1/24 interface=WORK_VLAN network=192.168.2.0
add address=192.168.3.1/24 interface=GUEST_VLAN network=192.168.3.0
add address=192.168.253.1/24 disabled=yes interface=WAN_VLAN network=\
192.168.253.0
add address=192.168.4.1/24 interface=TDS_VLAN network=192.168.4.0
/ip cloud
set update-time=no
/ip dhcp-client
add interface=ether1 use-peer-dns=no
add disabled=yes interface=WAN_VLAN use-peer-dns=no
add interface=sfp1
/ip dhcp-server lease
add address=192.168.3.40 mac-address=**ELIDED** server=\
guest-dhcp-server
/ip dhcp-server network
add address=192.168.1.0/24 dns-server=192.168.1.9 gateway=192.168.1.1
add address=192.168.2.0/24 dns-server=8.8.8.8 gateway=192.168.2.1
add address=192.168.3.0/24 dns-server=8.8.8.8 gateway=192.168.3.1
add address=192.168.4.0/24 dns-server=8.8.8.8 gateway=192.168.4.1
/ip dns
set allow-remote-requests=yes servers=192.168.1.9
/ip dns static
add address=192.168.1.9 name=pihole type=A
/ip firewall filter
add action=accept chain=input comment="accept established,related,untracked" \
connection-state=established,related,untracked
add action=drop chain=input comment="Drop invalid connections" \
connection-state=invalid
add action=accept chain=input comment="Allow VLAN to connect to router" \
disabled=yes in-interface-list=VLAN
add action=accept chain=input comment="allow ICMP to connect to router" \
in-interface-list=LAN protocol=icmp
add action=accept chain=input comment="allow Winbox to connect to router" \
in-interface-list=LAN port=8291 protocol=tcp src-address-list=""
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
in-interface-list=!LAN
add action=drop chain=input comment=\
"block everything else trying to connect to router" disabled=yes \
in-interface-list=WAN
add action=fasttrack-connection chain=forward comment=\
"fast-track for established,related" connection-state=established,related \
hw-offload=yes
add action=accept chain=forward comment="accept established,related" \
connection-state=established,related,untracked
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=accept chain=forward comment="Printer - any LAN device can access" \
connection-state=new dst-address=192.168.1.20 in-interface-list=LAN
add action=accept chain=forward comment="VLAN Internet Access Only" \
connection-state=new in-interface-list=VLAN out-interface-list=WAN
add action=accept chain=forward comment="Base LAN Internet Access" \
connection-state=new out-interface-list=WAN src-address=192.168.1.0/24
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
disabled=yes ipsec-policy=in,ipsec
add action=accept chain=forward comment="Accept all that is DST NATed - this r\
ule accepts all incoming traffic that is port forwrded" \
connection-nat-state=dstnat connection-state=new disabled=yes
add action=accept chain=forward comment=\
"Allow access to Curator4 from all devices" disabled=yes dst-address=\
192.168.1.11
add action=drop chain=forward comment="drop all other forward chains - VLANs c\
annot access each other - THIS RULE BREAKS REMOTEDESKTOP\? (fixed with dst\
nat rule)" connection-state=""
add action=drop chain=forward comment=\
"drop access to clients behind NAT from WAN" connection-nat-state=!dstnat \
connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="Configure outbound NAT" disabled=\
yes out-interface=ether1
add action=masquerade chain=srcnat out-interface=sfp1
add action=netmap chain=dstnat comment="Remote Desktop on 3389" disabled=yes \
dst-port=3389 protocol=tcp to-addresses=192.168.1.10 to-ports=3389
add action=netmap chain=dstnat disabled=yes dst-port=54545 protocol=tcp \
to-addresses=192.168.1.10 to-ports=3389
add action=dst-nat chain=dstnat connection-limit=100,32 disabled=yes \
dst-limit=1,5,dst-address/1m40s dst-port=80 fragment=no \
in-interface-list=WAN ingress-priority=0 limit=1,5:packet protocol=tcp \
to-addresses=192.168.1.11 to-ports=80
add action=masquerade chain=srcnat disabled=yes dst-address=192.168.1.11 \
dst-port=80,443 protocol=tcp src-port=""
add action=netmap chain=dstnat disabled=yes dst-address=192.168.1.11 \
dst-port=443 protocol=tcp to-addresses=192.168.1.11 to-ports=443
add action=dst-nat chain=dstnat comment="NGINX port forwarding" disabled=yes \
dst-port=80 in-interface-list=WAN protocol=tcp to-addresses=192.168.1.11 \
to-ports=80
add action=dst-nat chain=dstnat comment="NGINX port forwarding" disabled=yes \
dst-port=80 in-interface-list=WAN protocol=udp src-port="" to-addresses=\
192.168.1.11 to-ports=80
add action=dst-nat chain=dstnat comment="Redirect DNS to pi-hole" disabled=\
yes dst-address=!192.168.1.9 dst-port=53 protocol=udp src-address=\
!192.168.1.9 to-addresses=192.168.1.9
add action=dst-nat chain=dstnat disabled=yes dst-address=!192.168.1.9 \
dst-port=53 protocol=tcp src-address=!192.168.1.9 to-addresses=\
192.168.1.9
add action=masquerade chain=srcnat comment="These masquerade rules are apparen\
tly needed, but they change the source IP in pihole to mikrotik" \
disabled=yes dst-address=192.168.1.9 dst-port=53 protocol=udp \
src-address=192.168.1.0/24
add action=masquerade chain=srcnat disabled=yes dst-address=192.168.1.9 \
dst-port=53 protocol=tcp src-address=192.168.1.0/24
add action=masquerade chain=srcnat disabled=yes dst-address=192.168.1.9 \
dst-port=53 protocol=udp src-address=192.168.2.0/24
add action=masquerade chain=srcnat disabled=yes dst-address=192.168.1.9 \
dst-port=53 protocol=tcp src-address=192.168.2.0/24
add action=masquerade chain=srcnat disabled=yes dst-address=192.168.1.9 \
dst-port=53 protocol=udp src-address=192.168.3.0/24
add action=masquerade chain=srcnat disabled=yes dst-address=192.168.1.9 \
dst-port=53 protocol=tcp src-address=192.168.3.0/24
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip ipsec profile
set [ find default=yes ] dpd-interval=2m dpd-maximum-failures=5
/ip smb shares
set [ find default=yes ] directory=/pub
/ip ssh
set strong-crypto=yes
/ppp secret
add disabled=yes name=emulcahy-vpn profile=mainProfile
/routing bfd configuration
add disabled=no interfaces=all min-rx=200ms min-tx=200ms multiplier=5
/system clock
set time-zone-name=**ELIDED**
/system note
set show-at-login=no
/system package update
set channel=development
/tool bandwidth-server
set enabled=no
/tool mac-server
set allowed-interface-list=none
