reordered and renamed for wikidocs
This commit is contained in:
23
documents/wireguard/wireguard_install_lxc/content.md
Executable file
23
documents/wireguard/wireguard_install_lxc/content.md
Executable file
@@ -0,0 +1,23 @@
|
||||
## Run as root
|
||||
|
||||
#### Install prereqs
|
||||
|
||||
```bash
|
||||
apt install -y wireguard-tools resolvconf
|
||||
```
|
||||
|
||||
#### Generate keys
|
||||
|
||||
```bash
|
||||
cd /etc/wireguard
|
||||
wg genkey | tee privatekey | wg pubkey > publickey
|
||||
```
|
||||
|
||||
#### Create server config
|
||||
```bash
|
||||
echo "[Interface]" > /etc/wireguard/wg0.conf
|
||||
echo "PrivateKey = " >> /etc/wireguard/wg0.conf
|
||||
echo "Address = 10.8.0.1/24" >> /etc/wireguard/wg0.conf
|
||||
echo "ListenPort = 51820" >> /etc/wireguard/wg0.conf
|
||||
echo "DNS = 1.1.1.1" >> /etc/wireguard/wg0.conf
|
||||
```
|
||||
Reference in New Issue
Block a user