npt Usage
Quick Start
Overview
This guide covers the basics to understanding the parameters of npt and invoking npt.
The NoPorts Tunnel, or npt for short, provides an end to end encrypted TCP Tunnel without the need for inbound listening ports on either of your machines.
Options
-f
required
atSign
The client atSign, a.k.a. the from atSign, since we are connecting from the client.
-t
required
atSign
The device atSign, a.k.a. the to atSign, since we are connecting to the device.
-r
required
atSign
The atSign of the relay service used to establish the session connection. NoPorts currently provides coverage in 4 regions:
@rv_am - Americas
@rv_eu - Europe
@rv_ap - Asia/Pacific @rv_oc - Oceania
-d
required
String
Only [a-z0-9_-]
allowed.
Maximum of 36 characters.
Allows multiple devices to run sshnpd under a single device name.
-p
required
Port number. Between 1-65535.
The port you are connecting to on the device/remote side. This port must be included in the --permit-open list and/or policy allowances.
-l
"0"
Port number Between 1024-65535.
The port you are connecting to on the client/local side. Defaults to any unused port.
-h
"localhost"
DNS / ip address
The host that the daemon will connect to. nslookup is resolved on the remote machine where the daemon is running.
-K
N/A
N/A
Keep alive. If a session ends, try to create a new session and re-bind the port. If you are using this in a script or as a daemon, it's recommended that you handle restarts externally (e.g. with an init system) and do not rely on npt -K.
-T
"30s" "24h" (with -K)
Human readable duration: e.g. "7d" or "1h,14m,30s"
How long to keep the npt session open if there have been no connections. To "never" timeout, use "-T 0" which sets a timeout of 365 days.
-x
N/A
N/A
Starts the session in the background under a different process id, then exits, printing the bound port to stdout.
Note that the background npt session will automatically close due to the timeout feature (see -T).
If you are scripting npt, this feature means you will lose control over the session process, do not use this feature if you also intend to control when npt stops or if you need to detect when the npt session dies.
-v / -q
N/A
N/A
Use -v for verbose logging. Use -q for quiet (i.e. less) logging.
Example
Use Cases
Last updated