garfieldwtf/network-testing-tool

By garfieldwtf

•Updated 4 days ago

Web-based network toolbox: Ping, port scan, DNS, WHOIS & more in your browser.

Image
Networking
Security
Monitoring & observability
0

4.5K

garfieldwtf/network-testing-tool repository overview

⁠Network Testing Tool šŸš€

Docker Pulls Docker Stars

Web-based network toolbox: Ping, port scan, DNS, WHOIS, traceroute & more from your browser. Just run the container and start testing!

šŸ”— Docker Hub: garfieldwtf/network-testing-tool⁠


ā šŸ“‹ Table of Contents


ā šŸš€ Quick Start

⁠One-Line Command
docker run -d --name nettool --network host --cap-add=NET_ADMIN --cap-add=NET_RAW --restart unless-stopped garfieldwtf/network-testing-tool:latest

Then open http://localhost:5000⁠ in your browser.

⁠Docker Compose
version: '3.8'
services:
  nettool:
    image: garfieldwtf/network-testing-tool:latest
    container_name: nettool
    network_mode: "host"
    cap_add:
      - NET_ADMIN
      - NET_RAW
    restart: unless-stopped
⁠Without Host Network (Windows/Mac)
docker run -d --name nettool -p 5000:5000 --cap-add=NET_ADMIN --cap-add=NET_RAW garfieldwtf/network-testing-tool:latest

⁠✨ Features

ā šŸ“” Basic Tools
ToolDescription
PingTest connectivity with customizable packet count
TracerouteTrace the route packets take to a host
MTRCombine ping + traceroute for detailed analysis
ARP ScanDiscover devices on your local network
ā šŸ”Œ Port Scanner
ToolDescription
Basic TCP ScanScan port ranges with service detection
Advanced TCP/UDPScan specific ports with banner grabbing
Preset Port ListsCommon, web, database ports
Thread ControlAdjust scan speed vs. accuracy
⁠🌐 DNS Tools
ToolDescription
DNS LookupGet IPv4 and IPv6 addresses
Reverse DNSFind hostname from IP address
DNS RecordsQuery MX, NS, TXT, SOA records
ā šŸ”’ HTTP/SSL Tools
ToolDescription
HTTP HeadersFetch and analyze response headers
SSL CertificateView certificate details and expiry
HTTP StatusCheck response codes and times
ā šŸ–§ Network Information
ToolDescription
Network InterfacesDisplay all interfaces and IPs
NetstatView active network connections
Bandwidth TestTest download speed
Public IPGet IPv4/IPv6 with geolocation
ā šŸ” WHOIS & Lookup
ToolDescription
WHOIS LookupDomain registration information
GeoIPGeographic location of IP addresses
IP CalculatorSubnet calculations and network ranges

ā šŸ“– Usage Examples

⁠Web Interface

Once running, open your browser to http://localhost:5000⁠ and use the 6 tabs:

  1. Basic Tools - Ping, traceroute, MTR, ARP scan
  2. Port Scanner - TCP/UDP port scanning
  3. DNS Tools - DNS lookups and records
  4. HTTP/SSL - Web and certificate testing
  5. Network Info - Interface info and speed tests
  6. WHOIS & Lookup - Domain and IP information
⁠API Examples
# Ping a host
curl -X POST http://localhost:5000/ping \
  -H "Content-Type: application/json" \
  -d '{"host":"google.com","count":4}'

# Traceroute
curl -X POST http://localhost:5000/traceroute \
  -H "Content-Type: application/json" \
  -d '{"host":"google.com"}'

# Port scan (range)
curl -X POST http://localhost:5000/portscan \
  -H "Content-Type: application/json" \
  -d '{"host":"192.168.1.1","start_port":1,"end_port":100}'

# Advanced scan (specific ports)
curl -X POST http://localhost:5000/advanced_scan \
  -H "Content-Type: application/json" \
  -d '{"host":"example.com","ports":[80,443,8080],"protocol":"tcp"}'

# DNS lookup
curl -X POST http://localhost:5000/dns_lookup \
  -H "Content-Type: application/json" \
  -d '{"host":"google.com"}'

# HTTP headers
curl -X POST http://localhost:5000/http_headers \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}'

# SSL certificate check
curl -X POST http://localhost:5000/ssl_check \
  -H "Content-Type: application/json" \
  -d '{"host":"google.com","port":443}'

# WHOIS lookup
curl -X POST http://localhost:5000/whois_lookup \
  -H "Content-Type: application/json" \
  -d '{"domain":"example.com"}'

# GeoIP lookup
curl -X POST http://localhost:5000/geoip \
  -H "Content-Type: application/json" \
  -d '{"ip":"8.8.8.8"}'
⁠Python Examples
import requests
import json

url = "http://localhost:5000"

# Ping
response = requests.post(f"{url}/ping", 
                        json={"host": "google.com", "count": 4})
print(response.json())

# Port scan
response = requests.post(f"{url}/portscan",
                        json={"host": "192.168.1.1", 
                              "start_port": 1, 
                              "end_port": 1000})
print(response.json())

# DNS lookup
response = requests.post(f"{url}/dns_lookup",
                        json={"host": "google.com"})
print(f"IPv4: {response.json()['ipv4']}")
print(f"IPv6: {response.json()['ipv6']}")

ā āš™ļø Requirements

  • Docker: 20.10 or higher
  • Linux host (recommended): For full functionality (ARP scan, host network mode)
  • Windows/Mac: Limited functionality (no ARP scan, no host network)
⁠Required Capabilities
CapabilityPurpose
NET_ADMINNetwork interface configuration
NET_RAWRaw socket access (ping, traceroute)
⁠Platform Support Matrix
FeatureLinuxmacOSWindows
Pingāœ… Fullāœ… Limitedāœ… Limited
Tracerouteāœ… Fullāœ… Limitedāœ… Limited
ARP Scanāœ… FullāŒ NoāŒ No
Port Scanāœ… Fullāœ… Fullāœ… Full
Host Networkāœ… YesāŒ NoāŒ No
UDP Scanāœ… Yesāœ… Yesāœ… Yes

ā šŸ› Troubleshooting

⁠Common Issues
IssueSolution
ARP scan failsUse host network: --network host --cap-add=NET_ADMIN
Cannot connect to web UICheck if port 5000 is mapped: docker ps | grep nettool
Permission denied errorsAdd capabilities: --cap-add=NET_ADMIN --cap-add=NET_RAW
Port scan shows no resultsCheck firewall on target; try common ports first
Container won't startCheck logs: docker logs nettool
Slow UDP scansUDP is inherently slower; reduce timeout or port count
Public IP not showing IPv6Your network may not have IPv6 connectivity
⁠Useful Commands
# View logs
docker logs -f nettool

# Enter container
docker exec -it nettool /bin/bash

# Check container status
docker ps -a | grep nettool

# Restart container
docker restart nettool

# Stop container
docker stop nettool

# Remove container
docker rm nettool

# Update to latest version
docker pull garfieldwtf/network-testing-tool:latest
docker stop nettool
docker rm nettool
# Then run again with your preferred options
⁠Testing Container Functionality
# Test if container is working
curl http://localhost:5000

# Test Python packages
docker exec nettool python -c "import flask; print('Flask OK')"
docker exec nettool python -c "import netifaces; print('netifaces OK')"

# Test network tools
docker exec nettool ping -c 1 8.8.8.8
docker exec nettool traceroute -m 2 8.8.8.8

ā ā“ FAQ

⁠Q: Do I need to install anything on my host?

A: No, everything runs inside the Docker container.

⁠Q: Why use host network mode?

A: Host network mode gives the container full access to your network interfaces, enabling ARP scanning and better network performance.

⁠Q: Can I run this on Windows/Mac?

A: Yes, but with limitations. ARP scanning and host network mode won't work. Use port mapping instead: -p 5000:5000

⁠Q: How do I scan my local network?

A: Use ARP scan in the Basic Tools tab, or use port scanner with your local IP range (e.g., 192.168.1.0/24).

⁠Q: Is this tool safe to use?

A: Yes, but only run it in trusted networks. Don't expose it to the public internet.

⁠Q: What's the difference between basic and advanced port scan?

A: Basic scan uses port ranges; advanced scan lets you specify exact ports and supports UDP.

⁠Q: Why are UDP scans so slow?

A: UDP is connectionless and requires timeouts to determine if a port is open.

⁠Q: Can I save scan results?

A: Currently, results are displayed in the web UI. You can copy/paste them manually.

⁠Q: How do I update the container?

A: docker pull garfieldwtf/network-testing-tool:latest then recreate the container.

⁠Q: What's the default username/password?

A: No authentication - it's designed for local network use only.

⁠Q: Can I access it remotely?

A: Yes, use http://YOUR_SERVER_IP:5000, but ensure your firewall is configured properly.


ā šŸ”§ Advanced Configuration

⁠Custom Port
docker run -d --name nettool -p 8080:5000 --cap-add=NET_ADMIN --cap-add=NET_RAW garfieldwtf/network-testing-tool:latest

Access at: http://localhost:8080⁠

⁠Persistent Logs
docker run -d --name nettool --network host --cap-add=NET_ADMIN --cap-add=NET_RAW -v $(pwd)/logs:/app/logs garfieldwtf/network-testing-tool:latest
⁠Resource Limits
docker run -d --name nettool --network host --cap-add=NET_ADMIN --cap-add=NET_RAW --memory="512m" --cpus="0.5" garfieldwtf/network-testing-tool:latest
⁠With Specific Network Interface
docker run -d --name nettool --network host --cap-add=NET_ADMIN --cap-add=NET_RAW -e INTERFACE=eth0 garfieldwtf/network-testing-tool:latest

ā šŸ“Š Performance Tips

OperationRecommended Settings
Quick pingCount: 4, Timeout: 2s
Network discoveryARP scan or ping sweep
Fast port scanThreads: 100, Ports: common only
Thorough scanThreads: 50, Full range, longer timeout
UDP scanPorts: < 100, Timeout: 3000ms
Bandwidth testSize: 10MB for quick test

ā šŸ”’ Security Notes

  • Run in trusted networks only - No authentication built-in
  • Don't expose to internet - Use VPN if remote access needed
  • Regular updates - Pull latest image for fixes
  • Monitor logs - Check for unusual activity
  • Use least privileges - Only grant necessary capabilities

ā šŸ“ Changelog

⁠Version latest
  • Initial release
  • 6 fully functional tabs
  • TCP/UDP port scanning
  • Dual-stack IPv4/IPv6 support
  • ARP scanning capability
  • WHOIS with multiple fallbacks
  • REST API endpoints
  • Banner grabbing for TCP ports
  • Geolocation for IP addresses

ā šŸ“ž Support


ā šŸ¤ Contributing

Since there's no GitHub repository, you can:

  1. Share improvements in Docker Hub comments
  2. Report issues via Docker Hub
  3. Suggest features in comments

ā šŸ“œ License

MIT License - Use freely for personal and commercial purposes.

Copyright (c) 2024 garfieldwtf

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


ā šŸ™ Acknowledgments


Made with ā¤ļø for network professionals everywhere

Tag summary

Content type

Image

Digest

sha256:f12f7285e…

Size

42.7 MB

Last updated

4 days ago

docker pull garfieldwtf/network-testing-tool