Skip to content

Instantly share code, notes, and snippets.

@m3rryqold
Last active September 8, 2022 12:06
Show Gist options
  • Save m3rryqold/6dc23d3e86333f99cf3d3190e1801bc6 to your computer and use it in GitHub Desktop.
Save m3rryqold/6dc23d3e86333f99cf3d3190e1801bc6 to your computer and use it in GitHub Desktop.
Pritunl setup and launch
#!/usr/bin/env bash
sudo tee /etc/apt/sources.list.d/pritunl.list << EOF
deb http://repo.pritunl.com/stable/apt focal main
EOF
# Import signing key from keyserver
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7568D9BB55FF9E5287D586017AE645C0CF8E292A
# Alternative import from download if keyserver offline
# curl https://raw.githubusercontent.com/pritunl/pgp/master/pritunl_repo_pub.asc | sudo apt-key add -
sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list << EOF
deb https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse
EOF
wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
sudo apt update
# WireGuard server support
sudo apt -y install wireguard wireguard-tools
# Disable firewall
sudo ufw disable
sudo apt -y install pritunl mongodb-org
sudo systemctl enable mongod pritunl
sudo systemctl start mongod pritunl
# change default port to 8443 if 443 in use
sudo sed -i 's/ 443/ 8443/' /etc/pritunl.conf
# start pritunl
sudo pritunl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment