How To Install Iftop Network Bandwidth Monitoring on Linux

Install Iftop Network Bandwidth Monitoring on Linux

iftop is a command line tool that shows a list of active network connections between local host and any remote host, sorted by their bandwidth usage. The list of top-ranking network connections (in terms of bandwidth usage) is periodically refreshed in a ncurses-based user interface.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Iftop Network Bandwidth Monitoring on a Linux server.

Install Iftop Network Bandwidth Monitoring on Linux

Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

### CentOS ###
sudo yum clean all
sudo yum -y update

### Ubuntu ###
sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Interface TOP (IFTOP) on Linux.

To install iftop on Ubuntu, Mint or Debian:

sudo apt-get install iftop

To install iftop on CentOS:

sudo yum install epel-release
sudo yum install iftop

Step 3. Using IFTOP.

iftop is very simple to use. Just type the iftop command on terminal with root privileges to display the bandwidth usage of the first network interface. Press Q to exit from the iftop command output:

iftop

Congratulation’s! You have successfully installed Interface TOP (IFTOP). Thanks for using this tutorial for installing Iftop Network Bandwidth Monitoring on Ubuntu 18.04 LTS (Bionic Beaver) system. For additional help or useful information, we recommend you to check the official iftop web site.

How To Install SSH Server on Ubuntu 18.04 LTS

Install SSH Server on Ubuntu 18

OpenSSH (OpenBSD Secure Shell) is a connectivity tool that enables remote login via the SSH protocol, hence eliminating eavesdropping, connection hijacking, and other attacks. It helps to secure all network communications by encrypting all network traffic over multiple authentication methods through a secured tunnel. In this tutorial we will learn how to install SSH Server on Ubuntu 18.04 LTS.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation SSH Server on an Ubuntu 18.04 Bionic Beaver server.

Enable SSH on Ubuntu 18.04 LTS Bionic Beaver

Step 1. First, make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing SSH Server on Ubuntu 18.04 LTS.

Install it by running the following command in your terminal:

apt-get install openssh-server

Furthermore, you can install the OpenSSH client application using the following command:

apt-get install openssh-server

After that, you should have SSH service enabled in your system:

systemctl start sshd.service
systemctl enable sshd.service

Last step is to open up the ssh firewall port:

ufw allow ssh
ufw reload

Step 3. Advanced Configuration SSH Server.

Now sometime we may want to change some settings (for example, the port, and root login permission) . This can be done by editing the configuration file via command:

nano /etc/ssh/sshd_config

The first thing you may want to do is to change the default SSH listening port. Open the file and locate the line that specifies the listening port:

Port 22

Change it to something else. For example, to 323:

Port 323

Save the file and close it. Then restart the service for the changes to take effect:

systemctl restart sshd.service

Congratulation’s! You have successfully installed OpenSSH. Thanks for using this tutorial for installing SSH Server on your Ubuntu 18.04 LTS (Bionic Beaver). For additional help or useful information, we recommend you to check the official OpenSSH web site.

How To Install OpenSSH on Ubuntu 16.04 LTS

Install OpenSSH on Ubuntu 16

OpenSSH (OpenBSD Secure Shell) is a connectivity tool that enables remote login via the SSH protocol, hence eliminating eavesdropping, connection hijacking, and other attacks. It helps to secure all network communications by encrypting all network traffic over multiple authentication methods through a secured tunnel.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation OpenSSH on an Ubuntu 16.04 Xenial Xerus server.

Install OpenSSH on Ubuntu 16.04 LTS

Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing OpenSSH on Ubuntu 16.04.

Install it by running the following command in your terminal:

apt-get install openssh-server

Furthermore, you can install the OpenSSH client application using the following command:

apt-get install openssh-client

After that, you should have SSH service enabled in your system:

systemctl start sshd.service
systemctl enable sshd.service

Last step is to open up the ssh firewall port:

ufw allow ssh
ufw reload

Step 3. Advanced Configuration OpenSSH.

Now sometime we may want to change some settings (for example, the port, and root login permission) . This can be done by editing the configuration file via command:

nano /etc/ssh/sshd_config

The first thing you may want to do is to change the default SSH listening port. Open the file and locate the line that specifies the listening port:

Port 22

Change it to something else. For example to 2022:

Port 2022

Save the file and close it. Then restart the service for the changes to take effect:

systemctl restart sshd.service

Congratulation’s! You have successfully installed OpenSSH. Thanks for using this tutorial for installing OpenSSH on your Ubuntu 16.04 LTS. For additional help or useful information, we recommend you to check the official OpenSSH web site.

How To Install Microsoft SQL Server on Ubuntu 16.04 LTS

Install Microsoft SQL Server on Ubuntu 16

Microsoft SQL Server is a relational database management system developed by Microsoft. As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications which may run either on the same computer or on another computer across a network (including the Internet).

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Microsoft SQL Server on a Ubuntu 16.04 (Xenial Xerus) server.

Install Microsoft SQL Server on Ubuntu 16.04 LTS

Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Microsoft SQL Server on Ubuntu 16.04.

To begin, we’ll need to add two repositories to our software sources list:

wget https://packages.microsoft.com/keys/microsoft.asc
sudo apt-key add microsoft.asc
curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list | sudo tee /etc/apt/sources.list.d/mssql.list
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list

Next we install the MS SQL server by following command:

apt-get update
apt-get install mssql-server mssql-tools -y

Step 3. Configure MS SQL server.

Once installation is complete, you will be reminded to run the configuration script (/opt/mssql/bin/sqlservr-setup) to accept the license terms, set the password for the SA user, and start the service.

sudo /opt/mssql/bin/sqlservr-setup

Output:

Microsoft(R) SQL Server(R) Setup

You can abort setup at anytime by pressing Ctrl-C. Start this program
with the –help option for information about running it in unattended
mode.


The license terms for this product can be downloaded from
http://go.microsoft.com/fwlink/?LinkId=746388 and found
in /usr/share/doc/mssql-server/LICENSE.TXT.

Do you accept the license terms? If so, please type "YES": YES

Please enter a password for the system administrator (SA) account: Enter Admin Password
Please confirm the password for the system administrator (SA) account: Re Enter Admin Password

Setting system administrator (SA) account password...

Do you wish to start the SQL Server service now? [y/n]: n

You can use sqlservr-setup --start-service to start SQL Server, and
sqlservr-setup --enable-service to enable SQL Server to start at boot.

Setup completed successfully.

Finally, Start the Microsoft SQL Server Service:

systemctl start mssql-server
systemctl enable mssql-server

Step 4. Connect to MS SQL server.

Once the installation is complete, connect to MS SQL server using the following command:

sqlcmd -H 127.0.0.1 -U sa
Password:
1>

Congratulation’s! You have successfully installed Microsoft SQL Server. Thanks for using this tutorial for installing Microsoft SQL Server (MS SQL) on your Ubuntu 16.04 LTS (Xenial Xerus) system. For additional help or useful information, we recommend you to check the official Microsoft SQL Server web site.

How To Install VMware Workstation on Ubuntu 16.04 LTS

Install VMware Workstation on Ubuntu 16

VMware Workstation is the most popular Virtualization software used at the desktop level on Linux like operating systems and Microsoft Windows. It allows the us to create and run multiple Virtual machines simultaneously. VMware Workstation is not an open source or free software so we need to buy its license key, though we can use its trail version for 30 days then later you can apply its license key. Continue reading “How To Install VMware Workstation on Ubuntu 16.04 LTS”

How to use Linux and Unix TAR Command

Linux and Unix TAR Command

The tar command used to rip a collection of files and directories into highly compressed archive file commonly called tarball or tar, gzip and bzip in Linux. The tar is most widely used command to create compressed archive files and that can be moved easily from one disk to anther disk or machine to machine. The main purpose of this article is to provide various tar command examples that might be helpful you to understand and become expert in tar archive manipulation. In this tutorial we will learn how to use Linux and UNIX TAR command.

Linux and Unix TAR Command

Create tar Archive File

Example command create a tar archive file wpcademy.tar for a directory /home/wpcademy in current working directory.

#tar -cvf wpcademy.tar /home/wpcademy/

/home/wpcademy/
/home/wpcademy/install.sh
/home/wpcademy/openvpn-2.0.9-1.tar.gz

Create tar.gz Archive File

Example command create a compressed gzip archive file wpcademy.tar for a directory /home/wpcademy in current working directory.

#tar cvzf Mythemes.tar.gz /home/wpcademy

/home/wpcademy/
/home/wpcademy/kardun
/home/wpcademy/eleganthemes
/home/wpcademy/adsready

Untar a tar File or gzip-bz2 tar File

#tar xvzf wpcademy.gz - for uncompress a gzip tar file (.tgz or .tar.gz)
#tar xvjf wpcademy.tar.bz2 - for uncompress a bzip2 tar file (.tbz or .tar.bz2)
#tar xvf wpcademy.tar - for uncompressed tar file (.tar)

Tar Command Options

c – create a archive file.
x – extract a archive file.
v – show the progress of archive file.
f – filename of archive file.
t – viewing content of archive file.
j – filter archive through bzip2.
z – filter archive through gzip.
r – append or update files or directories to existing archive file.
W – Verify a archive file.

How To Install and Configure Squid 3 on Ubuntu

Install and Configure Squid 3 on Ubuntu

Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. Squid proxy is used by various organisation and internet providers to reduce bandwidth and to increase response time. In this tutorial we will show you how to install and configuration of Squid on your Ubuntu server.

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you through the step by step installation Squid on Ubuntu server.

Install and Configure Squid 3 on Ubuntu

Step 1. To install, first you must update yum repository and packages by typing the below command:

 apt-get -y update

Step 2. Installing Squid proxy server.

Install squid package and dependencies using the below command:

 apt-get -y install squid3

Step 3. Edit squid configuration file ‘/etc/squid/squid.conf’

 nano /etc/squid3/squid.conf
# Recommended minimum configuration:
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid3/squid_passwd
acl ncsa_users proxy_auth REQUIRED
http_access allow ncsa_users

acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl SSL_ports port 443
acl Safe_ports port 80            # http
acl Safe_ports port 21            # ftp
acl Safe_ports port 443           # https
acl Safe_ports port 1025-65535    # unregistered ports
acl Safe_ports port 280           # http-mgmt
acl Safe_ports port 488           # gss-http
acl Safe_ports port 591           # filemaker
acl Safe_ports port 777           # multiling http
acl SSL_ports port 9001           # webmin
acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all
http_port 3128

#Setting up multiple outgoing IP addresses
#acl godet myip 192.168.1.100
#tcp_outgoing_address 192.168.1.100 godet
#acl jaran myip 192.168.1.101
#tcp_outgoing_address 192.168.1.101 jaran

hierarchy_stoplist cgi-bin ?
coredump_dir /var/spool/squid3
cache deny all

refresh_pattern ^ftp:        1440    20%    10080
refresh_pattern ^gopher:    1440    0%    1440
refresh_pattern -i (/cgi-bin/|\?) 0    0%    0
refresh_pattern .        0    20%    4320

icp_port 3130

forwarded_for off

request_header_access Allow allow all
request_header_access Authorization allow all
request_header_access Proxy-Authorization allow all
request_header_access Proxy-Authenticate allow all
request_header_access Cache-Control allow all
request_header_access Content-Encoding allow all
request_header_access Content-Length allow all
request_header_access Content-Type allow all
request_header_access Date allow all
request_header_access Expires allow all
request_header_access Host allow all
request_header_access If-Modified-Since allow all
request_header_access Last-Modified allow all
request_header_access Location allow all
request_header_access Pragma allow all
request_header_access Accept allow all
request_header_access Accept-Charset allow all
request_header_access Accept-Encoding allow all
request_header_access Accept-Language allow all
request_header_access Content-Language allow all
request_header_access Mime-Version allow all
request_header_access Retry-After allow all
request_header_access Title allow all
request_header_access Connection allow all
request_header_access Proxy-Connection allow all
request_header_access User-Agent allow all
request_header_access Cookie allow all
request_header_access All deny all
visible_hostname wpcademy.com

Step 4. Create our authentication file which Squid can use to verify for user authentications:

 #htpasswd -b /etc/squid3/squid_passwd username password

Example:

 htpasswd -b -c /etc/squid3/squid_passwd ranty ratna

Step 5. After making changes to the config file, save the file and restart the squid server service to effect the changes using the following command entered at a terminal prompt:

 service squid3 restart

If you experience any problems, you can check the access.log for more information:

 sudo tail -f /var/log/squid3/access.log

So you have successfully installed Squid . Thanks for using this tutorial for installing Squid caching proxy in Ubuntu system. For additional help or useful information, we recommend you to check the official Squid web site.