Jump to content

Wireguard Peer To Peer Configuration example: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
 
(5 intermediate revisions by the same user not shown)
Line 9: Line 9:
*An end device with the ability to install, set up WireGuard client, and configure RUTOS devices<br>
*An end device with the ability to install, set up WireGuard client, and configure RUTOS devices<br>
'''Note:''' remember to switch the '''WebUI''' into '''Advanced''' mode.
'''Note:''' remember to switch the '''WebUI''' into '''Advanced''' mode.
==Topology used in this example==
[[File:Wireguard peer to peer config example topology v3.png|border|class=tlt-border]]


==WireGuard instance creation==
==WireGuard instance creation==
Line 75: Line 78:
  [Peer]
  [Peer]
  PublicKey = 2JIBoK+Bxe7MJzX9zV+lFjqHxLTvehLp3piEROaNJjw=
  PublicKey = 2JIBoK+Bxe7MJzX9zV+lFjqHxLTvehLp3piEROaNJjw=
  AllowedIPs = 10.0.0.0/24, 192.168.1.0/24, 192.168.6.1/24
  AllowedIPs = 10.0.0.0/24, 192.168.1.0/24, 192.168.6.0/24
  Endpoint = 192.168.9.1:51820
  Endpoint = 192.168.9.1:51820


Line 107: Line 110:
[[File:Wireguard server to PC client peer v1.png|border|class=tlt-border]]
[[File:Wireguard server to PC client peer v1.png|border|class=tlt-border]]


The final results of all the server's peers could look like this:<br>
The server interface's peers section could look like this:<br>
[[File:Wireguard server to client all peers v2.png|border|class=tlt-border]]
[[File:Wireguard server to client all peers v2.png|border|class=tlt-border]]


Line 129: Line 132:
You will see the interface's and its peers' information. In the peer information section look for the latest handshake (a line below allowed IPs). If you can see “latest handshake” it means the peer made a connection to the server.
You will see the interface's and its peers' information. In the peer information section look for the latest handshake (a line below allowed IPs). If you can see “latest handshake” it means the peer made a connection to the server.
This is an example of how the command’s output could look like:<br>
This is an example of how the command’s output could look like:<br>
[[File:WG show output v1.png|border|class=tlt-border]]
[[File:Teltonika Networks WG show output v3.png|border|class=tlt-border]]
 
'''Note:''' if you do not see the latest handshake line, then try pinging the server’s Public IP (the one specified in the Endpoint Host parameter) and/or server’s VPN IP (in this example it would be the 10.0.0.1) from each peer.


===Checking the connectivity between the peers===
===Checking the connectivity between the peers===