Hot answers tagged


As Kassandry said, you can't do this with a command within the jail itself. What you could do, however, would be to create a separate user (who I will henceforth call closer on the host system. This user should be blocked so that it can only log in with an SSH key. Your jailed user should have the private key and the password for the key. On the host ...


Jail is already a chrooted environment so you can't gain more benefits chrooting jailed software.


Jails specifically forbid the shutdown commands, per the manual page here. Normal machine shutdown commands, such as halt(8), reboot(8), and shutdown(8), cannot be used successfully within the jail. Additionally quoting from The Design and Implementation of the FreeBSD Operating System, Processes running within a jail are not permitted to perform ...


Commands that start with an exclamation mark ! escape the FTP client and are executed locally with the rights of your local user. The don't run on the server, actually they won't even reach the server, so there is nothing for vsftpd to block.


After some more testing the pf rules, I briefly let all traffic pass and realized the mistake was that while I had pass quick on lo0 all in the pf.conf, the jail is running under lo1. I added pass quick on lo1 all and it works now. Also note that from within a jail, you should query the jail IP instead of localhost. So, in the jails resolv.conf: ...

Only top voted, non community-wiki answers of a minimum length are eligible