summaryrefslogtreecommitdiff
path: root/docs/configexamples/autotest/Wireguard
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-05-06 23:24:45 +0300
committerYuriy Andamasov <yuriy@vyos.io>2026-05-06 23:24:45 +0300
commit89f86b481456437f3e9f16895e7408fe460de3f3 (patch)
treef1bb09b203d56234c4518e6ab2d7fa5ca8610dec /docs/configexamples/autotest/Wireguard
parent6ce9145fa101e623c61f009c9cf5bb75a8a4a108 (diff)
parent7cf51e1c2901f6d1b01e9bff194f7188bc29e417 (diff)
downloadvyos-documentation-89f86b481456437f3e9f16895e7408fe460de3f3.tar.gz
vyos-documentation-89f86b481456437f3e9f16895e7408fe460de3f3.zip
Merge remote-tracking branch 'origin/current' into feat/docs-llms-txt-current
# Conflicts: # docs/conf.py
Diffstat (limited to 'docs/configexamples/autotest/Wireguard')
-rw-r--r--docs/configexamples/autotest/Wireguard/Wireguard.md108
-rw-r--r--docs/configexamples/autotest/Wireguard/_include/topology.pngbin158227 -> 0 bytes
-rw-r--r--docs/configexamples/autotest/Wireguard/rst-Wireguard.rst (renamed from docs/configexamples/autotest/Wireguard/Wireguard.rst)0
3 files changed, 108 insertions, 0 deletions
diff --git a/docs/configexamples/autotest/Wireguard/Wireguard.md b/docs/configexamples/autotest/Wireguard/Wireguard.md
new file mode 100644
index 00000000..7bbf4c55
--- /dev/null
+++ b/docs/configexamples/autotest/Wireguard/Wireguard.md
@@ -0,0 +1,108 @@
+# Wireguard
+
+```{eval-rst}
+| Testdate: 2024-01-13
+| Version: 1.5-rolling-202401121239
+```
+
+This simple structure show how to connect two offices. One remote branch and the
+central office.
+
+## Topology
+
+The topology have a central and a branch VyOS router and one client, to
+test, in each site.
+
+```{image} _include/topology.webp
+:alt: Ansible Example topology image
+```
+
+
+## Configuration
+
+Set the local subnet on eth2 and the public ip address eth1 on each site.
+
+Central
+
+```{literalinclude} _include/central.conf
+:language: none
+:lines: 1-2
+```
+
+Branch
+
+```{literalinclude} _include/branch.conf
+:language: none
+:lines: 1-2
+```
+
+Next thing to do, is to create a wireguard keypair on each side.
+After this, the public key can be displayed, to save for later.
+
+```none
+vyos@central:~$ generate pki wireguard
+Private key: wHQS+ib3eMIp2DxRiAeXfFVaSCMMP1YHBaKfSR1xfV8=
+Public key: RCMy6BAER0uEcPvspUb3K38MHyHJpK5kiV5IOX943HI=
+```
+
+After you have each public key. The wireguard interfaces can be setup.
+
+Central
+
+```{literalinclude} _include/central.conf
+:language: none
+:lines: 4-12
+```
+
+Branch
+
+```{literalinclude} _include/branch.conf
+:language: none
+:lines: 4-12
+```
+
+To reach the network, a route must be set on each VyOS host.
+In this structure, a static interface route will fit the requirements.
+
+Central
+
+```{literalinclude} _include/central.conf
+:language: none
+:lines: 14
+```
+
+Branch
+
+```{literalinclude} _include/branch.conf
+:language: none
+:lines: 14
+```
+
+
+## Testing and debugging
+
+After all is done and commit, let's take a look if the Wireguard interface is
+up and running.
+
+```none
+vyos@central:~$ show interfaces wireguard
+Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
+Interface IP Address S/L Description
+--------- ---------- --- -----------
+wg01 192.168.0.1/24 u/u VPN-to-Branch
+```
+
+And ping the Branch PC from your central router to check the response.
+
+```none
+vyos@central:~$ ping 10.0.2.100 count 4
+PING 10.0.2.100 (10.0.2.100) 56(84) bytes of data.
+64 bytes from 10.0.2.100: icmp_seq=1 ttl=63 time=0.894 ms
+64 bytes from 10.0.2.100: icmp_seq=2 ttl=63 time=0.869 ms
+64 bytes from 10.0.2.100: icmp_seq=3 ttl=63 time=0.966 ms
+64 bytes from 10.0.2.100: icmp_seq=4 ttl=63 time=0.998 ms
+
+--- 10.0.2.100 ping statistics ---
+4 packets transmitted, 4 received, 0% packet loss, time 3004ms
+rtt min/avg/max/mdev = 0.869/0.931/0.998/0.052 ms
+```
diff --git a/docs/configexamples/autotest/Wireguard/_include/topology.png b/docs/configexamples/autotest/Wireguard/_include/topology.png
deleted file mode 100644
index 43c0018e..00000000
--- a/docs/configexamples/autotest/Wireguard/_include/topology.png
+++ /dev/null
Binary files differ
diff --git a/docs/configexamples/autotest/Wireguard/Wireguard.rst b/docs/configexamples/autotest/Wireguard/rst-Wireguard.rst
index 7d7b216a..7d7b216a 100644
--- a/docs/configexamples/autotest/Wireguard/Wireguard.rst
+++ b/docs/configexamples/autotest/Wireguard/rst-Wireguard.rst