Install Pritunl on Ubuntu 16 Rumi, June 29, 2020 Update your bare-bone and freshly installed Ubuntu 16 system. sudo apt-get update && sudo apt-get upgrade Add Pritunl’s APT repository and update the package lists: echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" > /etc/apt/sources.list.d/mongodb-org-3.0.list echo "deb http://repo.pritunl.com/stable/apt trusty main" > /etc/apt/sources.list.d/pritunl.list Add repo keys for apt to validate against apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7F0CEB10 apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv CF8E292A Update the package cache sudo apt-get update If you have a firewall running on the Linode, add exceptions for Pritunl’s Web UI and server: sudo iptables -A INPUT -p udp -m udp --sport 9700 --dport 1025:65355 -j ACCEPT sudo iptables -A INPUT -p tcp -m tcp --sport 9700 --dport 1025:65355 -j ACCEPT sudo iptables -A INPUT -p `your protocol here` -m `your protocol here` --sport `your_port_here` --dport 1025:65355 -j ACCEPT NoteIf you’ve configured the firewall according to the Securing Your Server guide, be sure to add these port ranges to the /etc/iptables.firewall.rules file. Install Pritunl and its required dependencies: sudo apt-get install python-software-properties pritunl mongodb-org Start the Pritunl service: sudo service pritunl start Open a web browser on your computer, and navigate to https://123.45.67.89:9700, replacing 123.45.67.89 with your VM IP address. You will see a screen similar to this: Connect to the database. The installer has already populated the MongoDB URI. If it looks correct, click Save. Tip: If you see something different like your mongodb is not running, then probably you need to create the following script and run: Create a configuration file named mongodb.service in /etc/systemd/system to manage the MongoDB service. sudo vim /etc/systemd/system/mongodb.service #Unit contains the dependencies to be satisfied before the service is started. [Unit] Description=MongoDB Database After=network.target Documentation=https://docs.mongodb.org/manual # Service tells systemd, how the service should be started. # Key `User` specifies that the server will run under the mongodb user and # `ExecStart` defines the startup command for MongoDB server. [Service] User=mongodb Group=mongodb ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf # Install tells systemd when the service should be automatically started. # `multi-user.target` means the server will be automatically started during boot. [Install] WantedBy=multi-user.target Update the systemd service with the command stated below: systemctl daemon-reload Start the service with systemcl. sudo systemctl start mongodb Check if mongodb has been started on port 27017 with netstat command: netstat -plntu Check if the service has started properly. sudo systemctl status mongodb The output to the above command will show `active (running)` status with the PID and Memory/CPU it is consuming. Enable auto start MongoDB when system starts. sudo systemctl enable mongodb Configuring Pritunl: Login with the following information: Username: pritunl Password: pritunl Or follow on screen instructions to generate user password. The Initial Setup form will appear: Fill out the form, and press Save. Go to the Users tab. Here, you will create your organizations and users. Begin by clicking Add Organization and entering a name. Next, click Add User and add a user to the organization you just created. Go to the Servers tab. Click Add server. You will see a screen like the following: If a firewall is set up, make sure that the Port and Protocol fields match the firewall exceptions added earlier. Click the Attach Organization button. Attach the organization to the server. Connecting to the Server To connect to the server, you can use any OpenVPN compatible client. For Android or iOS, you can use the free OpenVPN Connect app available in the Google Play or iOS App Store. For Linux, there is an official client available for Ubuntu. Mac and Windows users can use any OpenVPN client. You can download your required edition from the link below: https://client.pritunl.com/ Increase Open File Limit Run the commands below to increase the open file limit on the server. This will prevent connections issues on servers with high load. This should also be done on the MongoDB server. Use the command sudo lsof -p `pgrep pritunl-web` | wc -l to check the file count for the Pritunl web server. Shell sudo sh -c 'echo "* hard nofile 64000" >> /etc/security/limits.conf' sudo sh -c 'echo "* soft nofile 64000" >> /etc/security/limits.conf' sudo sh -c 'echo "root hard nofile 64000" >> /etc/security/limits.conf' sudo sh -c 'echo "root soft nofile 64000" >> /etc/security/limits.conf' Src: https://hevodata.com/blog/install-mongodb-on-ubuntu/ https://www.linode.com/docs/networking/vpn/pritunl-vpn-ubuntu/ https://docs.pritunl.com/docs/installation Related Administrations Configurations (Linux) PritunlUbuntu 16vpn
install and Configure SAMBA in Debian Squeeze March 4, 2020March 6, 2020 Samba is a free software re-implementation of SMB/CIFS networking protocol, originally developed by Australian Andrew Tridgell. As of version 3, Samba provides file and print services for various Microsoft Windows clients and can integrate with a Windows Server domain, either as a Primary Domain Controller (PDC) or as a domain… Read More
Setting up LDAP on Debian Distro May 16, 2012May 16, 2012 LDAP (Lightweight Directory Access Protocol) allows central user, group, domain….. authentication, information storage … Using LDAP in a local network, you can allow your users to login and authenticate from anywhere on your network. This tutorial will be split in 2 parts. In the first part, I will explain how-to… Read More
enable SNMP on Xen (XCP-NG) hypervisors March 5, 2021 There are six steps to correctly configuring SNMP on your Citrix Xen hypervisor. These steps don’t require a system restart and are non-service affecting. To start, we assume you’re running Xen v6.x or v7.x, and are logged into the Xen CLI as root. 1. Enable the SNMP daemon Enable the… Read More