{"id":18841939,"url":"https://github.com/ahmetozer/net-tools-service","last_synced_at":"2025-04-14T07:31:20.807Z","repository":{"id":57583579,"uuid":"253626764","full_name":"ahmetozer/net-tools-service","owner":"ahmetozer","description":"Serve Linux Net Tools as a Micro Service","archived":false,"fork":false,"pushed_at":"2021-09-04T23:29:51.000Z","size":88,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T21:12:35.598Z","etag":null,"topics":["container","containers","docker","linux","linux-network","microservice","network","nslookup","ping","tcp-latency","traceroute","tracert","whois","whois-lookup"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahmetozer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-06T22:08:17.000Z","updated_at":"2023-03-23T21:35:21.000Z","dependencies_parsed_at":"2022-09-10T12:00:49.462Z","dependency_job_id":null,"html_url":"https://github.com/ahmetozer/net-tools-service","commit_stats":null,"previous_names":["ahmetozer/looking-glass-service","ahmetozer/looking-glass-controller"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetozer%2Fnet-tools-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetozer%2Fnet-tools-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetozer%2Fnet-tools-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetozer%2Fnet-tools-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmetozer","download_url":"https://codeload.github.com/ahmetozer/net-tools-service/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248839359,"owners_count":21169798,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["container","containers","docker","linux","linux-network","microservice","network","nslookup","ping","tcp-latency","traceroute","tracert","whois","whois-lookup"],"created_at":"2024-11-08T02:53:07.614Z","updated_at":"2025-04-14T07:31:20.485Z","avatar_url":"https://github.com/ahmetozer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Net Tools Service\n\nThis software is backend service for [Looking Glass](https://github.com/ahmetozer/looking-glass) and [LatencyTable](https://github.com/ahmetozer/latencytable).\n\nOur Net Tools Service is a small Golang based tool to serve ping, traceroute, nslookup, mtr, curl and whois tools.\n\nIt is designed to run basic net tools securely in containers.\n\n## Features\n\n- Automatic Self Certificate Generation\n- Limit incoming requests (Rate Limit)\n- Execute some network tools (nslookup, ping, tracert, whois, curl, mtr, svinfo)\n- Live command output\n- Gracefully Shutdown\n\n## Installation\n\nYou can easily to deploy Net Tools Service to your server with Docker.\n\n```sh\ndocker run -it -p 443:443 ghcr.io/ahmetozer/net-tools-service:latest\n```\n\n## Configuration\n\nThere is a few options to configure your software\n\n### Environment variables\n\n- **functions**  \nTo allow only few functions.\nBy default, if you don't give any function, all function is enabled.  \nE.g.  `docker run -it -e functions=\"ping,whois\"  ghcr.io/ahmetozer/net-tools-service:latest`\n\n- **referrers**  \nTo allow only given referrers (Which website make request to this service).\nBy default, if you don't give any domain, all domains is accepted.  \nE.g.  `docker run -it -e referrers=\"lg.ahmetozer.org\"  ghcr.io/ahmetozer/net-tools-service:latest`  \n`docker run -it -e referrers=\"lg.ahmetozer.org,noc.ahmetozer.org\"  ghcr.io/ahmetozer/net-tools-service:latest`\n\n- **hostname**  \nTo bind listen port to only one domain.\nBy default, all domains are accepted.  \nE.g.  `docker run -it -e hostname=\"marmaris1-nts.ahmetozer.org\"  ghcr.io/ahmetozer/net-tools-service:latest`  \nIf you give a empty variable, system uses containers hostname to bind domain.  \nE.g.  `docker run -it -e hostname=\"\"  ghcr.io/ahmetozer/net-tools-service:latest`  \n\n- **ipver**  \nTo allow IP version on this system.\nIf it's empty, IPv4 and IPv6 are enabled. You can also enable IPv4 and IPv6 with DS or give IPv4 and IPv6 in env variable. If you define only IPv4 or IPv6, just defined IP version is enabled.  \nE.g.  `docker run -it -e functions=\"ping,whois\" -e ipver=\"IPv4\" ghcr.io/ahmetozer/net-tools-service:latest`  \nTo disable IPv6 and IPv4 at same time (it means disable server), define ipver to \"disabled\"  \nE.g.  `docker run -it -e functions=\"ping,whois\" -e ipver=\"disabled\" ghcr.io/ahmetozer/net-tools-service:latest`\n\n- **rate**  \nTo change request limit in one second.  \nDefault is one request in one second.\nIf you require more request in one second (E.g. [latencytable](https://github.com/ahmetozer/latencytable) require)  \nE.g.  `docker run -it -e rate=\"10\" -e ipver=\"\" ghcr.io/ahmetozer/net-tools-service:latest`\n\n- **cache**  \ntcp and icmp functions is cache module and cache is setted to 10second by default.  \nE.g.  `docker run -it -e rate=\"10\" -e cache=\"10s\" ghcr.io/ahmetozer/net-tools-service:latest`\n\n- **listenaddr**  \nYou can manage listen port and listen ip address with this argument.  \nMostly not used.  \nE.g.  `docker run -it -e listenaddr=\"198.51.100.5:443\" ghcr.io/ahmetozer/net-tools-service:latest`  \nE.g.  `docker run -it -e listenaddr=\":8443\" ghcr.io/ahmetozer/net-tools-service:latest`\n\n### Custom SSL Certificate\n\n- You can use also own SSL certificate to serve HTTPS server with verified certificate. To use own certificate mount your certificates to /cert/ folder in container.  \n E.g.  \n\n ```bash\ndocker run -it -p 443:443 \\\n--mount type=bind,source=\"/etc/letsencrypt/live/example.com/fullchain.pem\",target=/cert/cert.pem,readonly \\\n --mount type=bind,source=\"/etc/letsencrypt/live/example.com/privkey.pem\",target=/cert/key.pem,readonly \\\n ghcr.io/ahmetozer/net-tools-service:latest\n```\n\n### Serving to Global\n\nIf you have a extra IPv4 or IPv6, you can bind ips to container and server directly.  \nIf you don't have a extra IP, You can use nginx to serve multiple domains in one domain.  \nAnother way is bind container`s port to your server port. You can use any un used port to expose net tools service.\n\n## Some Information's About this Software\n\n- This program is only available for linux.\n\n- Program is only executable in www-data user. (Prevent any security issue)\n\n- If you use outside of container you have to install \"ping\", \"traceroute\", \"whois\", \"nslookup\", \"mtr\", \"curl\" into to your server.\n\n- You can get your server IP address with svinfo function.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmetozer%2Fnet-tools-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmetozer%2Fnet-tools-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmetozer%2Fnet-tools-service/lists"}