This commit is contained in:
zleyyij 2022-12-28 20:04:12 -07:00
parent 1679e3d98e
commit 9671c0030e
5 changed files with 55 additions and 43 deletions

3
.obsidian/app.json vendored
View File

@ -6,5 +6,6 @@
"landscape": false,
"margin": "0",
"downscalePercent": 100
}
},
"spellcheck": true
}

View File

@ -4,47 +4,18 @@
"type": "split",
"children": [
{
"id": "659832c930a69b24",
"id": "338f803d60cfdbe3",
"type": "tabs",
"children": [
{
"id": "a1c05f2be34d0cb6",
"id": "36ba594a14318b0c",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "Homelabbity.md",
"mode": "source",
"source": false
}
}
},
{
"id": "05303b21b207169d",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "Ohm's Law.md",
"mode": "source",
"source": false
}
}
},
{
"id": "fcb065c9da91bb43",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "Deploying pihole-docker to a brand new Debian instance.md",
"mode": "source",
"source": false
}
"type": "empty",
"state": {}
}
}
],
"currentTab": 2
]
}
],
"direction": "vertical"
@ -102,7 +73,6 @@
"state": {
"type": "backlink",
"state": {
"file": "Deploying pihole-docker to a brand new Debian instance.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
@ -140,17 +110,17 @@
"markdown-importer:Open format converter": false
}
},
"active": "fcb065c9da91bb43",
"active": "36ba594a14318b0c",
"lastOpenFiles": [
"Deploying pihole-docker to a brand new Debian instance.md",
"Homelabbity.md",
"Ohm's Law.md",
"Deploying PiVPN to a debian instance.md",
"Migrating PiVPN configs to another server.md",
"Setting up SSH keys.md",
"Installing Arch.md",
"Specify Server.md",
"Homelabbity.md",
"Writing a completely functional shell in Rust.md",
"wlan0 disabled after restart or wake from hibernate.md",
"unable to connect to wpa-enterprise via iwd.md",
"Fixing a non booting linux install.md",
"Enabling fingerprint authentication on Zephyrus G15.md"
"wlan0 disabled after restart or wake from hibernate.md"
]
}

View File

@ -0,0 +1,23 @@
## Preperation
The system was fully updated:
```
sudo apt update
sudo apt upgrade
```
A user was created as a designated PiVPN user. This is not strictly necessary, but I feel it is best. The home dir is set as `/opt/pivpn` because this server's schema designates a directory in `/opt` for each service
```
sudo adduser pivpn --home=/opt/pivpn
```
## Deployment
The installation command was copied from the [PiVPN website](https://pivpn.io/):
```
curl -L https://install.pivpn.io | bash
```
- `eth0` was selected for the IPv4 and IPv6 interface
- Yes was selected for the DHCP reservation(set via router's web interface)
- The user previously created is selected as the designated PiVPN user, this is not strictly necessary, any user will do.
- Wireguard is selected as the VPN, although the process is very similar for OpenVPN
- The default port is likely fine, remember to open the port. Wireguard is strictly UDP, with OpenVPN using both TCP and UDP
- The DNS server selection is personal preference, this is where I selected my Pihole
- The access method was set as the network's WAN IP, I have never used the other options
- Unattended security patches were enabled

View File

@ -20,6 +20,8 @@ version: "3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
pihole:
# start on boot and when crashed
restart: unless-stopped
container_name: pihole
image: pihole/pihole:latest
# For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
@ -41,7 +43,7 @@ services:
- NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
restart: unless-stopped
```
The time zone was updated to the correct timezone, and the docker container started with (Note: If you are not using a `docker` user, you will need to add your user to the docker group. This can be done with `sudo usermod -aG docker [user]`):
The time zone was updated to the correct timezone, a configuration option added to make the container start automatically, and the docker container started with (Note: If you are not using a `docker` user, you will need to add your user to the docker group. This can be done with `sudo usermod -aG docker [user]`):
```
docker-compose -f docker-compose.yml up -d
```

View File

@ -0,0 +1,16 @@
Official docs found [here](https://github.com/pivpn/pivpn/wiki/WireGuard#how-can-i-migrate-my-configs-to-another-pivpn-instance)
## Preparation
Both servers were fully updated
## Migration
Initial Server is the server with the initial instance
New Server is the server the configs are being migrated to
`pivpn -bk` was run on Initial Server, which generated a backup file in `$HOME/pivpnbackup`
The backup was copied from Initial Server to New Server:
```
scp [initial server username]@[initial server ip]:~/pivpnbackup/20221229-021008-pivpnwgbackup.tgz [destination directory]
```
The backup was extracted:
```
tar xzpfv [archive name]
```