Skip to content

Instantly share code, notes, and snippets.

@mcastelino
mcastelino / slirp4netns.md
Last active September 10, 2024 21:58
slirp4netns: How does it work

Create a process with its own network and pid namespace

$ unshare --user --map-root-user --net --mount
[root@incensed-gawain ~]# echo $$
2646

Run the slirp process on the host

@egernst
egernst / ports.md
Last active March 11, 2019 23:06
port forward and tunneling fun

Reverse Tunneling, or "how can I access that machine that is behind another network?"

Let's say we have a few test machines sitting behind a workstation router

Assuming the 'router' will forward traffic out, we can facilitate SSH'ing 'directly' to a test machine beind the router by leveraging reverse tunneling:

ssh -f -N -R 19999:localhost:22 <username>@<users host>

where: