Community discussions

MikroTik App
 
nullb
just joined
Topic Author
Posts: 1
Joined: Mon Nov 01, 2021 6:27 am

Wireless via Wireguard?

Mon Nov 01, 2021 6:43 am

Full config is below, but basically I have:
wg0 - Works can ping over the interface
bridge-1 is a bridge between my uplink eth1 and my desktop eth2 - Works has internet
bridge-2 is a bridge for wireless - Wifi works and I can ping over the VPN on the bridge-2 interface on my tik
DHCP is configured and gives assignments over wifi.

The problem is nothing that connects to my wifi gets internet over the VPN or at all. Not sure what I've done wrong, any help would be very good thanks.
/interface bridge
add name=bridge1
add name=bridge2
/interface wireless
set [ find default-name=wlan1 ] country=xxx disabled=no mode=ap-bridge ssid=lolvpn
set [ find default-name=wlan2 ] ssid=MikroTik
/interface wireguard
add listen-port=7887 mtu=1420 name=wg0
/interface list
add name=VPN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=pool1 ranges=10.10.11.0/24
/ip dhcp-server
add address-pool=pool1 interface=bridge2 lease-time=1h name=server1
/ip vrf
add interfaces=VPN name=vrf-vpn
/interface bridge port
add bridge=bridge1 interface=ether1
add bridge=bridge1 interface=ether2
add bridge=bridge2 interface=wlan1
/interface list member
add interface=bridge2 list=VPN
add interface=wg0 list=VPN
/interface wireguard peers
add allowed-address=0.0.0.0/0 endpoint-address=xxx endpoint-port=51820 interface=wg0 public-key="xxxx"
/ip address
add address=xxxxxx interface=wg0 network=xxxxxxxx
add address=10.10.11.1/24 interface=bridge2 network=10.10.11.0
/ip dhcp-client
add interface=bridge1
/ip dhcp-server network
add address=10.10.11.0/24 gateway=10.10.11.1
/ip firewall mangle
add action=change-mss chain=postrouting new-mss=1380 out-interface=wg0 passthrough=no protocol=tcp tcp-flags=syn
/ip firewall nat
add action=masquerade chain=srcnat out-interface=wg0
/ip route
add dst-address=0.0.0.0/0 gateway=wg0 routing-table=vrf-vpn
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19371
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Wireless via Wireguard?

Wed Nov 03, 2021 6:35 pm

What is the network configuration at either end.
Is it both MT routers connected to ISP modem etc.....................

Which one is the "server" (active listening port) and which one is peer (initiates the connection)

Who is online

Users browsing this forum: No registered users and 54 guests