> For the complete documentation index, see [llms.txt](https://docs.defguard.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.defguard.net/support-1/troubleshooting-guides/gateway.md).

# Gateway

### WireGuard network interface not configured

* Make sure Defguard Gateway has been properly adopted. If not adopted, Gateway won't configure any WireGuard network interfeces. After the adopion, there should be files in `/etc/defguard/certs`.

  ```sh
  # ls -l /etc/defguard/certs
  total 16
  -rw-------  1 root wheel 569 May  4 09:53 core_client_cert.pem
  -rw-------  1 root wheel 602 May  4 09:53 gateway_grpc_cert.pem
  -rw-------  1 root wheel 241 May  4 09:53 gateway_grpc_key.pem
  -rw-------  1 root wheel 655 May  4 09:53 grpc_ca_cert.pem
  ```
* Check if the correct interface name is set as `ifname` in `/etc/defguard/gateway.toml`, for example:

  ```ini
  ifname = "wg0"
  ```
* Check if the required network interface has been configured:

  On Linux:

  ```sh
  # ip a show dev wg0
  8: wg0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1000
      link/none 
  ```

  On BSD/macOS:

  ```sh
  # ifconfig wg0
  wg0: flags=10080c1<UP,RUNNING,NOARP,MULTICAST,LOWER_UP> metric 0 mtu 1420
            options=80000<LINKSTATE>
            inet 192.168.0.1 netmask 0xffffff00
            groups: wg
            nd6 options=109<PERFORMNUD,IFDISABLED,NO_DAD>
  ```
* Check if WireGuard peers are configured. This requires [wireguard-tools](https://github.com/WireGuard/wireguard-tools) package being installed.

  ```sh
  # wg show wg1
  interface: wg1
    public key: VGFrZXMgb25lIERlZmd1YXJkIHRvIHJ1bGUgdGhlbSBhbGw=
    private key: (hidden)
    listening port: 51820

  peer: TWF5IHRoZSBmb3JjZSBvZiBEZWZndWFyZCBiZSB3aXRoIHlvdQ==
    preshared key: (hidden)
    allowed ips: 192.168.0.2/32
    transfer: 0 B received, 90.48 KiB sent
    persistent keepalive: every 25 seconds
  ```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.defguard.net/support-1/troubleshooting-guides/gateway.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.
