Community discussions

MikroTik App
 
benmotion
just joined
Topic Author
Posts: 1
Joined: Sun Feb 05, 2023 1:00 am

MikroTik wireguard server with two WANs

Sun Feb 05, 2023 1:30 am

Greeting people
I'm a noob in MikroTik but still my problem should be an easy (and maybe answered) one and haven't found the solution!
I have two WANs let's call them WAN1 and WAN2. I've set up a wireguard server on my router which is behind a firewall and I forwarded the port (13231) to the router on WAN1 to be able to connect to the router which works well and I can access all my devices. The only problem I'm facing to is that I can't set WAN2 as the default route and when I do that, I won't have the handshake.
In summary, I want to connect to the router via WAN1 and access to the Internet via WAN2.
|Wireguard client|==>WAN1==>|MikroTik wireguard server|==>WAN2==>Internet
I've tested these scenarios with the following results:
1) Setting WAN2 as default route => no handshake
2) Setting WAN1 as default route (main routing table) and marked WAN1 port using mangle and routed it through WAN2 => handshake, but no internet
3) Setting WAN2 as default route and marked WAN1 port using mangle and routed it through WAN1 => no handshake
What should I do?
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 18959
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: MikroTik wireguard server with two WANs

Mon Feb 06, 2023 1:09 am

You really need to provide a diagram as the picture you paint with words is not clear.

For example you state you have two WAN connections, but your Router is behind another router (ISP router lets say) where you can at least forward ports to your MT router, a necessity for hosting servers or reaching the MT for the initial handsake to it ( so it can act as a wireguard server ).

So what is this talk about WAN2? Do you have a second WAN connection through a different provider ?????

Finally any discussion will require configs of any mikrotik devices involved!
/export file=anynameyouwish ( minus router serial number and any public IP information or keys etc. )

Who is online

Users browsing this forum: No registered users and 65 guests