debian 11 | LinuxHostSupport Linux Tutorials and Guides Thu, 24 Feb 2022 11:06:08 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.1 How to Install Ntopng on Debian 11 https://linuxhostsupport.com/blog/how-to-install-ntopng-on-debian-11/ https://linuxhostsupport.com/blog/how-to-install-ntopng-on-debian-11/#comments Wed, 30 Mar 2022 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1650 In this blog post, we are going to install Ntopng on Debian 11 OS and explain in step-by-step detail the installation process. Ntopng is a web-based application for tracking the network traffic on your server. It is free and open-source and supports different operating systems like Linux, Windows MacOS and etc. Ntopng is a very […]

The post How to Install Ntopng on Debian 11 appeared first on LinuxHostSupport.

]]>
In this blog post, we are going to install Ntopng on Debian 11 OS and explain in step-by-step detail the installation process.

Ntopng is a web-based application for tracking the network traffic on your server. It is free and open-source and supports different operating systems like Linux, Windows MacOS and etc. Ntopng is a very useful monitoring tool that shows, multiple graphs in the GUI such as network usage, analytical data, bandwidth utilization, apps and etc. Also, Ntopng analyzes the traffic and sorts it by source/destination.

Installing Ntopng on Debian 11, is a very easy and straightforward process in just a few steps. Let’s get to work!

Prerequisites

  • A server with Debian 11 as OS
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

We need to update the packages to their latest versions available before we start with the installation. Execute the following commands to update the system.

sudo apt update -y && sudo apt upgrade -y

Step 2. Add Ntopng Repository

By default Debian 11, does not contain the repository for Ntopng, so we need to add it manually. To add the repository execute the commands below:

cd /opt

wget http://apt.ntop.org/buster/all/apt-ntop.deb

dpkg -i apt-ntop.deb

Step 3. Install Ntopng

Once, the package is added update the system again.

sudo apt update -y

After updating the system, we are ready to execute the command for installing Ntopng.

sudo apt install ntopng

Once, the Ntopng monitoring tool is installed, start and enable the service for automatic boot on system reboot.

sudo systemctl start ntopng && sudo systemctl enable ntopng

Check the status of the Ntopng service with the following command:

sudo systemctl status ntopng

You should receive the following output:

