# OpenWRT - Wireguard

1. Create Interface and Swith Protocol to WireGuard VPN
2. Tick the `Bring up on boot` option
3. Add a `Listen Port`
4. Add a `IP Address` from the same Subnet as the WireGuard Server&#x20;
5. Firewall settings should include the current WAN interface and WireGuard interface:&#x20;
6. Configure `Peers` section with WireGuard Server:&#x20;
   1. Description can be anything
   2. Public Key of the `WireGuard Server` is required here
   3. `Allowed IPs` should be all IPs i.E. `0.0.0.0/0`
   4. `Endpoint Host` can be either a `FQDN` i.E. `DDNS Entry: example.duckdns.org` or a `Public IP`
   5. `Endpoint Port` should be the port that the `WireGuard Server` is listening on

Once this has been set up, you can verify that the connection is working from the Interface traffic:&#x20;

If this does not generate traffic, you can take a look at the `Status` section on the `WireGuard Status` tab to see if the `OpenWRT` Public Key matches the `WireGuard Server` Public Key for the `OpenWRT` connection&#x20;

If it does not, modify this on the Server and restart the `WireGuard` service or container


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.arkannis.net/networking/openwrt/openwrt-wireguard.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
