23 lines
467 B
Markdown
23 lines
467 B
Markdown
|
|
|||
|
# Network Namespace setup using SSH SOCKS proxy
|
|||
|
|
|||
|
## Creating new namespace
|
|||
|
|
|||
|
```bash
|
|||
|
❯ sudo mkdir /etc/nnss/vps1
|
|||
|
|
|||
|
❯ sudo tee /etc/nnss/vps1/config > /dev/null
|
|||
|
Hostname xx.xx.xx.xx
|
|||
|
User vps_user_name_here
|
|||
|
Port 8822 # If the ssh server is not on default port 22
|
|||
|
|
|||
|
❯ cp ~/.ssh/id_ed25519_for_vps1 /etc/nnss/vps1/privatekey
|
|||
|
```
|
|||
|
|
|||
|
|
|||
|
## Entering namespace
|
|||
|
|
|||
|
```bash
|
|||
|
❯ sudo systemd-run --property=NetworkNamespacePath=/run/netns/vps1ns --property=User=$USER --shell
|
|||
|
```
|