I am trying to route all traffic from a Wifi (SSID=MikroTik) via the interface wg1.
The Mikrotik is behind a "standard home-grade internet router".
Notes:
- did not create a DHCP server, I am using the one from my home router, also for the Wifi (=> ap bridge)
- devices can connect to the wifi and have internet access - everything good so far.
- wireguard config is also fine, ping via wireguard looks good.
Now I followed https://www.reddit.com/r/mikrotik/comme ... _with_vpn/
(starting from #5)
- add routing table
- add route
- add nat masq
- add routing rule for a network as described in Scenario A
I can't wrap my head around what is wrong (probably a lot... )
Config: (tried to keep it as basic as possible)
Code: Select all
# 2024-08-21 21:09:13 by RouterOS 7.15.3
# software id = NX3X-69MB
#
# model = RBmAPL-2nD
# serial number = XXX
/interface bridge
add name=bridge1
/interface wireless
set [ find default-name=wlan1 ] disabled=no mode=ap-bridge ssid=MikroTik
/interface wireguard
add listen-port=28436 mtu=1420 name=wg1
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/routing table
add disabled=no fib name=wg
/interface bridge port
add bridge=bridge1 interface=ether1
add bridge=bridge1 interface=wlan1
/interface wireguard peers
add allowed-address=0.0.0.0/0 endpoint-address=mydns.com endpoint-port=51820 \
interface=wg1 name=peer1 public-key=\
"xxx="
/ip address
add address=192.168.2.2 interface=wg1 network=192.168.2.2
/ip dhcp-client
add interface=bridge1
/ip firewall nat
add action=masquerade chain=srcnat out-interface=wg1
/ip route
add disabled=no dst-address=0.0.0.0/0 gateway=wg1 routing-table=wg \
suppress-hw-offload=no
/routing rule
add action=lookup-only-in-table disabled=no src-address=192.168.1.0/24 table=wg