root@vps:/opt# sudo systemctl status ntopng
● ntopng.service - ntopng high-speed web-based traffic monitoring and analysis tool
     Loaded: loaded (/etc/systemd/system/ntopng.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-02-14 17:27:07 EST; 6min ago
   Main PID: 27734 (2/flow_checks)
      Tasks: 35 (limit: 4678)
     Memory: 205.4M
        CPU: 55.493s
     CGroup: /system.slice/ntopng.service
             └─27734 /usr/bin/ntopng /run/ntopng.conf

Feb 14 17:27:23 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:23 [startup.lua:120] [lists_utils.lua:421] Updating list 'Abuse.ch URLhaus' [https://urlhaus.abuse.ch>
Feb 14 17:27:23 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:23 [startup.lua:120] [lists_utils.lua:421] Updating list 'Emerging Threats' [https://rules.emergingth>
Feb 14 17:27:23 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:23 [startup.lua:120] [lists_utils.lua:421] Updating list 'Feodo Tracker Botnet C2 IP Blocklist' [http>
Feb 14 17:27:23 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:23 [startup.lua:120] [lists_utils.lua:421] Updating list 'NoCoin Filter List' [https://raw.githubuser>
Feb 14 17:27:23 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:23 [startup.lua:120] [lists_utils.lua:421] Updating list 'SSLBL Botnet C2 IP Blacklist' [https://sslb>
Feb 14 17:27:24 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:24 [startup.lua:120] [lists_utils.lua:718] Category Lists (1711 hosts, 2117 IPs, 0 JA3) loaded in 1 s>
Feb 14 17:27:25 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:25 [startup.lua:202] Completed startup.lua
Feb 14 17:27:25 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:25 [PeriodicActivities.cpp:167] Found 10 activities
Feb 14 17:27:25 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:25 [NetworkInterface.cpp:3195] Started packet polling on interface lo [id: 1]...
Feb 14 17:27:25 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:25 [NetworkInterface.cpp:3195] Started packet polling on interface eth0 [id: 2]...

Step 4. Configure Ntopng

Before we access Ntopng we need to configure it. Open the Ntopng configuration file /etc/ntopng/ntopng.conf

sudo nano /etc/ntopng/ntopng.conf

Paste the following lines of code:

##Define the network interface for network monitoring.
##Define the HTTP port for the web server.
-w=5000

Save the file, and close it. Create new ntopng.start file to define the network.

sudo nano /etc/ntopng/ntopng.start

Paste the following lines of code:

--local-networks "YourLocalIPaddressHere/24"  ## give your local IP Ranges here.
--interface 1

Save the newly created file and restart the Ntopng service.

sudo systemctl restart ntopng

You can check the service if is running on port with the following command:

netstat -tunlp | grep 5000

You should receive the following output:

root@vps:~# netstat -tunlp | grep 5000
tcp        0      0 0.0.0.0:5000            0.0.0.0:*               LISTEN      37148/ntopng

Step 5. Access the Ntopng

To access the Ntopng GUI visit the URL http://YourIpAddress:5000. You will see the screen as described below:

On a fresh installation the default username and password is admin. Once, you enter admin as username and password hit on the “Login” button.

On the next screen you will have to change the default password with a strong one for better security.

Enter the strong password twice and click on the “Change Password” button.

After this, you will be automatically logged in to the Ntopng GUI with the changed password.

Congratulations! You successfully installed and configured Ntopng on Debian 11.

Of course, you don’t have to install Ntopng on Debian 11, if you use one of our SSD VPS Hosting plans, in which case you can simply ask our expert Linux admins to install Ntopng on Debian 11 for you. They are available 24×7 and will take care of your request immediately.

If you liked this post on how to install Ntopng on Debian 11, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install Ntopng on Debian 11 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-ntopng-on-debian-11/feed/ 1
How to Set Up Nginx as a Reverse Proxy For Apache on Debian 11 https://linuxhostsupport.com/blog/how-to-set-up-nginx-as-a-reverse-proxy-for-apache-on-debian-11/ https://linuxhostsupport.com/blog/how-to-set-up-nginx-as-a-reverse-proxy-for-apache-on-debian-11/#respond Sat, 15 Jan 2022 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1622 Nginx and Apache are both free, open-source, and considered some of the most popular web servers around the world.If we combine both servers, then we will get a better result for our services. Nginx is generally faster than Apache and Apache is well-known for its powerful features. In today’s tutorial, you will learn how to […]

The post How to Set Up Nginx as a Reverse Proxy For Apache on Debian 11 appeared first on LinuxHostSupport.

]]>
Nginx and Apache are both free, open-source, and considered some of the most popular web servers around the world.
If we combine both servers, then we will get a better result for our services. Nginx is generally faster than Apache and Apache is well-known for its powerful features.

setting up nginx as a reverse proxy for apache on debian 11

In today’s tutorial, you will learn how to set up Nginx as a reverse proxy for Apache, using Debian 11 OS. Make sure to follow the official documentation, if any issues arise in the meantime.

Prerequisites

  • Server running Debian 11
  • Root access to the server

Updating system and installing dependencies

Before starting, it’s hugely important to have your system up-to-date. So, you can run the following commands on your server to update it:

 apt-get update -y; apt-get upgrade -y 

After the system is updated, you need to install the dependencies:
apt-get install gnupg2 curl -y

Installing and configuring Apache

In this part, we’ll proceed with the Apache installation and configuration to run on port 8000. First of all, you need to install it with this command:
apt-get install apache2 -y

Once it’s installed, you need to edit the port from 80 to 8000 on the following files:
nano /etc/apache2/ports.conf
From: Listen 80
To: Listen 8000

nano /etc/apache2/sites-enabled/000-default.conf
From:
80
To:
8000

Now, we’ll restart apache to apply the changes:

systemctl restart apache2

And once it’s restarted, you should see the default page on the following link:
http://your-ip:8000

Installing and configuring Nginx.

Now, since we already have our Apache up and running on port 8000, we need to set up our Nginx as the reverse proxy to run on port 80 and proxy the traffic to port 8000. First of all, let’s install Nginx with:
apt-get install nginx -y

Then, once the installation is done, we need to empty the default vhost, so you can run this command:
echo "" > /etc/nginx/sites-enabled/default

After that, just open it and paste this content to redirect the accesses from port 80 (Nginx)
to 8000 (Apache2):

server {
    listen 80 default_server;
    index index.php index.html index.htm;
    location / {
        proxy_pass http://localhost:8000;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Then just save the file and check the Nginx for any syntax error with this command:
nginx -t

Next, just reload the Nginx service to apply our changes:
systemctl restart nginx

Now, once you access your IP address, you’ll be accessing your Nginx and being proxied to the Apache2 service.

And that’s it. You have successfully installed Nginx as a Reverse Proxy for Apache on Debian 11. Of course, if you have any Linux VPS hosting with us, you don’t need to do this installation. Our admins are available 24/7/365 to help you with those steps.

installing nginx as a reverse proxy for apache on debian 11

You will gain all the free benefits of fully managed hosting, including premium customer support, free and unlimited site migration, 99.99% uptime guaranteed, and many other features for your increased satisfaction.

The post How to Set Up Nginx as a Reverse Proxy For Apache on Debian 11 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-set-up-nginx-as-a-reverse-proxy-for-apache-on-debian-11/feed/ 0
How to Install GitLab on Debian 11 https://linuxhostsupport.com/blog/how-to-install-gitlab-on-debian-11/ https://linuxhostsupport.com/blog/how-to-install-gitlab-on-debian-11/#comments Thu, 30 Dec 2021 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1609 GitLab is a self-hosted git repository management system. It is a Git repository manager providing wiki, issue-tracking, and continuous integration and deployment. Because of the advantage that brings development, operations, and security teams into a single application, GitLab is now widely used across the globe. Installing GitLab on Debian 11 is a fairly easy task […]

The post How to Install GitLab on Debian 11 appeared first on LinuxHostSupport.

]]>
GitLab is a self-hosted git repository management system. It is a Git repository manager providing wiki, issue-tracking, and continuous integration and deployment. Because of the advantage that brings development, operations, and security teams into a single application, GitLab is now widely used across the globe. Installing GitLab on Debian 11 is a fairly easy task and it should take around 15 minutes for the installation. Today we will show you how to install GitLab on your Debian 11 VPS.

Prerequisites

  • A Debian 11 VPS.
  • At least 4GB of RAM.
  • SSH access with sudo privileges, or root access.

In addition, it is recommended to have at least 2GB of SWAP memory, even if you have enough available RAM.

Step 1. Update System

First of all, we need to log in to our Debian 11 VPS through SSH:

ssh master@IP_Address -p Port_Number

Replace “master” with a user that has sudo privileges or root if necessary. Additionally, replace “IP_Address” and “Port_Number” with your server’s respective IP address and SSH port number. Next, let’s make sure that we’re on Debian 11. You can do that like this:

$ lsb_release -a

You should get this as the output:

Distributor ID: Debian
Description: Debian GNU/Linux 11 (bulleseye)
Release: 11
Codename: bullseye

Then, run the following command to make sure that all installed packages on the server are updated to their latest available versions:

$ sudo apt update && apt upgrade

Step 2. Add Repository

There are two ways to install GitLab on Debian 11; we can install it using the repository or the deb package. In this tutorial, we are going to use the repository to install GitLab on Debian 11.

At this step, we will use the repository for Debian 10, because the repository for Debian 11 is not available at this time of writing.

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash

The command above will download the GitLab repository to the APT source list file at /etc/apt/sources.list.d/gitlab_gitlab-ce.list
Since the GitLab package source file is for Debian 10, we need to modify these lines.

deb https://packages.gitlab.com/gitlab/gitlab-ce/debian/ bullseye main
deb-src https://packages.gitlab.com/gitlab/gitlab-ce/debian/ bullseye main

Replace ‘bullseye’ with ‘buster’ by running this command.

$ sudo sed -i 's/bullseye/buster/g' /etc/apt/sources.list.d/gitlab_gitlab-ce.list

Now, we need to update the repository.

$ sudo apt update -y

Step 3. Install GitLab

After adding the repository, we can install GitLab Community Edition by running this command:

$ sudo apt install gitlab-ce -y
installing gitlab on debian 11

Once the installation is finished, we can run this command to reconfigure it and run GitLab

$ sudo gitlab-ctl reconfigure

At this point, you should be able to access GitLab at http://YOUR_SERVER_IP_ADDRESS/ and log in as root using the password in /etc/gitlab/initial_root_password

Please note that the password in /etc/gitlab/initial_root_password is valid only for 24 hours. You can log in and change your password immediately or reset it using this command below

$ sudo gitlab-rake "gitlab:password:reset[root]"

Step 4. Configure GitLab

GitLab has been successfully installed, and it is time to configure it.

Secure GitLab Server with Let’s Encrypt SSL Certificate

By default, when installing GitLab without passing an environment for the EXTERNAL_URL value. The installation will set http://gitlab.example.com as the external URL. If we want to access our GitLab installation through a domain or subdomain name and install an SSL certificate for it, we can edit the configuration file /etc/gitlab/gitlab.rb

Open /etc/gitlab/gitlab.rb and find external_url line

external_url 'http://gitlab.example.com'

Replace it with

external_url 'https://gitlab.yourdomain.com'

Make sure that your domain or subdomain DNS record is pointing to your GitLab server.

Then, still in the same file, make sure these are uncommented and modified as follows.

letsencrypt['enable'] = true
letsencrypt['contact_emails'] = ['you@yourdomain.com'] 
letsencrypt['auto_renew'] = true

Save the file then exit.

Now, we need to reconfigure Omnibus GitLab, and we need to do this every time we edit /etc/gitlab/gitlab.rb file.

$ sudo gitlab-ctl reconfigure

Run the command above and wait, once completed you the SSL certificate from Let’s Encrypt should be installed and you should be able to access your GitLab at https://YOUR_DOMAIN_NAME.COM

Email Configuration

By default, GitLab should be able to send its email using sendmail. However, for better email deliverability, you should consider using an SMTP server for this purpose. With the SMTP credentials, we can configure GitLab to use SMTP to send its email.

Open /etc/gitlab/gitlab.rb

$ sudo nano /etc/gitlab/gitlab.rb

Then, find the following

# gitlab_rails['smtp_enable'] = true
# gitlab_rails['smtp_address'] = "smtp.server"
# gitlab_rails['smtp_port'] = 465
# gitlab_rails['smtp_user_name'] = "smtp user"
# gitlab_rails['smtp_password'] = "smtp password"
# gitlab_rails['smtp_domain'] = "example.com"
# gitlab_rails['smtp_authentication'] = "login"
# gitlab_rails['smtp_enable_starttls_auto'] = true
# gitlab_rails['smtp_tls'] = true
# gitlab_rails['smtp_pool'] = false
# gitlab_rails['smtp_openssl_verify_mode'] = 'none'
# gitlab_rails['smtp_ca_path'] = "/etc/ssl/certs"
# gitlab_rails['smtp_ca_file'] = "/etc/ssl/certs/ca-certificates.crt"

You need to uncomment the lines and use your SMTP credentials to make it work. Also, make sure that your SMTP password does not contain any string delimiters used in a YAML file, otherwise, it will not work. Save your changes then exit the file.

As mentioned earlier, we need to reconfigure Omnibus GitLab after editing the gitlab.rb file.

$ sudo gitlab-ctl reconfigure

And that’s it. From now on, GitLab will send emails through SMTP which will result in better email deliverability if compared to using sendmail. You can log in to your GitLab website at https://yourdomain.com and start using it.

configuring gitlab on debian 11

Congratulations! You have successfully installed GitLab on Debian 11.

Of course, if you are one of our Debian Hosting customers, you don’t have to install GitLab on Debian 11 yourself – simply ask our admins, sit back, and relax. Our admins will install GitLab on Debian 11 for you immediately without any additional fee, along with many useful optimizations that we can do for you. Managing a GitLab website is not just about the installation, we can help you with optimizing your GitLab installation if you have a VPS with us.

PS. If you liked this post about how to install GitLab on Debian 11, please share it with your friends on the social networks using the share buttons below, or simply leave a comment in the comments section. Thanks.

The post How to Install GitLab on Debian 11 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-gitlab-on-debian-11/feed/ 3