Add install instructions to README
This commit is contained in:
parent
f2c57f7ac0
commit
b1926a4640
22
README.md
22
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/<namespace_name>/config`. This will be
|
||||
included with [other settings][0].
|
||||
2. Create the ssh private key at `/etc/nnss/<namespace_name>/privatekey`
|
||||
1. Create a simple ssh config at `/etc/nnss/<namespace_name>/config`. This will
|
||||
be included with [other settings][0].
|
||||
2. Copy your ssh private key to `/etc/nnss/<namespace_name>/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
|
||||
|
Loading…
x
Reference in New Issue
Block a user