Policy Service Installation
This guide explains how to install and run the NoPorts Policy Service via the command line. This guide shows you how to run the Policy Server in a Linux environment (virtual machine).
Architecture
All devices have no open ports to the public Internet. The policy server delegates access into device. Modifying the policy rules gives you finegrain control on which clients get access to which devices and on what host and port.
Terminology
Client machine
The machine establishing connections.
All manager key copies are kept on this machine in ~/.atsign/keys, where subsequent copies are made for other machines.
Device machine
The remote machine that you are connecting to.
This has an actively running NoPorts daemon that will service connection requests from clients.
Policy machine
A machine running the policy service that responds to policy requests made by NoPorts daemons. This has an actively running NoPorts Policy Service.
Prerequisites
Before you begin the installation, please ensure the following steps are complete:
You own at least 3 Atsigns: one as the client, one as the device, and one for policy. You may purchase more Atsigns through our professional tier.
Installation & Activation: NoPorts is installed and Atsigns are activated on at least two machines, one to connect from and one to connect to. View installation guides.
Step 1: Activate Policy Atsign on Client machine
If your policy Atsign is already activated, then you may skip this step. This step can only be completed once.
Steps to be completed on the Client machine
In this step, we will be activating the policy Atsign on your client machine. The initial activation happens in this step and administering a copy securely will be done in the next step. Atsign activation can only be done once. If your Atsign is already activated, you can move onto the next step.
Run the onboard command.
On your client machine, ensure you have the at_activate binary installed.
Replace @my_policy_atsign with your Atsign.
You will get an OTP from your email, enter that into the program. If it expires, simply rerun the first step.
Your new key file should be in
~/.atsign/keys/You can validate vials -la ~/.atsign/keys/
Step 2: Set up binaries on Policy machine
Steps to be completed on the Policy machine
Navigate to the NoPorts GitHub Releases page and copy the link address for the file matching your operating system.
Latest release: https://github.com/atsign-foundation/noports/releases/latest
Open a terminal, and from your home directory run the following command to download the file and save it as sshnpd.tgz.
Example (for x86_64 machine):
Example (for ARM machine):
Once this is done, extract the contents of the file to your home directory.
After extraction, copy the npp_atserver and at_activate binary to /usr/bin
Step 3: Administer key copy to Policy machine
This step requires shell access on both your client machine and policy machine.
Once your policy key file exists (e.g. ~/.atsign/keys/@policy_atsign_key.atKeys ) on your client machine, it is time to give a copy of it to the policy machine. This is known as an "APKAM copy" with restricted namespace permissions and can be revoked later on.
Steps to be completed on Client machine
The goal here is for your client machine (which contains the manager set of policy Atsign keys) to administer a copy to the policy machine.
Generate an OTP (note this OTP down, as you will need it very soon)
Set up an auto approval service. This will automatically apporove the enrollment request which will be done in the next step.
Leave this process running in the background.
Steps to be completed on Policy machine
Enroll
Using the OTP generated from the previous step, send an enrollment request. This enrollment request should be automatically approved (almost immediately) once it is sent, and that is because we set up an auto approval service beforehand.
You should see a response like this:
If the enrollment request hangs for more than a minute, then ensure you have an auto approval service running on your client machine.
Step 4: Set up NoPorts Policy Service
Step to be completed on the Policy machine
Set up the systemd file.
Copy and paste this content to this new file: /etc/systemd/system/npp_atserver.service
Modify these mandatory fields accordingly:
User=noports- change this to the Linux username of the policy machinepolicy_atsign="@policy_atsign"- change this to your Policy Atsign
Start your new systemd service
Tail the logs and ensure the output looks healthy
What healthy output looks like:
Step 5: Register your daemon with the policy service
Step to be completed on your Device machine
Depending on what version your NoPorts daemon you are running, you will be editing a different configuration file:
/etc/systemd/system/sshnpd.service.d/override.conf
/etc/noports/sshnpd.yaml
If your sshnpd version is less than v5.14.13, edit the
/etc/systemd/system/sshnpd.service.d/override.conffile.
Edit the "delegate_policy" environment variable to your Policy Atsign.
If your sshnpd version is greater or equal than v5.14.13, edit the
/etc/noports/sshnpd.yamlfile.
Edit the "policy:" to your Atsign without its "@" at symbol. Example:
Then run the following command to restart the daemon.
Finishing this step will register your NoPorts daemon to send policy requests to the delegated policy Atsign when a non-manager attempts to make a request to your device machine.
Step 6: Writing your policy rules
Steps to be completed on the Client machine
Now it's time to write policy rules.
Download the latest sshnp binaries from our releases.
Download web assets
This next step requires git and npm installed on your machine.
If the npm run build step fails, ensure you have an up-to-date version of npm
Write Policy rules
Run the following command:
This will start a web server. Open the web server at https://localhost:3000
Now you can
Create user groups
Monitor policy logs
Below is an example of a test group that gives @some_atsign access to @bob's device "device1" on localhost:22 and localhost:3389.

Last updated
