OpenRPort is a remote server management system that establishes secure SSH tunnels to devices inside protected intranets. It consists of a server (rportd) and client (rport) that communicate via SSH to provide remote access, command execution, file transfer, and system monitoring.
The server provides HTTP endpoints to generate installer, update, and uninstall scripts for Linux and Windows clients. The OS is auto-detected via User-Agent or can be set explicitly with the os query parameter.
Add the following to your rportd.conf under [server]:
## Custom repository URL for client binary downloads.
## Default: "https://github.com/netzint/openrport"
repository_url = "https://github.com/netzint/openrport"
## Custom name for the installed client binary and service.
## This allows whitelabeling the client on target systems.
## Default: "openrport"
installer_name = "openrport"
## Auto-register each installed client on the server.
## When enabled, a client auth entry with a random password is created
## and injected into the install script automatically.
## When disabled, each client must be registered manually after installation.
## Default: true
installer_autoregister = trueGenerates a full install script that downloads the client binary, creates a config file, sets up a system service, and starts the client.
Endpoint: GET /client/install
| Parameter | Required | Description |
|---|---|---|
name |
Yes | Client name. Used as auth ID and service identifier. If the name starts with a 5-digit number followed by a dash (e.g. 12345-server), the number is automatically added as a tag. |
os |
No | linux or windows. Auto-detected from User-Agent if omitted. |
replace |
No | Set to true to replace an existing client auth entry. Without this, an existing auth with the same name returns HTTP 409. |
proxy |
No | HTTP proxy URL (e.g. http://proxy:8080). Used for the binary download and written to the client config. |
Linux:
curl -fsSL "https://your-server/client/install?name=myserver" | bashLinux with proxy:
curl -fsSL -x "http://proxy:8080" "https://your-server/client/install?name=myserver&proxy=http://proxy:8080" | bashNote:
-xis needed so thatcurlitself can reach the server through the proxy. Theproxyquery parameter ensures the generated install script also uses the proxy for downloading the client binary, and writes it into the client config for ongoing use.
Windows (PowerShell):
iwr "https://your-server/client/install?name=myserver&os=windows" | iexWindows with proxy:
iwr -Proxy "http://proxy:8080" "https://your-server/client/install?name=myserver&os=windows&proxy=http://proxy:8080" | iexNote:
-Proxyis needed so thatInvoke-WebRequestitself can reach the server through the proxy. Theproxyquery parameter ensures the generated install script also uses the proxy for downloading the client binary, and writes it into the client config for ongoing use.
Replace existing client auth:
curl -fsSL "https://your-server/client/install?name=myserver&replace=true" | bashLinux:
- Creates a service user and directories (
/etc/<name>,/var/log/<name>,/var/lib/<name>) - Downloads and extracts the latest release from the configured repository
- Installs the binary to
/usr/local/bin/<name> - Generates a TOML config file at
/etc/<name>/<name>.conf - Creates a sudoers entry for the service user
- Creates and starts a systemd service
Windows:
- Creates directories under
C:\Program Files\<name> - Downloads and extracts the latest release
- Installs the binary as
<name>.exe - Generates a TOML config file in the install directory
- Creates and starts a Windows service
Generates a script that downloads the latest binary and replaces the running one.
Endpoint: GET /client/update
| Parameter | Required | Description |
|---|---|---|
os |
No | linux or windows. Auto-detected from User-Agent if omitted. |
Linux:
curl -fsSL "https://your-server/client/update" | bashWindows (PowerShell):
iwr "https://your-server/client/update?os=windows" | iex- Detects architecture
- Downloads the latest release
- Stops the running service
- Replaces the binary
- Starts the service
Generates a script that completely removes the client from the system.
Endpoint: GET /client/uninstall
| Parameter | Required | Description |
|---|---|---|
os |
No | linux or windows. Auto-detected from User-Agent if omitted. |
Linux:
curl -fsSL "https://your-server/client/uninstall" | bashWindows (PowerShell):
iwr "https://your-server/client/uninstall?os=windows" | iexLinux: Stops and disables the service, removes binary, config, logs, data directory, sudoers entry, and service user.
Windows: Stops and removes the service, deletes the install directory.
Returns the server version and repository URL.
Endpoint: GET /client/version
curl -s "https://your-server/client/version"You can restrict which commands are allowed to run on clients via the server config:
## Path to a TOML file defining allowed commands per OS.
## The list is sent to clients during connection setup.
## Default: not set
command_policy_file = "/etc/rport/command-policy.toml"Example /etc/rport/command-policy.toml:
[linux]
allow = [
'/usr/bin/apt-get update',
'/usr/bin/apt-get upgrade -y',
]
[windows]
allow = [
'C:\\Windows\\System32\\ipconfig.exe /all',
]
[global]
allow = [
'hostname',
]