Quickstart Guide

Welcome to our quickstart guide. Visit this link to download the client for your operating system and installation instructions. If you're familiar with virtual machines and administering Linux/Unix operating systems this should all go quick.

Example Setup

Let's use some example scenarios to construct a few traffic rules.

We have a personal blog website that we maintain using a static site generator like Hugo, Jekyl or Hyde. Once we finish editing our site, the HTML, CSS and other assets are generated and output to a directory, the web document roots.

We also have a NAS in our home that has dropbox-like features that allows us backup data, share files and acess through a mobile phone app. The NAS software has built in support for Lets Encrypt as well.

Finally, we have a machine that we'd like to connect to through SSH. We can check up on our resources in case we want to reconfigure them or maintain them remotely.

To make these services available to us, and others, we'll need to use the pktriot client program to construct a few rules. First we'll setup a rule for our static website.

The pktriot client allows us to service HTTP/S requests by forwarding traffic to network services likes nginx or Apache, but it also has a built in file-server that can serve files over HTTP (TLS is not supported at the moment).

Setup the pktriot Client

Below are the commands to setup the traffic for your tunnel. We'll start with initial configuration, through traffic setup and then starting it.

When you use custom domanis you'll need to verify ownership of those domains before any traffic for that domain is ever routed to your tunnel. See the section in the user guide for more information on that process (it's quick).

[user@host ~] pktriot configure

Please visit the URL:
Authenticate this client by visiting this URL:
https://packetriot.com/client/identauth/559bd756cec4f3611cd0075b90d075161....0f9f600d80f9330e55bc59cce4f

Identified and authenticated!

Choose the region for the edge server to connect to:
+-----------------+
| #   | Region    |
+-----------------+
| 1   | us-east   |
+-----------------+
| 2   | us-west   |
+-----------------+

Input selection [#]: 2
[user@host ~] pktriot edit --name "hello world tunnel"
tunnel updated!

Let's setup the HTTP/S traffic rules for the static website and the NAS.

[user@host ~] pktriot route http add --domain blog.bold-wave-77698.pktriot.net --webroot /path/to/static/webroot

[user@host ~] pktriot route http add --domain drive.bold-wave-77698.pktriot.net --destination 192.168.0.123 --secure

[user@host ~] pktriot route http ls
+-------------------------------------------------------+
| Domain                              | Destination     |
+--------------------------------------------------------
| blog.bold-wave-77698.pktriot.net    |                 |
+--------------------------------------------------------
| drive.bold-wave-77698.pktriot.net   | 192.168.0.123   |
+-------------------------------------------------------+

To setup a traffic rule for generic TCP port forwarding, you first need to request a port to be allocated and assigned to your tunnel. Once you have a port, you can request more if you need them, and use them to forward traffic to any TCP service. In this case we're forwarding the traffic to a local computer using SSH.

[user@host ~] pktriot route tcp allocate
llocated port 22253

[user@host ~] pktriot route tcp forward --port 22253 --destination 192.168.0.15 --dstport 22
[user@host ~] pktriot route tcp ls
+----------------------------------------+
| Port    | Destination    | Dest Port   |
+----------------------------------------+
| 22253   | 192.168.0.15   | 22          |
+----------------------------------------+

Using the info command will print all the information about our tunnel. The hostname assigned to our tunnel is given, along with the hostname for the edge server we connect to and its IP address. The traffic rules for an HTTP/S and TCP service is also listed provided.

[user@host ~] pktriot info
Client:
	Hostname: bold-wave-77698.pktriot.net
	Server: us-west-11608.packetriot.net
	IP: 165.227.31.192

HTTP services:
+-------------------------------------------------------+
| Domain                              | Destination     |
+--------------------------------------------------------
| blog.bold-wave-77698.pktriot.net    |                 |
+--------------------------------------------------------
| drive.bold-wave-77698.pktriot.net   | 192.168.0.123   |
+-------------------------------------------------------+

TCP services:
+----------------------------------------+
| Port    | Destination    | Dest Port   |
+----------------------------------------+
| 22253   | 192.168.0.15   | 22          |
+----------------------------------------+

Everything is set. We're using subdomains for the hostname we were assigned. If you were using custom domains you'd have to verify them, but this is the quick start guide, so let's just test everything is working.

[user@host ~] pktriot start
Connecting...

Running HTTP services:
+-------------------------------------------------------+
| Domain                              | Destination     |
+--------------------------------------------------------
| blog.bold-wave-77698.pktriot.net    |                 |
+--------------------------------------------------------
| drive.bold-wave-77698.pktriot.net   | 192.168.0.123   |
+-------------------------------------------------------+
Running TCP services:
+----------------------------------------+
| Port    | Destination    | Dest Port   |
+----------------------------------------+
| 22253   | 192.168.0.15   | 22          |
+----------------------------------------+

You're now serving up traffic for these websites and SSH. Note, SSH uses the port 22, and there are many applications that use git under the hood. If you want to use your SSH service and avoid having to specify the port assigned to you then use the following example settings in your ~/.ssh/config.

# custom domain example
Host example.com
	Port 22872

# pktriot.net hostname example
Host morning-breeze-95646.pktriot.net
	Port 22872

Have any other questions? Please check out our more details User Guide. You can also contact us via email or visiting our subreddit r/packetriot.

Downloads Documentation Contact Us