Hacker News new | past | comments | ask | show | jobs | submit login

Do you have a good overview of how to use pieces of FreeBSD jails without using the whole thing? I've interacted (under duress) with FreeBSD jails in production, but I definitely found it a lot easier to learn about Linux containers / namespaces / cgroups.



sudo jail -c path=/ command=/bin/sh

to get a shell in the least isolated jail possible. It's that simple. Read the "Jail Parameters" section in `man jail` to see what you can add to this, e.g.:

sudo jail -c path=/ ip4.addr=192.168.1.123 command=/bin/sh

to isolate the IP address…


'man jail_attach' is somewhat extensive if you wish do your things like one fork in one jail another in another. I have to admit similar thing you can do in linux containers just bu spawning 'nsenter' with various parameters.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: