# Wireguard - wg-quick

**URL:** <https://forum.openwrt.org/t/wireguard-wg-quick/33537>\
**Category:** Network and Wireless Configuration\
**Created:** [March 18, 2019, 11:05am UTC](https://forum.openwrt.org/t/wireguard-wg-quick/33537 "2019-03-18T11:05:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![zkzkzk2015](https://forum.openwrt.org/letter_avatar/zkzkzk2015/32/5_5575768a8748004e209b776fc1b2916d.png) [@zkzkzk2015](https://forum.openwrt.org/u/zkzkzk2015)\
**Post date:** [March 18, 2019, 11:05am UTC](https://forum.openwrt.org/t/wireguard-wg-quick/33537/1 "2019-03-18T11:05:24Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![takimata](https://forum.openwrt.org/user_avatar/forum.openwrt.org/takimata/32/114647_2.png) [@takimata](https://forum.openwrt.org/u/takimata)\
**Post date:** [March 18, 2019, 12:09pm UTC](https://forum.openwrt.org/t/wireguard-wg-quick/33537/2 "2019-03-18T12:09:49Z")

</div>

> [@Help with WireGuard please](https://forum.openwrt.org/t/help-with-wireguard-please/18279/5):
>
> I assume your goal is to connect your two private networks, each of them behind another edge router? It gets a bit tricky then. Not because any part of this in itself would be horribly complicated, but because you got a slightly more elaborate setup on your hands, and the whole will not work if you got any part of it wrong. set up Wireguard on both of your OpenWrt devices on each OpenWrt devices, enter the respective other peer's data (public key and IP range) on the edge router in front of t…

---

<div class="post-metadata">

**Author:** ![zkzkzk2015](https://forum.openwrt.org/letter_avatar/zkzkzk2015/32/5_5575768a8748004e209b776fc1b2916d.png) [@zkzkzk2015](https://forum.openwrt.org/u/zkzkzk2015)\
**Post date:** [March 18, 2019, 6:02pm UTC](https://forum.openwrt.org/t/wireguard-wg-quick/33537/3 "2019-03-18T18:02:01Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![lleachii](https://forum.openwrt.org/letter_avatar/lleachii/32/5_5575768a8748004e209b776fc1b2916d.png) [@lleachii](https://forum.openwrt.org/u/lleachii)\
**Post date:** [March 18, 2019, 6:09pm UTC](https://forum.openwrt.org/t/wireguard-wg-quick/33537/4 "2019-03-18T18:09:16Z")

</div>

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

- **What issues are you having?**

> [@zkzkzk2015](#):
>
> What other option are there to make first handshake or initilize?

- 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.

> [@zkzkzk2015](#):
>
> I assume there is no wg-quick for openWRT

- What is that?

Have you installed? -

```plaintext
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.

---

<div class="post-metadata">

**Author:** ![zkzkzk2015](https://forum.openwrt.org/letter_avatar/zkzkzk2015/32/5_5575768a8748004e209b776fc1b2916d.png) [@zkzkzk2015](https://forum.openwrt.org/u/zkzkzk2015)\
**Post date:** [March 18, 2019, 7:13pm UTC](https://forum.openwrt.org/t/wireguard-wg-quick/33537/5 "2019-03-18T19:13:40Z")

</div>

@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](https://openwrt.org/packages/pkgdata/wireguard) and [luci-app-wireguard](https://openwrt.org/packages/pkgdata/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](https://www.wireguard.com/quickstart/)

> Much of the routine bring-up and tear-down dance of [`wg(8)`](https://git.zx2c4.com/WireGuard/about/src/tools/man/wg.8) and `ip(8)` can be automated by the included [`wg-quick(8)` tool](https://git.zx2c4.com/WireGuard/about/src/tools/man/wg-quick.8):

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

---

<div class="post-metadata">

**Author:** ![lleachii](https://forum.openwrt.org/letter_avatar/lleachii/32/5_5575768a8748004e209b776fc1b2916d.png) [@lleachii](https://forum.openwrt.org/u/lleachii)\
**Post date:** [March 18, 2019, 8:07pm UTC](https://forum.openwrt.org/t/wireguard-wg-quick/33537/6 "2019-03-18T20:07:50Z")

</div>

> [@zkzkzk2015](#):
>
> I am going to install recommended packages. Maybe something is changing.  
> UPDATE: Looks like everything is installed.

Is it working?

---

<div class="post-metadata">

**Author:** ![zkzkzk2015](https://forum.openwrt.org/letter_avatar/zkzkzk2015/32/5_5575768a8748004e209b776fc1b2916d.png) [@zkzkzk2015](https://forum.openwrt.org/u/zkzkzk2015)\
**Post date:** [March 19, 2019, 9:26am UTC](https://forum.openwrt.org/t/wireguard-wg-quick/33537/7 "2019-03-19T09:26:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cbz](https://forum.openwrt.org/user_avatar/forum.openwrt.org/cbz/32/1505_2.png) [@cbz](https://forum.openwrt.org/u/cbz)\
**Post date:** [March 19, 2019, 11:20am UTC](https://forum.openwrt.org/t/wireguard-wg-quick/33537/8 "2019-03-19T11:20:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://forum.openwrt.org/uploads/default/original/3X/7/4/740520c71f00039bbf001045c682f0ecb25e905a.png) [@system](https://forum.openwrt.org/u/system)\
**Post date:** [March 29, 2019, 11:20am UTC](https://forum.openwrt.org/t/wireguard-wg-quick/33537/9 "2019-03-29T11:20:04Z")

</div>

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