Ever wanted to turn a simple PHP host into a gateway for your local network?
I built host2gateway to do exactly that.

ProfiDE
/
host2gateway
Uses a PHP host or web server to create a gateway that securely allows access to clients through it.
host2gateway
host2gateway is a tool designed to provide access from a web server (Gateway) to a client without requiring static IP addresses, port forwarding, changing firewall rules, or other complex configurations. It is written in PHP and can be deployed on most hosting provider environments.
Features
- No need for static IP or port forwarding: There is no requirement to modify your firewall or router settings.
- Platform-independent: Works anywhere PHP 8.2 or higher is supported, making it suitable for most shared hosting services.
- Lightweight and simple: Minimal dependencies and easy deployment.
- Strong encryption built-in: Uses a powerful encryption mechanism that secures all communication, even if SSL/TLS is not available on the hosting provider. Your data is protected at all times, regardless of your environment.
How It Works
The client establishes an outbound connection to a Gateway server that is accessible from the internet (a PHP-enabled web host). Both sides communicate…
🔥 What is host2gateway?
It’s a lightweight tool that transforms any server running PHP into a gateway that can route traffic, manage requests, and act as a bridge between your local network and external services.
No heavy dependencies. No complex configs. Just PHP, Cron and a network interface.
🧠 Why I built this
Most gateway solutions are bulky, written in Go or Rust, and require root access and system-level changes. But what if you only have:
- A shared hosting account
- A basic VPS with PHP enabled
- A Raspberry Pi running a PHP server
host2gateway fills that gap. It gives you gateway-like capabilities using the tools you already have.
🛡️ Use cases
| Use Case | Description |
|---|---|
| Local network bridge | Connect isolated parts of your network |
| Traffic inspection | Log and monitor requests passing through |
| Development tunneling | Expose local services through a PHP host |
| Learning networking | Understand how gateways work with readable PHP code |
🔗 What you need to know
- Written in pure PHP
- Works with PHP 7.4+
- No database required
- Compatible with Linux and any system that runs PHP-CLI
🚀 Ready to try it?
I won’t bore you with setup steps here — everything is documented in the repository.
👉 GitHub: github.com/ProfiDE/host2gateway
Inside you’ll find:
- Installation instructions
- Configuration guide
- How to contribute (good first issues available!)
🤝 Open Source Needs You
host2gateway is still young. If you’re into:
- PHP
- Networking
- Cybersecurity
- Or just love tinkering
…come take a look. Open an issue. Submit a PR. Or just star the repo ⭐
Every contribution helps.