Skip to content

NoRouter: IP-over-Stdio. The easiest multi-host & multi-cloud networking ever. No root privilege is required.


Notifications You must be signed in to change notification settings


Repository files navigation

NoRouter banner

NoRouter (IP-over-Stdio) is the easiest multi-host & multi-cloud networking ever:

  • Works with any container, any VM, and any baremetal machine, on anywhere, as long as the shell access is available (e.g. docker exec, kubectl exec, ssh)
  • Omnidirectional port forwarding: Local-to-Remote, Remote-to-Local, and Remote-to-Remote
  • No routing configuration is required
  • No root privilege is required (e.g. sudo, docker run --privileged)
  • No public IP is required
  • Provides several network modes
    • Loopback IP mode (e.g.,, ...)
    • HTTP proxy mode with built-in name resolver
    • SOCKS4a and SOCKS5 proxy mode with built-in name resolver
  • Easily installable with a single binary, available for Linux, macOS, BSDs, and Windows

Web site:

What is NoRouter?

NoRouter implements unprivileged networking by using multiple loopback addresses such as and The hosts in the network are connected by forwarding packets over stdio streams like docker exec, kubectl exec, ssh, and whatever.

Unlike traditional port forwarders such as docker run -p, kubectl port-forward, ssh -L, and ssh -R, NoRouter provides mutual interconnectivity across multiple remote hosts.


NoRouter is mostly expected to be used in a dev environment for running heterogeneous multi-cloud apps.

e.g. An environment that is composed of:

  • A laptop in the living room, for writing codes
  • A baremetal workstation with GPU/FPGA in the office, for running machine-learning workloads
  • ACI (Azure Container Instances) containers, for running other workloads that do not require a complete Kubernetes cluster
  • EKS (Amazon Elastic Kubernetes Service) pods, for workloads that heavily access Amazon S3 buckets
  • GKE (Google Kubernetes Engine) pods, for running gVisor-armored workloads

For production environments, setting up VPNs rather than NoRouter would be the right choice.


The binaries are available at .

See also Getting Started.

Quick usage

  • Install the norouter binary to all the hosts. Run norouter show-installer to show an installation script.
  • Create a manifest YAML file. Run norouter show-example to show an example manifest.
  • Run norouter <FILE> to start NoRouter with the specified manifest YAML file.

Example 1: Port forwarding across localhost + Docker + Kubernetes + LXD + SSH

Run norouter <FILE> with the following YAML file:

# localhost
    vip: ""
# Docker & Podman container (docker exec, podman exec)
    cmd: "docker exec -i some-container norouter"
    vip: ""
    ports: ["8080:"]
# Writing /etc/hosts is possible on most Docker and Kubernetes containers
    writeEtcHosts: true
# Kubernetes Pod (kubectl exec)
    cmd: "kubectl --context=some-context exec -i some-pod -- norouter"
    vip: ""
    ports: ["8080:"]
# Writing /etc/hosts is possible on most Docker and Kubernetes containers
    writeEtcHosts: true
# LXD container (lxc exec)
    cmd: "lxc exec some-container -- norouter"
    vip: ""
    ports: ["8080:"]
# If your key has a passphrase, make sure to configure ssh-agent so that NoRouter can login to the remote host automatically.
    cmd: "ssh -- norouter"
    vip: ""
    ports: ["8080:"]

In this example, on each hosts is forwarded to the port 80 of the Docker container.


$ curl
$ docker exec some-container curl
$ kubectl --context=some-context exec some-pod -- curl
$ lxc exec some-container -- curl
$ ssh -- curl

Similarly, is forwarded to the port 80 of the Kubernetes Pod, is forwarderd to the port 80 of the LXD container, and is forwarded to the port 80 of

Example 2: Virtual VPN connection into docker network create networks

This example shows steps to use NoRouter for creating an HTTP proxy that works like a VPN router that connects clients into docker network create networks.

This technique also works with remote Docker, rootless Docker, Docker for Mac, and even with Podman. Read docker as podman for the usage with Podman.

First, create a Docker network named "foo", and create an nginx container named "nginx" there:

$ docker network create foo
$ docker run -d --name nginx --hostname nginx --network foo nginx:alpine

Then, create a "bastion" container in the same network, and install NoRouter into it:

$ docker run -d --name bastion --network foo alpine sleep infinity
$ norouter show-installer | docker exec -i bastion sh

Launch norouter example2.yaml with the following YAML:

    vip: ""
      listen: ""
      disable: true
    cmd: "docker exec -i bastion /root/bin/norouter"
    vip: ""
  - via: bastion
    to: ["", "*"]

The "nginx" container can be connected from the host as follows:

$ export http_proxy=
$ curl http://nginx

If you are using Podman, try curl http://nginx.dns.podman rather than curl http://nginx .

Example 3: Virtual VPN connection into Kubernetes networks

Example 2 can be also applied to Kubernetes clusters, just by replacing docker exec with kubectl exec.

$ export http_proxy=
$ curl http://nginx.default.svc.cluster.local

Example 4: Aggregate VPCs of AWS, Azure, and GCP

The following example provides an HTTP proxy that virtually aggregates VPCs of AWS, Azure, and GCP:

    vip: ""
      listen: ""
    cmd: "ssh aws_bastion -- ~/bin/norouter"
    vip: ""
    cmd: "ssh azure_bastion -- ~/bin/norouter"
    vip: ""
    cmd: "ssh gcp_bastion -- ~/bin/norouter"
    vip: ""
  - via: aws_bastion
      - "*.compute.internal"
  - via: azure_bastion
      - "*"
  - via: gcp_bastion
# Substitute "example-123456" with your own GCP project ID
      - "*.example-123456.internal"

The localhost can access all remote hosts in these networks:

$ export http_proxy=
$ curl http://ip-XXX-XXX-XX-XXX.ap-northeast-1.compute.internal
$ curl
$ curl


Installing NoRouter from source

$ make
$ sudo make install

Contributing to NoRouter

NoRouter is licensed under the terms of Apache License, Version 2.0.

Copyright (C) NoRouter authors.