The "main" LAN is 192.168.0.0/24.
The "child" LAN is 10.0.1.0/24.
Internet connection is through a router/modem at 192.168.0.1 (gateway).
The "main" LAN should only connect to the internet, exception made for a single PC (PC1-Linux) with a static IP of 192.168.0.100 that needs to communicate with a device in the "child" network, (represented by PC3) with a fixed IP address of 10.0.1.2.
The PC-1 Linux has an added route to 10.0.1.2 with gateway 192.168.0.20. (the Ax Lite simulated).
As well the "child" LAN should only connect to the internet (and not to devices on the "main" LAN) with the only exception above (10.0.1.2 can connect to 192.168.0.100).
The MikrotikWinbox-1 represents a laptop that I can connect to ether4 of the Ax Lite to manage its configuration.
I am attaching a drawing and here is the current configuration of the Ax Lite:
Code: Select all
# 2024-12-28 14:41:01 by RouterOS 7.15.3
# software id =
#
/interface bridge
add name=bridge1
/interface ethernet
set [ find default-name=ether1 ] disable-running-check=no
set [ find default-name=ether2 ] disable-running-check=no
set [ find default-name=ether3 ] disable-running-check=no
set [ find default-name=ether4 ] disable-running-check=no
/interface list
add name=WAN
add name=LAN
add name=MGMT
/ip pool
add name=dhcp_pool0 ranges=10.0.1.21-10.0.1.253
/ip dhcp-server
add address-pool=dhcp_pool0 interface=bridge1 name=dhcp1
/port
set 0 name=serial0
/interface bridge port
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether3
/interface list member
add interface=ether1 list=WAN
add interface=bridge1 list=LAN
add interface=ether4 list=MGMT
/ip address
add address=192.168.0.20/24 interface=ether1 network=192.168.0.0
add address=10.0.1.254/24 interface=bridge1 network=10.0.1.0
add address=192.168.88.1/24 interface=ether4 network=192.168.88.0
/ip dhcp-server network
add address=10.0.1.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=10.0.1.254
/ip firewall address-list
add address=192.168.0.0/16 list=bogons
add address=10.0.0.0/8 list=bogons
/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=accept chain=forward comment="Accept single outer LAN IP" \
dst-address=10.0.1.2 in-interface=ether1 out-interface=bridge1 \
src-address=192.168.0.100
add action=accept chain=forward comment="Accept single inner LAN IP" \
dst-address=192.168.0.100 in-interface=bridge1 out-interface=ether1 \
src-address=10.0.1.2
add action=drop chain=forward comment="Drop bogons" dst-address-list=bogons \
out-interface=ether1
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 out-interface=ether1
/ip route
add disabled=no dst-address=0.0.0.0/0 gateway=192.168.0.1 routing-table=main \
suppress-hw-offload=no
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/system note
set show-at-login=no
/tool mac-server
set allowed-interface-list=MGMT
/tool mac-server mac-winbox
set allowed-interface-list=MGMT
But here are the BIG questions, while working of the configuration I thought:
Can I avoid the need to connect physically the laptop to ether4 when needing to make changes to the Ax Lite configuration?
Can I use Wireguard with one end on the "PC1-Linux" (that could also be running Windows) and the other one on the Ax Lite?
All the examples I have seen around are about making a VPN tunnel between two remote locations through the public IP addresses (possibly of two Mikrotik boxes), but from the little I understand it could be possible to make also a "local" wireguard tunnel.
Or there is some other method/way to access (safely) the Ax Lite from its WAN port (ether1) for configuration (possibly via Winbox) and only from 192.168.0.100?
I know I could add ether1 as MGMT in interface-list and limit Winbox to accept connections from 192.168.0.100 and 192.168.88.2 (Available from), but is it a good way?