Advertisement
askanton

pritunl, супер простой VPN сервер своими руками

Nov 12th, 2020
1,046
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. Manual https://youtu.be/y67XXuZCpPc
  2. apt-get update && apt-get install -y gnupg2
  3.  
  4. sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list << EOF
  5. deb https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.2 multiverse
  6. EOF
  7.  
  8. sudo tee /etc/apt/sources.list.d/pritunl.list << EOF
  9. deb https://repo.pritunl.com/stable/apt focal main
  10. EOF
  11.  
  12. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv E162F504A20CDF15827F718D4B7C549A058F8B6B
  13. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7568D9BB55FF9E5287D586017AE645C0CF8E292A
  14. sudo apt-get update
  15. sudo apt-get --assume-yes install pritunl mongodb-server
  16. sudo systemctl start pritunl mongodb
  17. sudo systemctl enable pritunl mongodb
  18.  
  19. sh -c 'echo "* hard nofile 64000" >> /etc/security/limits.conf'
  20. sh -c 'echo "* soft nofile 64000" >> /etc/security/limits.conf'
  21. sh -c 'echo "root hard nofile 64000" >> /etc/security/limits.conf'
  22. sh -c 'echo "root soft nofile 64000" >> /etc/security/limits.conf'
  23.  
  24. iptables -L
  25.  
  26. sudo iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
  27. sudo iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
  28. sudo iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 13131 -j ACCEPT
  29. sudo iptables -A INPUT -p udp -m udp --dport 13787 -j ACCEPT
  30.  
  31. iptables -L
  32.  
  33. sudo pritunl setup-key
  34.  
  35. sudo pritunl default-password
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement