See PortGate in action - from installation to port forwarding in seconds
pip install portgate
# Map local port 8000 to a public port
portgate 8000
Port forwarding established!
External address: 95.65.xxx.xxx:1025
Internal address: localhost:8000
Press Ctrl+C to stop forwarding...
^C
Removing port mapping 1025 -> 8000...
Port mapping removed successfully.
Why PortGate?
Everything you need to manage port mappings and expose services
⚡ Instant Setup
No complex configuration or external services. Just install and run. PortGate handles all the UPnP/NAT-PMP complexity for you.
🔒 Local Control
Your data stays on your network. No third-party tunneling services or external dependencies required.
🎯 Simple CLI
Clean, intuitive command-line interface. Open ports with a single command, manage them effortlessly.
📊 Port Management
List, refresh, and remove port mappings. Keep track of all your active forwards with built-in management tools.
⏰ TTL Support
Set custom lease durations for port mappings. Automatic cleanup prevents stale forwards from cluttering your router.
🌐 Universal
Works with any router supporting UPnP/NAT-PMP. No vendor lock-in, just standards-based port forwarding.
Command Reference
All available commands and options
Open a new port mapping with custom options
portgate add -p 25565 -P TCP -e 50000
Remove an existing port mapping
List all active port mappings
Refresh/renew a specific mapping
Remove all mappings by PortGate
Show router & WAN IP info
Get Started
Expose your local services to the internet in seconds
Installation
Windows Installation (No Python Required)
Download the standalone Windows executable:
Extract and run portgate.exe from the command prompt
python3 -m http.server 8000
# In another terminal, expose it to the internet
portgate 8000
Port forwarding established!
External address: 95.65.xxx.xxx:1025
Internal address: localhost:8000
Press Ctrl+C to stop forwarding...