یک ابزار حرفهای برای تست امنیت سایبری سایتها در شرایط شبکههای قدیمی و محدود
Network security testing tool for analyzing website responses to legacy network conditions, IPv6 blocking, bandwidth throttling, and VPN configurations.
NetGuard is a comprehensive network security testing suite designed to:
- Block IPv6 traffic and analyze IPv4-only behavior
- Throttle bandwidth to 10 KB/s or custom rates
- Simulate VPN connectivity via WireGuard over IPv4-only tunnels
- Generate detailed security reports with optimization recommendations
- Test websites under realistic degraded network conditions
Perfect for:
- Cybersecurity teams testing website resilience
- Legacy network environment compatibility testing
- Performance analysis under poor connectivity
- Security vulnerability discovery in constrained scenarios
netguard/
├── backend-go/ # Go backend (primary)
│ ├── main.go
│ └── go.mod
├── backend-rust/ # Rust backend (alternative)
│ ├── Cargo.toml
│ ├── src/
│ │ ├── main.rs
│ │ ├── lib.rs
│ │ ├── network.rs
│ │ ├── security.rs
│ │ └── vpn.rs
├── frontend/ # React + Vite frontend
│ ├── src/
│ │ ├── App.jsx
│ │ ├── App.css
│ │ └── main.jsx
│ ├── index.html
│ ├── vite.config.js
│ └── package.json
└── README.md
- Go 1.21+ (for Go backend) — Install
- Rust 1.70+ (for Rust backend) — Install
- Node.js 18+ (for frontend) — Install
- Root/Admin access (for network controls: iptables, tc, dnctl, etc.)
cd backend-go
# Run directly
go run main.go
# Or build
go build -o netguard-go
./netguard-goServer runs on: http://localhost:8080
cd backend-rust
# Build and run
cargo run --release
# Or build only
cargo build --release
./target/release/netguard-serverServer runs on: http://127.0.0.1:8081
cd frontend
# Install dependencies
npm install
# Development server
npm run dev
# Opens at http://localhost:3000
# Production build
npm run buildOpen your browser:
- Frontend: http://localhost:3000
- Go API: http://localhost:8080/api
- Rust API: http://127.0.0.1:8081/api
Toggle to block all IPv6 traffic and force IPv4-only communication.
Linux:
sudo ip6tables -P INPUT DROP
sudo ip6tables -P OUTPUT DROPmacOS:
sudo pfctl -f /tmp/netguard_pf.confWindows:
netsh interface teredo set state disabledSimulate slow networks (10 KB/s default). Uses traffic control:
Linux (tc):
sudo tc qdisc add dev eth0 root htb default 10
sudo tc class add dev eth0 parent 1: classid 1:10 htb rate 80kbitmacOS (dnctl):
sudo dnctl pipe 1 config bw 80Kbit/s- Generate: Create WireGuard config for target server
- Connect: Activate VPN tunnel
- Disconnect: Stop VPN
# Manual WireGuard connection
sudo wg-quick up /tmp/netguard_wg0.confRun a test:
- Enter target domain (e.g.,
example.com) - Configure network conditions (IPv6 block, bandwidth limit, VPN)
- Click "Start Test"
- View detailed security report
Test Results Include:
- ✅/❌ IPv4 reachability
- ✅/❌ IPv6 reachability
- ⏱️ Latency (TCP connect time)
- 📊 Throughput (KB/s)
- 🌐 HTTP status code
- 🔒 Security headers analysis (HSTS, CSP, X-Frame-Options, etc.)
- 📈 Security score (0-100)
- 💡 Optimization recommendations
Current configuration state and backend OS
Response:
{
"config": {
"ipv6_blocked": false,
"bandwidth_kbps": 10,
"vpn_enabled": false,
"vpn_server_ip": "",
"test_running": false
},
"os": "linux",
"version": "1.0.0"
}Block/unblock IPv6
Request:
{ "block": true }Configure bandwidth throttling
Request:
{
"kbps": 10,
"enabled": true
}Generate, connect, or disconnect VPN
Request (generate):
{
"action": "generate",
"server_ip": "203.0.113.42",
"port": 51820,
"protocol": "wireguard"
}Request (connect):
{
"action": "connect",
"server_ip": "203.0.113.42"
}Run security test on target host
Request:
{ "host": "example.com" }Response:
{
"timestamp": "2024-01-15T10:30:45Z",
"target_host": "example.com",
"ipv6_reachable": false,
"ipv4_reachable": true,
"latency_ms": 45.2,
"throughput_kbps": 234.5,
"http_status": 200,
"security_score": 82,
"recommendations": [
"✅ All critical security headers present",
"⚡ Moderate latency (45ms) — consider regional endpoints"
]
}Fetch system logs
Fetch all test results
Strict-Transport-Security(HSTS)Content-Security-Policy(CSP)X-Frame-OptionsX-Content-Type-OptionsReferrer-PolicyPermissions-PolicyX-XSS-Protection
| Feature | Linux | macOS | Windows |
|---|---|---|---|
| IPv6 Blocking | ✅ ip6tables | ✅ pfctl | ✅ netsh |
| Bandwidth Limit | ✅ tc | ✅ dnctl | ✅ PowerShell |
| VPN (WireGuard) | ✅ wg-quick | ✅ wg-quick | ✅ WireGuard App |
| HTTP Testing | ✅ | ✅ | ✅ |
| DNS Lookup | ✅ | ✅ | ✅ |
Edit /tmp/netguard_wg0.conf after generation:
[Peer]
PublicKey = <server-public-key>
Endpoint = 203.0.113.42:51820
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 25Change API endpoint in frontend/src/App.jsx:
const API_BASE = 'http://127.0.0.1:8081/api'; // RustCreate profiles in backend:
- 3G (2010): ~0.5 MB/s = 500 KB/s
- 2G (2005): ~20 KB/s
- Dial-up (1995): ~5 KB/s
- Legacy: 10 KB/s (default)
Based on security test results:
| Issue | Recommendation |
|---|---|
| Low throughput | Enable gzip/brotli compression, minify assets, use HTTP/2 |
| High latency | Use CDN, edge caching, regional endpoints |
| Missing headers | Add security headers via web server or reverse proxy |
| Server errors | Debug backend, improve error handling, add monitoring |
| IPv6 exposed | Configure firewall rules, disable IPv6 if not needed |
# Go backend must run as root
sudo go run main.go
# Or set capabilities
sudo setcap cap_net_admin=ep ./netguard-goCheck CORS headers. Go backend includes CORS; Rust backend has .layer(CorsLayer::permissive()).
- Ensure
/tmp/netguard_wg0.confis readable - Verify server IP is reachable:
ping <server-ip> - Check firewall:
sudo ufw allow 51820/udp
Traffic control is CPU-intensive. Consider:
- Reducing test frequency
- Using lower bandwidth limits
- Testing off-peak hours
1. Configure Network Conditions:
├─ Enable IPv6 blocking
├─ Set bandwidth to 10 KB/s
└─ (Optional) Configure VPN
2. Target Security Test:
├─ Enter: example.com
└─ Click: Start Test
3. Review Results:
├─ Security Score: 82/100
├─ Headers Missing: CSP
├─ Latency: 45ms
└─ Throughput: 234 KB/s
4. Get Recommendations:
├─ Add Content-Security-Policy header
├─ Enable HSTS preload
├─ Optimize asset delivery
└─ Deploy to CDN for latency reduction
Test website compliance with security standards under degraded conditions.
Discover vulnerabilities in error handling, timeouts, and network edge cases.
Identify bottlenecks and asset optimization opportunities.
Validate website functionality for users on older networks (2G/3G).
Test application behavior through encrypted IPv4-only tunnels.
- Standard library (net, http, os/exec, crypto)
- Cross-platform (Linux, macOS, Windows)
- No external dependencies
tokio- async runtimeaxum- web frameworkreqwest- HTTP clientserde- JSON serializationchrono- timestamps
react18.2react-dom18.2axios- HTTP clientlucide-react- iconsvite- build tool
NetGuard © 2024 — Educational & Professional Use
Contributions welcome! Areas for enhancement:
- Additional VPN protocols (OpenVPN, IKEv2)
- Real-time network graphs
- Load testing integration
- Custom test scenarios
- Mobile app (React Native)
For issues or questions:
- Check logs in the Logs tab
- Verify API endpoint connectivity
- Ensure root/admin privileges for network controls
- Review backend console output 5.support: https://t.me/goholiclover
1.btc:bc1qpdsmktdtkueqeq6u77t67qndm75kkmm2wl80ec 2.eth:0xc0f3759FA67fF8e46ba8EDf6f345Bd7B110c8368 3.tron:TS2Zm5WAyicFsoRBoFWHEn8hWqoyw5kPho
Built with Go, Rust, React, and ❤️ for cybersecurity professionals with help of ai