Wireguard VPN setup

Hello,
I deleted my own site-to-site config, If I wasn’t I would gladly share it with you. anyway, I had another issue so I create a topic about it one instance of my setup is literally in every screenshot that I took.
you could use it as a reference besides the WIKI. The WireGuard interface name is “WG STS”

http://forum.mikrotik.com/t/route-internet-traffic-mt-via-wireguard-tunnel-through-mt-wg-peer/154825/1

Thank you, i just writed another post at the same time as you. I probably forgot to input something… That’s what you get when you try to do 3 diferent things at the same time…

So i deleted configuration and start over and go line by line, and it’s working, i can ping from windows apart my W11 laptop… I read that ICMP is disabled… (but i can ping phone that is connected to WiFi), i can scan devices with IP tool, and access devices that have web interface.


So if I understand correctly if I want to add another router (R3) i need to:

Create interface on R3, create peer on R3 and R1 for new connection

On R1 i need to add new dst address to IP/Route

On R3 i need to add new address to wireguard interface (10.255.255.3/30) and dst-address

And i need to configure firewall rules.

Or do I need new interface with new port ?

I don’t think that you need to add a new interface for that.
“I read that ICMP is disabled.” what do you mean?

Okey, thank you for your help, i will try another router later that day, I’m waiting for SIM card to be delivered.

When i do that, i will make sure to take some time and make some kind of tutorial with pictures for the others (Including L2TP that was explained earlier in the posts). Maybe someone find that usefull.

ICMP responses are disabled by default in Windows 11 and must be enabled manually if needed. Here is the link if someone have same problem: https://superuser.com/questions/1683853/cannot-ping-a-windows-11-machine

Indeed, default Windows firewall behavior.
Nowadays a Windows PC is not the first device you should try to ping for testing.
It might fail more then you would expect (and most don’t even think about thát firewall and assume wrongfully there is something not ok with their network).

I think your windows are not signed in with the domain controller cuz if it was you could ping inside your echo replay domain firewall rule.

So I tested setup with another router, and it’s working but one of them after reset is having a problem connecting to main router. But I noticed that if I connect laptop to the router then connection is established. Maybe I should make another interface on office router R1 for router R3 and diferent listening port ?

Do you have one interface and two peers in every MT right now?

And every peer a DIFFERENT internal IP address ?

So in R1 (Office router) I have one interface and two peers, R2 (LTE1) one interface and one peer (towards R1), R3 (LTE2) one interface and one peer (towards R1).

R1 have 10.255.255.1/30 as pointed in https://help.mikrotik.com/docs/display/ROS/WireGuard
R2 have 10.255.255.2/30
R3 have 10.255.255.3/30 ← I think this is an error, 10.255.255.3 cant be in that subnet mask, I can have only 2 addresses if I’m right ?

/30 is 2 bits to play with hence 4 adresses, not counting 0 so effectively 3 usable adresses.

Two usable addresses, last one is broadcast. Just use bigger one, it’s private addresses, there’s enough of them. Also, this subnet is not strictly necessary, it would work even if it didn’t exist at all, because the example has routes to remote subnets with gateway=wireguard1 anyway.

I agree with using bigger netmask.
But …

Last time I checked my binary math:
2 bits:
00 = 0d
01= 1d
10 = 2d
11 = 3d
That’s 4. Minus 00 (which is the indicator of the subnet), remains 3.
Broadcast is 255d = 11111111b (or 0xFF if you want)
Or are you referring to 11b as broadcast for that /30 subnet ?

Yes, for that /30 subnet. Try it, assign 10.255.255.1/30 to one end of link, 10.255.255.3/30 to another, and you can see yourself how it won’t work.

OK, got it.

Why did they put that subnet in tutorial if not needed ?

I was thinking of changing subnet from /30 to /29, that would give me 6 usable addresses.

What is interesting, the last router that I added is working like a charm, the one with 10.255.255.3 address… The one with 10.255.255.2 is the one that have problems. If I connect laptop for example then it like it should.

I don’t have any perfect answer. One reason is that “it’s what you do”, interfaces typically get addresses assigned to them. But that’s not good enough. Another is that it makes traceroute work well, without address on interface there’s a hole. But you can fix it by adding pref-src to the route to remote subnet. Or if you do some dynamic routing, some protocols may need addresses (I’m not sure about details). But if you don’t and have only simple static config, you don’t care about that. Other ideas are welcome…

So do you think that changing subnet from /30 to /29 would solve a problem ? Or there is something else that is not right ?

I will post config on Monday.

No. In fact, you can omit those 10.255.255.x addresses completely, they currently don’t do anything useful, you don’t use them as gateways for routes, and you don’t even allow them in allowed-address, so they can’t pass through tunnels.

One thing I noticed in last posted configs, you most likely don’t want src-address=10.3.191.181 in this:

/ip firewall filter
add action=accept chain=input dst-port=13231 protocol=udp src-address=10.3.191.181