Hi, I’ve configured Wireguard on Mikrotik, I can connect to it, but the PC gets 0.0.0.0 as gateway, wrong config on client?
Also, I have a /24 on both sides, but I can’t ping the router IP on the same subnet, does it has sense?
What is wrong here?
[Interface]
PrivateKey = aJAtji26KI
Address = 192.168.97.2/24
DNS = 8.8.8.8
Does the wireguard inteface on the router have IP address 192.168.97.x/24 on it (I would normally use 192.168.97.1/24).
Does the wireguard peer configuration on the router have an allowed ips of 192.168.97.2 (only) for your peer.
I would normally add 192.168.97.0/24 to the allowed ip list on your PC. (Not strictly necessary, but then you can easily remove the
0.0.0.0/0 entry for testing)
Thanks for help,
I figured out Wireguard use UDP, why it said me “connected” if I just created a TCP destnat? That’s a tricky behaviour of the app, it shouldn’t write connected.
So instead of TCP I destnatted UDP and I’m able to ping the router, I also appreciate that the app leaves me configuring the network and subnet, so I specified there the LAN net and I srcnat all wireguard client IP to that NAT, works! While I’m using my gateway for internet..
You need to accept UDP port in firewall filter, at input chain. dst-nat rule would only make sense if the server is somewhere below the router (it is a client of the natted network). You shouldn’t need anything on NAT to reach the gateway or other subnets that router may manage.
Provide the config for the router and client and chances are we can easily help you get things sorted. Otherwise, it’s all guessing complicated by language barrier and the fact that I don’t think you know exactly what it is you’re doing. Last response from me until I see configs. The other guys can keep guessing while you do random crap behind the scenes.
As I wrote it’s below the main router, it’s an OS7, the main router is OS6. WIthout dstnat it won’t work
Wireguard works, the problem was I did a TCP destnat instead of UDP and that the Wireguard app it’s tricky and wrote “connected” even if it is not at all connected. I figure it out only because I had RX 0 bytes and 0 links that made me suspicious
With 7.14 Mikrotik has solved the log problem.
The connection may still unstable, the problem is connected with the keys in my opinion, the relation between public and private key may change and it’s needed to add again key to Peer
Wrong in every thought…
and by not posting your config from the very beginning, how was anyone supposed to know you for example you had improper formats for wireguard
keys dont change magically either…