mirror of
https://github.com/vyos/vyos-documentation.git
synced 2025-12-16 18:42:05 +01:00
Example: Wireguard upgrade version
This commit is contained in:
parent
907a74b746
commit
40595dd6f1
File diff suppressed because it is too large
Load Diff
@ -3,8 +3,8 @@ Wireguard
|
|||||||
#########
|
#########
|
||||||
|
|
||||||
|
|
||||||
| Testdate: 2022-12-29
|
| Testdate: 2023-02-14
|
||||||
| Version: 1.4-rolling-202212280917
|
| Version: 1.4-rolling-202302140317
|
||||||
|
|
||||||
|
|
||||||
This simple structure show how to connect two offices. One remote branch and the
|
This simple structure show how to connect two offices. One remote branch and the
|
||||||
@ -45,8 +45,8 @@ After this, the public key can be displayed, to save for later.
|
|||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
vyos@central:~$ generate pki wireguard
|
vyos@central:~$ generate pki wireguard
|
||||||
Private key: 6LxbrPPsrWDjJDIKQUxzNHQtr5fkg87NjgfziN1GCWk=
|
Private key: qN/eoMlNuzeK4nXPP4l24WgGtLGVXgKf+mGtc+4aBnA=
|
||||||
Public key: LQha7JrLlu7EoW3dRKifRlg7tPcD04vgH46EIm12/ko=
|
Public key: VUG4uTYvuQnO7QVj52VPFKsFh2D/8ps1J9IeQtErbXc=
|
||||||
|
|
||||||
|
|
||||||
After you have each public key. The wireguard interfaces can be setup.
|
After you have each public key. The wireguard interfaces can be setup.
|
||||||
@ -102,11 +102,11 @@ And ping the Branch PC from your central router to check the response.
|
|||||||
|
|
||||||
vyos@central:~$ ping 10.0.2.100 count 4
|
vyos@central:~$ ping 10.0.2.100 count 4
|
||||||
PING 10.0.2.100 (10.0.2.100) 56(84) bytes of data.
|
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.890 ms
|
64 bytes from 10.0.2.100: icmp_seq=1 ttl=63 time=0.646 ms
|
||||||
64 bytes from 10.0.2.100: icmp_seq=2 ttl=63 time=0.760 ms
|
64 bytes from 10.0.2.100: icmp_seq=2 ttl=63 time=0.877 ms
|
||||||
64 bytes from 10.0.2.100: icmp_seq=3 ttl=63 time=0.853 ms
|
64 bytes from 10.0.2.100: icmp_seq=3 ttl=63 time=0.770 ms
|
||||||
64 bytes from 10.0.2.100: icmp_seq=4 ttl=63 time=0.609 ms
|
64 bytes from 10.0.2.100: icmp_seq=4 ttl=63 time=0.921 ms
|
||||||
|
|
||||||
--- 10.0.2.100 ping statistics ---
|
--- 10.0.2.100 ping statistics ---
|
||||||
4 packets transmitted, 4 received, 0% packet loss, time 3046ms
|
4 packets transmitted, 4 received, 0% packet loss, time 3059ms
|
||||||
rtt min/avg/max/mdev = 0.609/0.778/0.890/0.108 ms
|
rtt min/avg/max/mdev = 0.646/0.803/0.921/0.106 ms
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
set interface ethernet eth2 address 10.0.2.254/24
|
set interface ethernet eth2 address 10.0.2.254/24
|
||||||
set interface ethernet eth1 address 198.51.100.2/24
|
set interface ethernet eth1 address 198.51.100.2/24
|
||||||
|
|
||||||
set interfaces wireguard wg01 private-key 'gHoErmkWaDx1CBSOm6BzFOWPTC7waU7kjZjv/YvOgX8='
|
set interfaces wireguard wg01 private-key 'KLwG5GzdqiJUY7eAE8yQGHL9CpyIWK6HhwrVJ1l0SV8='
|
||||||
set interfaces wireguard wg01 address 192.168.0.2/24
|
set interfaces wireguard wg01 address 192.168.0.2/24
|
||||||
set interfaces wireguard wg01 description 'VPN-to-central'
|
set interfaces wireguard wg01 description 'VPN-to-central'
|
||||||
set interfaces wireguard wg01 peer central allowed-ips 10.0.1.0/24
|
set interfaces wireguard wg01 peer central allowed-ips 10.0.1.0/24
|
||||||
set interfaces wireguard wg01 peer central allowed-ips 192.168.0.0/24
|
set interfaces wireguard wg01 peer central allowed-ips 192.168.0.0/24
|
||||||
set interfaces wireguard wg01 peer central address 198.51.100.1
|
set interfaces wireguard wg01 peer central address 198.51.100.1
|
||||||
set interfaces wireguard wg01 peer central port 51820
|
set interfaces wireguard wg01 peer central port 51820
|
||||||
set interfaces wireguard wg01 peer central public-key 'LQha7JrLlu7EoW3dRKifRlg7tPcD04vgH46EIm12/ko='
|
set interfaces wireguard wg01 peer central public-key 'VUG4uTYvuQnO7QVj52VPFKsFh2D/8ps1J9IeQtErbXc='
|
||||||
set interfaces wireguard wg01 port 51820
|
set interfaces wireguard wg01 port 51820
|
||||||
|
|
||||||
set protocols static route 10.0.1.0/24 interface wg01
|
set protocols static route 10.0.1.0/24 interface wg01
|
||||||
@ -1,14 +1,14 @@
|
|||||||
set interface ethernet eth2 address 10.0.1.254/24
|
set interface ethernet eth2 address 10.0.1.254/24
|
||||||
set interface ethernet eth1 address 198.51.100.1/24
|
set interface ethernet eth1 address 198.51.100.1/24
|
||||||
|
|
||||||
set interfaces wireguard wg01 private-key '6LxbrPPsrWDjJDIKQUxzNHQtr5fkg87NjgfziN1GCWk='
|
set interfaces wireguard wg01 private-key 'qN/eoMlNuzeK4nXPP4l24WgGtLGVXgKf+mGtc+4aBnA='
|
||||||
set interfaces wireguard wg01 address 192.168.0.1/24
|
set interfaces wireguard wg01 address 192.168.0.1/24
|
||||||
set interfaces wireguard wg01 description 'VPN-to-Branch'
|
set interfaces wireguard wg01 description 'VPN-to-Branch'
|
||||||
set interfaces wireguard wg01 peer branch allowed-ips 10.0.2.0/24
|
set interfaces wireguard wg01 peer branch allowed-ips 10.0.2.0/24
|
||||||
set interfaces wireguard wg01 peer branch allowed-ips 192.168.0.0/24
|
set interfaces wireguard wg01 peer branch allowed-ips 192.168.0.0/24
|
||||||
set interfaces wireguard wg01 peer branch address 198.51.100.2
|
set interfaces wireguard wg01 peer branch address 198.51.100.2
|
||||||
set interfaces wireguard wg01 peer branch port 51820
|
set interfaces wireguard wg01 peer branch port 51820
|
||||||
set interfaces wireguard wg01 peer branch public-key 'mds7iwiwTxGLtX4eYrCyKhpZdZG+QOYwHQib7xfFPlc='
|
set interfaces wireguard wg01 peer branch public-key '4tOH4tUqUgX18ZJESS9/kGHUatuLXpinVkaz+SQzsjA='
|
||||||
set interfaces wireguard wg01 port 51820
|
set interfaces wireguard wg01 port 51820
|
||||||
|
|
||||||
set protocols static route 10.0.2.0/24 interface wg01
|
set protocols static route 10.0.2.0/24 interface wg01
|
||||||
Loading…
x
Reference in New Issue
Block a user