mirror of
https://github.com/pirate/wireguard-docs.git
synced 2025-10-03 14:26:18 +00:00
add full example wip
This commit is contained in:
1
full-example/public-server2/public-server2.key
Normal file
1
full-example/public-server2/public-server2.key
Normal file
@@ -0,0 +1 @@
|
||||
eDwURfg8PhpUAdPp+OA9pQ5oZQYqGqY3LToUORMh220=
|
1
full-example/public-server2/public-server2.key.pub
Normal file
1
full-example/public-server2/public-server2.key.pub
Normal file
@@ -0,0 +1 @@
|
||||
SceMEaVZaZfOGtGXjMsoJjhwxKHkb++9wjxqN1vm32s=
|
6
full-example/public-server2/setup.sh
Normal file
6
full-example/public-server2/setup.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# install wireguard
|
||||
add-apt-repository ppa:wireguard/wireguard
|
||||
apt update
|
||||
apt install wireguard
|
5
full-example/public-server2/start.sh
Normal file
5
full-example/public-server2/start.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
PEER_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
wg-quick up "$PEER_DIR"/wg0.conf
|
||||
wg show
|
5
full-example/public-server2/stop.sh
Normal file
5
full-example/public-server2/stop.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
PEER_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
wg-quick down "$PEER_DIR"/wg0.conf
|
||||
wg show
|
14
full-example/public-server2/wg0.conf
Normal file
14
full-example/public-server2/wg0.conf
Normal file
@@ -0,0 +1,14 @@
|
||||
[Interface]
|
||||
# Name = public-server2.example-vpn.dev
|
||||
Address = 10.0.0.2/32
|
||||
ListenPort = 51820
|
||||
PrivateKey = <private key for public-server2.example-vpn.dev>
|
||||
DNS = 1.1.1.1
|
||||
|
||||
[Peer]
|
||||
# Name = public-server1.example-vpn.tld
|
||||
Endpoint = public-server1.example-vpn.tld:51820
|
||||
PublicKey = <public key for public-server1.example-vpn.tld>
|
||||
# routes traffic to itself and entire subnet of peers as bounce server
|
||||
AllowedIPs = 10.0.0.1/24
|
||||
PersistentKeepalive = 25
|
Reference in New Issue
Block a user