Wireguard - wg-quick

quick question concerning wireguard. I want to connect two OpenWrt routers. I already managed to connect via android app. Works fine.
My problem is how do I make a connection between my two Openwrt routers. I read about wg-quick script. But it looks like it is not available for Openwrt?
How do I establish a connection between two routers using wireguards I guess is my question?

1 Like

Thx takimata, I already did that and as I wrote I can successfully establish a "tunnel" from my Android app to my private networks.
Now I want to connect directly from my linux client behind my Openwrt router to my other home-network.
I learned people use wg-quick to initiate first hand-shake (I assume there is no wg-quick for openWRT). What other option are there to make first handshake or initilize?

If you have setup the two routers, the connection should be established.

  • What issues are you having?
  • Have you setup the two routers?

I'm not sure what you mean by this "to make first handshake." If you have setup WG properly, the two devices handhsake and are connected.

  • What is that?

Have you installed? -

opkg update
opkg install kmod-udptunnel4 kmod-udptunnel6 kmod-wireguard wireguard-tools wireguard luci-proto-wireguard luci-app-wireguard
  • Then, just browse to Network > Interfaces - and create a new Wireguard Interface.
1 Like

@lleachii: I have setup the two routers and you are right I got a handshake as well.

Summary

peer: 9PqitKQKBxxxxxxxxxxEohnwkblfJEs3yM= endpoint: 78.112.131.112:3217 allowed ips: 192.168.2.0/24 latest handshake: 1 hour, 41 minutes, 15 seconds ago transfer: 400.33 KiB received, 6.69 MiB sent persistent keepalive: every 25 seconds

But I have a fundamental understanding problem here: With my android wireshark app it is simple: I connect and use my browser typing my local address and bumm I get my remote ip-camera or my remote openWRT luci interface etc.
Obviously this is not working from my local lan, it is only working from "internet" (WAN) --> home network.

WireGuard can be installed through the package wireguard and luci-app-wireguard for integration with LuCI.

That's all I installed. Followed a couple different instructions, but nowhere package: kmod-wireguard was mentioned. Something new everyday.

From Wireguard

Much of the routine bring-up and tear-down dance of wg(8) and ip(8) can be automated by the included wg-quick(8) tool:

I am going to install recommended packages. Maybe something is changing.
UPDATE: Looks like everything is installed.

Is it working?

Well I am not sure, how to test, if it is working or not. Probably not the right place to ask such questions. Thank you anyway.

Did you try to use the luci app to configure wireguard? It should be reasonably straight forward and in principle is no different from connecting any other client.

In principle just do whatever you did to configure the first openwrt router (which is what I assume you got your android client to work with) on the second openwrt router, and then test by trying to access the IP at the far end of the tunnel from either end.

wireguard is peer to peer in essence, and the only difference in 'server' configs are usually the IPs they allow down the tunnel.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.