Quantcast
Channel: MikroTik
Viewing all articles
Browse latest Browse all 18748

General • Re: Wireguard Site-to-Site Route not working

$
0
0
I think I have found a solution.
After all, the route is now set correctly.

I have simply created another static route which has the IP network of the Wireguard VPN.
So 10.13.37.0/24.
This route is useless in itself, but I can copy it and adapt the IP to my required network 192.168.1.0/24.
After a short wait, the route is successfully created via script and the systems on the other side can be reached.
Strange, but it works.

Here is the script:
Code:
# Is required to be able to use the VPN again after a router restart.# Ohne das, funktionieren die Routen nicht sauber.log info "Set new route for the Wireguard VPN"# Deactivate Wireguard connection/interface/wireguard disable WG-XXXXXXXX# Delete Route/ip/route remove [find dst-address=192.168.1.0/24]# Wait 15sec:delay 15s# Activate Wireguard again/interface/wireguard enable WG-XXXXXXXX# Wait a little so that the connection can be successfully established:delay 10s# Clone route and edit the network/ip/route/ add dst-address=192.168.1.0/24 copy-from=0
Has been working for 4 days now.

Statistics: Posted by Vorderwaeldler — Sat Mar 02, 2024 12:25 pm



Viewing all articles
Browse latest Browse all 18748

Trending Articles