Modern, simple and fresh looking glass based on Bootstrap 5 and PHP 8.
Find a file
Marc 33f675f5fb
Move root out of location context
We are also loading images, (like favicon.ico), these will also redirect to index.php.
Side effect, this causes the CSRF to be regenerated in the session.
2022-07-29 13:59:52 +02:00
docker Move root out of location context 2022-07-29 13:59:52 +02:00
.gitignore Looking Glass fully Dockerized. Not compatible with Alpine because the command 'ps' is different in BusyBox, so we use a Debian image. 2022-04-14 12:19:52 +02:00
backend.php Added backend validation 2022-01-17 13:12:35 +01:00
CHANGELOG.md Update CHANGELOG.md 2022-04-19 09:37:58 +02:00
config.dist.php Initial commit 2022-01-15 19:40:44 +01:00
docker-compose.yml Looking Glass fully Dockerized. Not compatible with Alpine because the command 'ps' is different in BusyBox, so we use a Debian image. 2022-04-14 12:19:52 +02:00
index.php Switch to Stars 2022-04-19 14:14:16 +02:00
LICENSE.md Initial commit 2022-01-15 19:40:44 +01:00
LookingGlass.php Fix: Resolve AAAA record from hostname 2022-04-18 13:32:43 +00:00
README.md Added Contribute 2022-01-17 13:15:11 +01:00
screenshot.png Initial commit 2022-01-15 19:40:44 +01:00

Looking Glass

Modern, simple and fresh looking glass based on Bootstrap 5 and PHP 7. A looking glass is a network utility which is made user-friendly for everyone to use. It allows you to execute network related commands within a remote network, usually that of an ISP.

Demo

See it in action here!

Features

  • Bootstrap 5 UI.
  • Real time command output using JavaScript.
  • Supports ping/ping6, traceroute/traceroute6 and mtr/mtr6.
  • Easy to customize and to configure.
  • DNS checking to prevent unnecessary executions.

Requirements

  • Any Linux distribution, this has been tested on RHEL.
  • PHP 7.1 or higher.
  • IPv6 connectivity if you want to use the v6 equivalents.
  • Root access.

Installation

For this installation we will assume that we are working on AlmaLinux 8 OS. Warning: This guide does not cover any security hardening or rate limiting.

  1. Install the required network tools: dnf install mtr traceroute -y.
  2. Install the web server with PHP (by default it will install 7.2): dnf install httpd mod_ssl php -y.
  3. Enable and start Apache/PHP-FPM: systemctl enable httpd; systemctl enable php-fpm and systemctl start httpd; systemctl start php-fpm.
  4. Let's help MTR to work, execute the following command: ln -s /usr/sbin/mtr /usr/bin/mtr and also mtr helper called mtr-packet: ln -s /usr/sbin/mtr-packet /usr/bin/mtr-packet.
  5. You must configure SELinux before this all works, or you can disable SELinux using setenforce 0 and possibly make it permanent: nano /etc/selinux/config change to SELINUX=disabled.
  6. Upload the contents of the ZIP to /var/www/html/.
  7. Rename config.dist.php to config.php and adjust the settings.
  8. (Optional) You might want to enable SSL using LetsEncrypt, take a look at acme.sh.

Customization

If you open up config.dist.php you will see that there are some features that allows you to customize the looking glass, this includes a custom CSS override. You may also extend the looking glass with a custom block.

TODO

  • Move to Composer;
  • Software-based rate limiting;
  • Implement a template engine, for advanced customization;
  • Switch to WebSockets.

Contribute

We would love to receive code contributions in the form of a pull request. We prefer this over forking, so if you have any code improvements feel free to commit.

Credits

This project is inspired by the LookingGlass project of @telephone and uses his procExecute() function, although slightly modified.

License

Mozilla Public License Version 2.0