Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Manual https://youtu.be/y67XXuZCpPc
- apt-get update && apt-get install -y gnupg2
- sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list << EOF
- deb https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.2 multiverse
- EOF
- sudo tee /etc/apt/sources.list.d/pritunl.list << EOF
- deb https://repo.pritunl.com/stable/apt focal main
- EOF
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv E162F504A20CDF15827F718D4B7C549A058F8B6B
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7568D9BB55FF9E5287D586017AE645C0CF8E292A
- sudo apt-get update
- sudo apt-get --assume-yes install pritunl mongodb-server
- sudo systemctl start pritunl mongodb
- sudo systemctl enable pritunl mongodb
- sh -c 'echo "* hard nofile 64000" >> /etc/security/limits.conf'
- sh -c 'echo "* soft nofile 64000" >> /etc/security/limits.conf'
- sh -c 'echo "root hard nofile 64000" >> /etc/security/limits.conf'
- sh -c 'echo "root soft nofile 64000" >> /etc/security/limits.conf'
- iptables -L
- sudo iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
- sudo iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
- sudo iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 13131 -j ACCEPT
- sudo iptables -A INPUT -p udp -m udp --dport 13787 -j ACCEPT
- iptables -L
- sudo pritunl setup-key
- sudo pritunl default-password
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement