Read this document in Persian (فارسی)
Welcome to EasyBackhaul, a user-friendly and powerful management script for the Backhaul reverse tunneling solution. This script simplifies the installation, configuration, and day-to-day management of Backhaul, making it accessible to everyone.
This script, developed by @N4Xon (NaxonM), provides a menu-driven interface to manage the core Backhaul reverse tunnel, which was developed by Musixal.
You can install and run EasyBackhaul with a single command. The script requires root or sudo privileges to run.
bash <(curl -Ls https://raw.githubusercontent.com/NaxonM/EasyBackhaul/stable/easybackhaul.sh)The script will first check for the Backhaul binary. If it's not found, it will automatically download the latest version from the official GitHub repository.
This guide will walk you through setting up and managing a tunnel using the EasyBackhaul script.
After installation, run the command again to bring up the main menu. The script will greet you with server information and the main options.
EasyBackhaul Installer & Management Menu (v12.5)
================================================================
Core by Musixal | Installer by @N4Xon
----------------------------------------------------------------
1. Configure a New Tunnel
2. Manage Existing Tunnels
3. Update/Re-install Backhaul Binary
4. Uninstall EasyBackhaul (Removes binary and ALL configs)
0. Exit
----------------------------------------------------------------
This wizard-driven process makes setup simple. Let's configure a server tunnel.
- Select Option 1 from the main menu, "Configure a New Tunnel".
- Choose Mode: You will be asked if this machine is a
Serveror aClient. Select1for Server. - Select Transport: Choose a transport protocol from the list (e.g.,
tcp,udp,wss,tcpmux). - Enter Basic Configuration:
- Tunnel Port: The main port the Backhaul server will listen on. The script will check if this port is already in use.
- Forwarded Ports: The service ports on the client you want to expose on the server (e.g.,
80, 443, 2222=22). - Authentication Token: A secure password to authenticate the client and server.
- Enter Advanced Configuration: You can now fine-tune advanced and transport-specific parameters or accept the sensible defaults.
- Confirmation: The script displays a summary of the configuration you've built. If it looks correct, confirm with
y. - Service Creation: The script automatically creates the config file, adds a firewall rule (if
ufwis active), and creates/starts asystemdservice.
This menu is the central hub for managing all your tunnels.
- Select Option 2 from the main menu, "Manage Existing Tunnels".
- Service List: The script will display a list of all configured Backhaul services, showing whether they are
ActiveorInactive. - Select a Service: Choose the tunnel you wish to manage from the list to open the Tunnel Management Menu.
1. Start: Starts the systemd service if it is inactive.2. Stop: Stops the systemd service.3. Restart: Restarts the service.4. View Status: Shows the detailedsystemdstatus.5. View Logs (Live): Streams the live service logs.6. View Configuration: Displays the contents of the tunnel's configuration file.7. Edit Configuration (nano): Backs up the current config and then opens it innano.8. Test Connection: Performs a basic connectivity test.9. Manage Cron Auto-Restart: Opens a sub-menu to set or remove a cron job for automatic restarts.10. Delete Service: Permanently removes the service, its configuration, firewall rule, and cron job.0. Back to Service List: Returns to the previous menu.
- Core Backhaul Project: Musixal
- EasyBackhaul Installer Script: @N4Xon (NaxonM) (Telegram)
The core Backhaul project is licensed under the AGPL-3.0 license.