I’m looking for help setting up my WireGuard client on my Mikrotik. I have a WireGuard server set up on a hAP in another city. I have a working configuration that I can use from my laptop, but I’d like to transfer that to my router to route my work computer.
I’ve tried various walkthroughs. Unfortunately, most of them are either in an older version of Router OS, or they miss key settings that I would like to emulate. Namely, I want to router my VLAN 50 (VLAN_Work) through my WireGuard client on the MikroTik. I’m attempting to use the wg-LH-Mikro interface.
I feel like I’m a dns setting away from getting this to work properly. When I torch the connection I just see a bunch of dns tx with no rx. The DNS is using my local settings instead of the DNS I have set in the WG client.
That being said, I’m probably very wrong, and I would appreciate any help with this matter.
Thank you in advance.
PS. Please let me know if I removed too many key elements of the config below.
# 2025-05-19 17:57:59 by RouterOS 7.16.2
# software id = REMOVED
#
# model = RB750Gr3
# serial number = REMOVED
/interface bridge
add name=BridgemDNS protocol-mode=none vlan-filtering=yes
add admin-mac=REMOVED auto-mac=no comment=defconf name=bridge \
port-cost-mode=short vlan-filtering=yes
/interface wireguard
add listen-port=31313 mtu=1420 name=SF_Mikro
add listen-port=42746 mtu=1420 name=wg-LH-Mikro
/interface vlan
add interface=bridge name=VLAN_Cameras vlan-id=20
add interface=bridge name=VLAN_MAIN vlan-id=10
add interface=bridge name=VLAN_Printer vlan-id=40
add interface=bridge name=VLAN_TVs vlan-id=30
add interface=bridge name=VLAN_Work vlan-id=50
/interface macvlan
add interface=VLAN_MAIN mac-address=REMOVED name=macvlanMAIN
add interface=VLAN_Printer mac-address=REMOVED name=macvlanPTRE
add interface=VLAN_TVs mac-address=REMOVED name=macvlanTVs
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
add name=WAN2
/interface lte apn
set [ find default=yes ] default-route-distance=3
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp_pool_Bridge ranges=192.168.88.10-192.168.88.254
add name=dhcp_pool_TVs ranges=192.168.96.2-192.168.96.254
add name=dhcp_pool_Cameras ranges=192.168.91.2-192.168.91.254
add name=dhcp_pool_Work ranges=192.168.50.2-192.168.50.254
add name=dhcp_pool_Main ranges=192.168.87.2-192.168.87.254
add name=dhcp_pool_Maintenance ranges=192.168.89.2-192.168.89.254
add name=dhcp_printer ranges=192.168.92.2-192.168.92.4
add name=dhcp_pool_MIA-WG ranges=192.168.177.2-192.168.177.8
/ip dhcp-server
add address-pool=dhcp_pool_Bridge interface=bridge lease-time=1d14h name=\
DHCP_Bridge
add address-pool=dhcp_pool_TVs interface=VLAN_TVs lease-time=1d12h30m name=\
DHCP_TVs
add address-pool=dhcp_pool_Cameras interface=VLAN_Cameras lease-time=1d12h20m \
name=DHCP_Cameras
add address-pool=dhcp_printer interface=VLAN_Printer name=DHCP_Printer
add address-pool=dhcp_pool_Main interface=VLAN_MAIN name=DHCP_Main
# Interface not running
add address-pool=dhcp_pool_Maintenance interface=ether5 name=Maintenance
add address-pool=dhcp_pool_Work interface=VLAN_Work name=DHCP_Work
/routing table
add comment="routing table for WireGuard - LH" disabled=no fib name=WG_MIA_RT
add comment="Routing table for LH Mikrotik" disabled=no fib name=WG_LH_RT
/interface bridge filter
add action=accept chain=forward comment="Allow mDNS only" dst-address=\
224.0.0.251/32 dst-mac-address=REMOVED/FF:FF:FF:FF:FF:FF \
dst-port=5353 in-bridge=BridgemDNS ip-protocol=udp mac-protocol=ip \
out-bridge=BridgemDNS src-port=5353
add action=drop chain=forward comment="Drop all other L2 traffic" in-bridge=\
BridgemDNS out-bridge=BridgemDNS
/interface bridge nat
add action=src-nat chain=srcnat comment=\
"Use your primary bridge MAC address here" dst-mac-address=\
REMOVED/FF:FF:FF:FF:FF:FF src-mac-address=\
REMOVED/FF:FF:FF:FF:FF:FF to-src-mac-address=REMOVED
/interface bridge port
add bridge=bridge comment=defconf interface=ether2 internal-path-cost=10 \
path-cost=10
add bridge=bridge comment=defconf interface=ether3 internal-path-cost=10 \
path-cost=10
add bridge=bridge comment=defconf interface=ether4 internal-path-cost=10 \
path-cost=10
add bridge=bridge interface=VLAN_TVs
add bridge=bridge interface=VLAN_Cameras multicast-router=permanent
add bridge=*11 interface=VLAN_Printer
add bridge=*13 interface=VLAN_MAIN
add bridge=BridgemDNS interface=macvlanMAIN
add bridge=BridgemDNS interface=macvlanTVs
add bridge=BridgemDNS interface=macvlanPTRE
add bridge=bridge interface=VLAN_Work
/ip firewall connection tracking
set enabled=yes udp-timeout=10s
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface bridge vlan
add bridge=bridge tagged=ether2,ether3,ether4,bridge vlan-ids=10,20,30,40,50
add bridge=bridge untagged=ether2,bridge vlan-ids=1
add bridge=bridge tagged=VLAN_MAIN,VLAN_TVs vlan-ids=10,30
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add comment=defconf interface=lte1 list=WAN
add comment=defconf interface=ether5 list=LAN
add comment=defconf interface=*1E list=WAN
add comment=defconf interface=wg-LH-Mikro list=WAN
/interface wireguard peers
add allowed-address=192.168.90.2/32 interface=SF_Mikro name=SF_Windows \
private-key="REMOVED" public-key=\
"REMOVED"
add allowed-address=192.168.90.3/32 interface=SF_Mikro name=SF_iOS \
private-key="REMOVED" public-key=\
"REMOVED"
add allowed-address=0.0.0.0/0 client-dns=208.67.220.220 endpoint-address=\
REMOVED endpoint-port=13231 interface=wg-LH-Mikro name=\
LH_Mikrotik persistent-keepalive=25s public-key=\
"REMOVED"
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=\
192.168.88.0
add address=192.168.87.1/24 interface=VLAN_MAIN network=192.168.87.0
add address=192.168.91.1/24 interface=VLAN_Cameras network=192.168.91.0
add address=192.168.96.1/24 interface=VLAN_TVs network=192.168.96.0
add address=192.168.92.1/24 interface=VLAN_Printer network=192.168.92.0
add address=192.168.89.1/24 comment="Management VLAN on Ether5" interface=\
ether5 network=192.168.89.0
add address=192.168.90.1/24 interface=SF_Mikro network=192.168.90.0
add address=192.168.50.1/24 interface=VLAN_Work network=192.168.50.0
add address=192.168.177.2 interface=*1E network=192.168.177.0
add address=192.168.32.3 interface=wg-LH-Mikro network=192.168.32.3
/ip arp
add address=192.168.92.2 interface=VLAN_Printer mac-address=REMOVED
/ip dhcp-client
add add-default-route=no comment=defconf interface=ether1
/ip dhcp-server lease
add address=192.168.88.16 comment="Netgear Switch" mac-address=\
REMOVED server=DHCP_Bridge
add address=192.168.96.253 mac-address=REMOVED server=DHCP_TVs
add address=192.168.96.251 client-id=REMOVED mac-address=\
REMOVED server=DHCP_TVs
add address=192.168.92.2 client-id=REMOVED mac-address=\
REMOVED server=DHCP_Printer
/ip dhcp-server network
add address=192.168.32.3/32 gateway=192.168.32.3
add address=192.168.50.0/24 gateway=192.168.50.1
add address=192.168.87.0/24 gateway=192.168.87.1
add address=192.168.88.0/24 comment=defconf dns-server=192.168.88.1 gateway=\
192.168.88.1
add address=192.168.89.0/24 gateway=192.168.89.1
add address=192.168.90.0/24 gateway=192.168.90.1
add address=192.168.91.0/24 gateway=192.168.91.1
add address=192.168.92.0/24 gateway=192.168.92.1
add address=192.168.96.0/24 gateway=192.168.96.1
add address=192.168.177.2/32 comment=MIA_VPN gateway=192.168.177.1
/ip dns
set allow-remote-requests=yes mdns-repeat-ifaces=\
VLAN_TVs,VLAN_MAIN,VLAN_Printer,bridge
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan type=A
/ip firewall filter
add action=accept chain=input dst-port=8291 protocol=tcp src-address=\
192.168.89.0/24
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
ipsec-policy=in,ipsec
add action=drop chain=input comment="Drop Winbox Port not coming from LAN" \
dst-port=8291 protocol=tcp src-address=!192.168.88.0/24
add action=accept chain=input comment="Allow MDNS" connection-type="" \
disabled=yes dst-address=224.0.0.251 dst-port=5353 log=yes log-prefix=\
mDNS protocol=udp src-port=5353
add action=accept chain=input comment="Allow MDNS" connection-type="" \
dst-address=239.255.255.250 dst-port=1900 log=yes log-prefix=mDNS \
protocol=udp src-port=1900
add action=accept chain=forward comment="Allow traffic from Main to TVs" \
out-interface=VLAN_TVs protocol=udp src-address=192.168.87.0/24
add action=accept chain=forward comment="Allow traffic from Main to Printer" \
out-interface=VLAN_Printer protocol=udp src-address=192.168.87.0/24
add action=accept chain=forward comment="Allow traffic from Main to TVs" \
dst-address=224.0.0.251 protocol=udp src-address=192.168.87.0/24
add action=accept chain=forward comment="Allow Connections to TVs" \
connection-state="" dst-address=192.168.96.251-192.168.96.253 \
src-address=224.0.0.251
add action=accept chain=forward comment="Allow Connections from TVs" \
connection-state=established,related,untracked src-address=\
192.168.96.251-192.168.96.253
add action=accept chain=forward comment="Allow Connections from Printer" \
connection-state=established,related,untracked src-address=192.168.92.2
add action=accept chain=input comment="Allow WireGuard" dst-port=42746 \
protocol=udp
add action=accept chain=output comment="Allow WireGuard" dst-port=13231 \
out-interface=wg-LH-Mikro protocol=udp
add action=accept chain=forward out-interface=wg-LH-Mikro src-address=\
192.168.50.0/24
add action=accept chain=forward dst-address=192.168.50.0/24 in-interface=\
wg-LH-Mikro
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment=\
"defconf: accept to local loopback (for CAPsMAN)" disabled=yes \
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 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=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
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
/ip firewall mangle
add action=mark-routing chain=prerouting in-interface=VLAN_Work \
new-routing-mark=WG_LH_RT passthrough=no
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface-list=WAN
/ip hotspot profile
set [ find default=yes ] html-directory=hotspot
/ip ipsec profile
set [ find default=yes ] dpd-interval=2m dpd-maximum-failures=5
/ip route
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
9.9.9.9 routing-table=main scope=30 suppress-hw-offload=no target-scope=\
11 vrf-interface=ether1
add disabled=no distance=1 dst-address=9.9.9.9/32 gateway=10.0.0.1 \
routing-table=main scope=10 suppress-hw-offload=no target-scope=10
add disabled=no distance=2 dst-address=1.1.1.1/32 gateway=10.0.0.1 \
routing-table=main scope=10 suppress-hw-offload=no target-scope=10
add check-gateway=ping disabled=no distance=2 dst-address=0.0.0.0/0 gateway=\
1.1.1.1 routing-table=main scope=30 suppress-hw-offload=no target-scope=\
11 vrf-interface=ether1
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=*1E routing-table=\
WG_MIA_RT scope=30 suppress-hw-offload=no target-scope=10
add disabled=no distance=1 dst-address=192.168.32.3/32 gateway=VLAN_Work \
routing-table=WG_LH_RT scope=30 suppress-hw-offload=no target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=wg-LH-Mikro \
routing-table=WG_LH_RT scope=30 suppress-hw-offload=no target-scope=10
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set winbox address=192.168.88.0/24,192.168.87.0/24,192.168.89.0/24
set api-ssl disabled=yes
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
/ipv6 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 ICMPv6" protocol=\
icmpv6
add action=accept chain=input comment="defconf: accept UDP traceroute" port=\
33434-33534 protocol=udp
add action=accept chain=input comment=\
"defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\
udp src-address=fe80::/10
add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \
protocol=udp
add action=accept chain=input comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=input comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=input comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
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 packets with bad src ipv6" src-address-list=bad_ipv6
add action=drop chain=forward comment=\
"defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \
hop-limit=equal:1 protocol=icmpv6
add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\
icmpv6
add action=accept chain=forward comment="defconf: accept HIP" protocol=139
add action=accept chain=forward comment="defconf: accept IKE" dst-port=\
500,4500 protocol=udp
add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=forward comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=forward comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
/routing igmp-proxy interface
add interface=VLAN_MAIN upstream=yes
add interface=VLAN_TVs
/routing rule
add action=lookup-only-in-table disabled=yes dst-address="" src-address=\
192.168.50.0/24 table=WG_MIA_RT
add action=lookup-only-in-table disabled=no dst-address="" src-address=\
192.168.50.0/24 table=WG_LH_RT
add action=lookup disabled=no dst-address="" src-address=192.168.177.2/32 \
table=WG_MIA_RT
add action=lookup-only-in-table disabled=no dst-address="" src-address=\
192.168.32.3/32 table=WG_LH_RT
/system clock
set time-zone-name=America/Los_Angeles
/system identity
set name="MikroTik"
/system note
set show-at-login=no
/system scheduler
add interval=1h30m name=CheckDNS_Schedule on-event=CheckDNS policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
start-date=2025-02-18 start-time=18:19:21
/system script
add dont-require-permissions=no name=CheckDNS owner=Owner policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="/\
tool fetch host=\"freedns.afraid.org\" url=\"https://freedns.afraid.org/dy\
namic/update.php\?REMOVED"
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN