What is Looking Glass on the web and how to install it on your VPS or server

Looking Glass is an open source open source network script for testing server, Ping, Traceroute, MTR, VPS speed and latency, or server and network.

In this blog, we will show you the steps to install Looking Glass on your server and test your network.

Features of Looking Glass

* Automatic installation via bash script

• Supports IPv4 and IPv6

• Live output via long poll

• Several topics

* Rate limiting network commands

Used SSH commands

• host

• mtr

• mtr6 (IPv6)

• ping

• ping6 (IPv6)

• traceroute

• traceroute6 (IPv6)

Note IPv6 commands will only work if your server has external IPv6 configuration (or is tunneled).

System requirement

* PHP> = 5.3

• PHP PDO with SQLite driver (required for rate limiting)

* SSH / terminal access (ability to install commands / functions if they are missing)

Step 1: buy a KVM VPS

Step 2: connect your VPS via SSH and run the commands

Log in to your inexpensive VPS or server over SSH with root user after running the following commands, we are using CentOS 7 64bit VPS for this blog post:

First of all, we will be updating all existing repo and installed applications on the server after installing the lamp (Linux, Apache, MySQL, PHP) which is required by the Looking Glass script.

First, we will remove the old packages and get or update them to the latest version using yum on on CentOS:

                      yum update-y

We will now install the Apache server using the yum package:

                      yum install httpd-y

After we activate the Apache server:

                      systemctl start httpd.service

Now we will install the MariaDB database, which is a very popular MySQL fork that is free and open source:

                      yum install mariadb-сервер mariadb-y

After we start the MariaDB service:

                      systemctl start mariadb

After we secure MariaDB:


We will now install yum-utils and enable the EPEL (Extra Packages for Enterprise Linux) repository:

                      yum install epel-release yum-utils

After we download and install remirepo:

                      yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm

After we enable it:

                      yum-config-manager –enable remi-php73

We will now install PHP:

                      yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysqlnd

We will now restart the Apache server to see if it works with the newly installed PHP or not:

                      systemctl restart httpd.service

We will now install Nano Editor to edit and save files using the command line:

                      yum install nano

We will now test PHP, and for that we need to create a phpinfo.php file and add it to the default PHP directory (/ var / www / html). (You can skip this step if you like, there is no need to test it)

                      nano /var/www/html/phpinfo.php

After pasting this code inside the file and saving it: (Control-O to save the file and Control-X to log out to the MAC):

                      <?php phpinfo(); ?>

We will now install GNU / Wget, which is a free open source software package for receiving files using the Internet protocols HTTP, HTTPS, and FTP.

                      yum install wget

We will now download Looking Glass:

                      wget https://github.com/telephone/LookingGlass/archive/v1.3.0.tar.gz

After we extract it:

                      tar -zxvf v1.3.0.tar.gz –strip-components 1

We will now move on to the LookingGlass subdirectory:

                      cd LookingGlass

We will now run it:

                      bash configure.sh

After you are presented with the following and asked questions, enter y (yes) to continue:



# LookingGlass is a user-friendly script

# to create a functional Looking Glass

# for your network.


# Created by Nick Adams (telephone)

# https://iamtelephone.com



Do you wish to install LookingGlass? (y / n): y

After everything is set up, it will ask you to enter the name of the website.

After you are prompted to enter the url where you want to execute and test all networks, we entered the demo domain name “https://googlesyndication.com”, you can enter your domain or subdomain, ie lg. yourdomain.com:

                      Enter the public URL to this LG (including https://) []: https://googlesyndication.com

After you are prompted to enter the server location.

Here you will need to enter the IPv4 address of your VPS or server:

                      Enter the test IPv4 address []:

Here you will need to enter the IPv6 address of your VPS or server if supported, or simply enter it:

                      Enter the test IPv6 address (Re-enter every time this script is run) []: 2001:xxxx:xxxx:xxxx::xxxx:xxx

Here it will ask you to enter the size of the test file to create, I entered 25 MB, 50 MB and 100 MB, you can enter any other i.e. 10 MB, 100 MB, 1000 MB if you like:

                      Enter the size of test files in MB (Example: 25MB 50MB 100MB) []: 25MB 50MB 100MB

Here it will ask you if you want to set the network speed limit which PHP PDO will use with the SQLite driver, we said “n“ no, if you want to set the limit you can say “y” yes and follow the instructions:

Do you wish to enable rate limiting of network commands? (y / n): n

Removing old test files:

Creating new test files:

Creating 10MB test file

Creating 100MB test file

Creating 1000MB test file

Here you will be asked to choose a theme, we entered “n” to use the default theme, you can enter “y” and you can see 4 themes to solve:

                      Would you like to choose a different theme? (y/n): n

After you are prompted to enter your web server user, we entered “looking-glass”, you can enter any other if you want:

Creating Config.php …

Creating SQLite database …

Enter the username of your webserver (Eg www-data): looking-glass

After you are prompted to enter the user group of your web server, we entered “looking-glass”, you can enter any other if you want:

                      Enter the user group of your webserver (E.g. www-data): looking-glass

After that, it will take a few moments to complete the setup:

Fixing MTR permissions …

Installation is complete

Once it is complete, you can open your server’s IP or domain name from your web browser to check it.

Related Posts