Network Setup¶
Configure networking for local and remote access to IP-HOP.
Local Network Access¶
Basic Setup¶
IP-HOP runs on:
- Frontend: Port 3000
- API: Port 8001
Access from local network:
Find Server IP¶
Remote Access¶
Option 1: Reverse Proxy (Recommended)¶
Use Nginx or Caddy as reverse proxy with SSL.
Nginx Example¶
server {
listen 80;
server_name iphop.yourdomain.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name iphop.yourdomain.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
# Frontend
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
# API
location /api/ {
proxy_pass http://localhost:8001/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Caddy Example¶
Auto HTTPS with Let's Encrypt!
Option 2: Cloudflare Tunnel¶
Zero-config secure access using Cloudflare Tunnel.
- Install cloudflared
- Authenticate
- Create tunnel:
- Configure tunnel:
# config.yml
tunnel: <tunnel-id>
credentials-file: /path/to/credentials.json
ingress:
- hostname: iphop.yourdomain.com
service: http://localhost:3000
- service: http_status:404
- Run tunnel:
Option 3: Tailscale¶
Private VPN access using Tailscale.
- Install Tailscale on server
- Start Tailscale
- Access from any device on Tailscale network
Port Forwarding¶
For direct access without proxy:
- Router Configuration:
- Forward external port (e.g., 8443) to internal port 3000
-
Forward external port (e.g., 8444) to internal port 8001
-
Security Considerations:
- Use non-standard ports
- Enable firewall rules
- Consider using VPN instead
Security
Direct port forwarding exposes services to the internet. Use reverse proxy with HTTPS instead!
Firewall Configuration¶
UFW (Ubuntu/Debian)¶
# Allow local network only
sudo ufw allow from 192.168.1.0/24 to any port 3000
sudo ufw allow from 192.168.1.0/24 to any port 8001
# Or allow from anywhere (if using reverse proxy)
sudo ufw allow 80
sudo ufw allow 443
firewalld (RHEL/CentOS)¶
sudo firewall-cmd --permanent --add-port=3000/tcp
sudo firewall-cmd --permanent --add-port=8001/tcp
sudo firewall-cmd --reload
Docker Networking¶
Custom Network¶
Create isolated network:
Host Network¶
For better performance (Linux only):
HTTPS Setup¶
Let's Encrypt with Nginx¶
# Install certbot
sudo apt install certbot python3-certbot-nginx
# Get certificate
sudo certbot --nginx -d iphop.yourdomain.com
# Auto-renewal
sudo certbot renew --dry-run
Self-Signed Certificate¶
For local testing only:
openssl req -x509 -newkey rsa:4096 \
-keyout key.pem -out cert.pem \
-days 365 -nodes \
-subj "/CN=iphop.local"
Troubleshooting¶
Cannot Access from Other Devices¶
- Check firewall:
sudo ufw status - Verify container is running:
docker ps - Test port connectivity:
telnet <server-ip> 3000
Reverse Proxy Not Working¶
- Check proxy configuration
- Verify upstream services are accessible
- Check proxy logs
CORS Errors¶
Update API CORS settings: