From b1926a4640ebb84f0f5a470db2c6209963a0c015 Mon Sep 17 00:00:00 2001 From: Balakrishnan Balasubramanian Date: Fri, 31 Jan 2025 00:27:18 -0500 Subject: [PATCH] Add install instructions to README --- README.md | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 644770c..0702036 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,17 @@ Create network namespace where all¹ network requests go via ssh connection. +## Installing + +1. Install from [AUR][2]. +2. Download and install pre-built archlinux package: [link][3]. +3. For other linux, copy the files to appropriate path as done [here][4]. + ## Creating new namespace -1. Create a simple ssh config at `/etc/nnss//config`. This will be -included with [other settings][0]. -2. Create the ssh private key at `/etc/nnss//privatekey` +1. Create a simple ssh config at `/etc/nnss//config`. This will + be included with [other settings][0]. +2. Copy your ssh private key to `/etc/nnss//privatekey` 3. [Edit][1] your service file to include below properties ```systemd @@ -34,7 +40,12 @@ Port 8822 # If the ssh server is not on default port 22 ## Testing namespace ```bash -❯ sudo systemd-run --property=NetworkNamespacePath=/run/netns/vps1ns --property=User=$USER --property=Requires=nnss-tunsocks@vps1.service --property=After=nnss-tunsocks@vps1.service --shell +❯ sudo systemd-run \ + --property=NetworkNamespacePath=/run/netns/vps1ns \ + --property=User=$USER \ + --property=Requires=nnss-tunsocks@vps1.service \ + --property=After=nnss-tunsocks@vps1.service \ + --shell [sudo] password for balki: Running as unit: run-p233279-i233579.service Press ^] three times within 1s to disconnect TTY. @@ -72,3 +83,6 @@ DNS by default still goes via host. [0]: ./ssh_config [1]: https://wiki.archlinux.org/title/Systemd#Editing_provided_units +[2]: https://aur.archlinux.org/packages/nnss +[3]: https://gitea.balki.me/balki-aur/-/packages/arch/nnss/0.1.0-1 +[4]: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=nnss#n14