Total Pageviews

Thursday, 4 October 2018

LookingGlass

A user-friendly PHP Looking Glass.

Overview

LookingGlass is a user-friendly PHP-based looking glass that allows the public (via a web interface) to execute network commands on behalf of your server.
Current version: v1.3.0
It's recommended that everyone updates their existing install!

Features

  • Automated install via bash script
  • IPv4 & IPv6 support
  • Live output via long polling
  • Multiple themes
  • Rate limiting of network commands

Implemented commands

  • host
  • mtr
  • mtr6 (IPv6)
  • ping
  • ping6 (IPv6)
  • traceroute
  • traceroute6 (IPv6)
IPv6 commands will only work if your server has external IPv6 setup (or tunneled)

Requirements

  • PHP >= 5.3
  • PHP PDO with SQLite driver (required for rate-limit)
  • SSH/Terminal access (able to install commands/functions if non-existent)

Install

  1. Download LookingGlass to the intended folder within your web directory
  2. Extract archive:
    • Option #1 - Extract archive to the current directory:
      • tar -zxvf LookingGlass-1.3.0.tar.gz --strip-components 1
    • Option #2 - Extract archive to a directory named LookingGlass:
      • tar -zxvf LookingGlass-1.3.0.tar.gz --transform 's!^[^/]\+\($\|/\)!LookingGlass\1!'
  3. Navigate to the LookingGlass subdirectory in terminal
  4. Run bash configure.sh
  5. Follow the instructions and configure.sh will take care of the rest
Forgot a setting? Simply run the configure.sh script again

Updating

  1. Download LookingGlass to the folder containing your existing install
  2. Extract archive: tar -zxvf LookingGlass-1.3.0.tar.gz --overwrite --strip-components 1
    • This will overwrite/update existing files
  3. Navigate to the LookingGlass subdirectory in terminal
  4. Run bash configure.sh
  5. Follow the instructions and configure.sh will take care of the rest
    • Note: Re-enter test files to create random test files from GNU shred
Forgot a setting? Simply run the configure.sh script again

Apache

An .htaccess is included which protects the rate-limit database, disables indexes, and disables gzip on test files. Ensure AllowOverride is on for .htaccess to take effect.
Output buffering should work by default.
For an HTTPS setup, please visit:

Nginx

To enable output buffering, and disable gzip on test files please refer to the provided configuration:
The provided config is setup for LookingGlass to be on a subdomain/domain root.
For an HTTPS setup please visit:
from https://github.com/telephone/LookingGlass
------
 

17MON LookingGlass

LookingGlass 在维基百科上的解释为“Looking Glass servers are computers on the Internet running one of a variety of publicly available Looking Glass software implementations. A Looking Glass server (or lg server) is accessed remotely for the purpose of viewing routing information. Essentially, the server acts as a limited, read-only portal to routers of whatever organization is running the lg server. Typically, publicly accessible looking glass servers are run by Internet service providers (ISPs) or Internet Exchange Points (IXPs).” - http://en.wikipedia.org/wiki/Looking_Glass_servers

这样的服务,对于网络运维人员和相关的技术人员相当有用,在国外,大到跨国运营商,小至做云主机或者提供 VPS 服务的公司,大体都会有此类服务,用于让你更好更方便的了解网络情况,有助于选择和排障。

但是,在国内,几乎没有看到有架设此类服务的,无论公司规模与否。

我们做不了路由器级别的 Looking Glass,但是做服务器方式的 Looking Glass,总是可以的吧?

我看过国外的几个开源实现,我觉得还有改进余地,比如结果的逐行输出,比如 traceroute 的格式化输出,这个在我们做 17MON 的经历中,感觉还是非常有用的。

所以我们也希望基于 17MON 的经验和积累,做一个 Looking Glass 服务出来,希望大家可以更好的来使用这个服务。

如果您有架设 Looking Glass 服务,并且愿意公开的话,请告知我们,我们会加入到列表中。请联系 QQ 群:346280296。

有几点说明:

1、要求 PHP 5.4+。具体配置方式,请见 config.php,另外请做好该服务器的相关安全加固工作,还有规划好带宽情况。

2、这里面包含的 IP 库基于 17MON 的公开免费版,限制请见网站。您需要定期自行更新,目前是每双月初更新。

3、结果的逐行输出,需要 webserver 支持,建议使用 Nginx 1.5.6 版本以上,即可支持逐行输出,设置例子请见 nginx.conf。

from https://github.com/17mon/LookingGlass 

---------------------------------------------------------

请大佬们不要随便对待site url,如果您的LookingGlass直接通过域名访问,请在site url里面填写http://xxx.com (最后不要加"/") 或者https://xxx.com (最后不要加"/"),如果LookingGlass放置在域名目录下的某个文件夹,请在site url里面填写http://xxx.com/xxx (最后不要加"/") 或者https://xxx.com/xxx (最后不要加"/")

LookingGlass

程序说明与搭建教程:https://www.sabia.cc/looking-glass-ip-location.html

Demo

https://lg.test.testip.xyz

Fork后的修改

1、修改IPv4下的路由追踪,结果将包含由IPIP提供的IP地理信息数据
2、修改configure.sh文件测试文件生成方式,改由DD命令生成测试文件
3、汉化index.php文件,并适度修改底部作者信息
4、添加英文页面,调整路由追踪结果语言
5、修改IPv6下的路由追踪,结果将包含由IPIP提供的IP地理信息数据

Overview

LookingGlass is a user-friendly PHP based looking glass that allows the public (via a web interface) to execute network commands on behalf of your server.

Current version: v1.3.0

It's recommended that everyone updates their existing install!

Features

  • Automated install via bash script
  • IPv4 & IPv6 support
  • Live output via long polling
  • Multiple themes
  • Rate limiting of network commands

Implemented commands

  • host
  • mtr
  • mtr6 (IPv6)
  • ping
  • ping6 (IPv6)
  • traceroute
  • traceroute6 (IPv6)

IPv6 commands will only work if your server has external IPv6 setup (or tunneled)

Requirements

  • PHP >= 5.3
  • PHP PDO with SQLite driver (required for rate-limit)
  • SSH/Terminal access (able to install commands/functions if non-existent)

Install

  1. Download LookingGlass to the intended folder within your web directory
  2. Extract archive:
    • Extract archive to the current directory:
      • unzip master.zip
  3. Navigate to the LookingGlass subdirectory in terminal
  4. Run bash configure.sh
  5. Follow the instructions and configure.sh will take care of the rest

Forgot a setting? Simply run the configure.sh script again

Updating

  1. Download LookingGlass to the folder containing your existing install
  2. Extract archive: tar -zxvf LookingGlass-1.3.0.tar.gz --overwrite --strip-components 1
    • This will overwrite/update existing files
  3. Navigate to the LookingGlass subdirectory in terminal
  4. Run bash configure.sh
  5. Follow the instructions and configure.sh will take care of the rest
    • Note: Re-enter test files to create random test files from GNU shred

Forgot a setting? Simply run the configure.sh script again

Apache

An .htaccess is included which protects the rate-limit database, disables indexes, and disables gzip on test files. Ensure AllowOverride is on for .htaccess to take effect.

Output buffering should work by default.

For an HTTPS setup, please visit:

Nginx

To enable output buffering, and disable gzip on test files please refer to the provided configuration:

HTTP setup

The provided config is setup for LookingGlass to be on a subdomain/domain root.

For an HTTPS setup please visit:

from  https://github.com/ILLKX/LookingGlass?tab=readme-ov-file



 

 

No comments:

Post a Comment