Questions tagged [jail]

"The FreeBSD jail mechanism is an implementation of operating system-level virtualization that allows administrators to partition a FreeBSD-based computer system into several independent mini-systems called jails." source: Wikipedia

A jail is characterized by four elements:

  • A directory subtree -- the starting point from which a jail is entered. Once inside the jail, a process is not permitted to escape outside of this subtree. Traditional security issues which plagued the original chroot(2) design will not affect FreeBSD jails.

  • A hostname -- the hostname which will be used within the jail. Jails are mainly used for hosting network services, therefore having a descriptive hostname for each jail can really help the system administrator.

  • An IP address -- this will be assigned to the jail and cannot be changed in any way during the jail's life span. The IP address of a jail is usually an alias address for an existing network interface, but this is not strictly necessary.

  • A command -- the path name of an executable to run inside the jail. This is relative to the root directory of the jail environment, and may vary a lot, depending on the type of the specific jail environment.

source: https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html#jails-synopsis

Links

76 questions
0
votes
0 answers

apache2 - copy php scripts and "virtualize" filesystem

I have a very big code base which i need to duplicate for law reasons. the "source website": domain: example.com documentroot /home/mywebs/web1 i need to clone it to: domain: copy.example.com document root: different from…
Steven
  • 61
  • 1
  • 3
  • 10
0
votes
1 answer

Apache in jail wont start after portmaster upgrade

HELP!!!! I updated my web-server and now apache2.4 wont start after reboot. After setting loglevel to debug, I get this in my logs when I restart apache: [Wed Jan 21 10:24:21.785303 2015] [auth_digest:notice] [pid 74642] AH01757: generating secret…
0
votes
1 answer

File structure relative to sshd jail root

I'm setting up an sshd jail for some users on my system (archlinux). Without going into great detail I'd like to keep the scope of the question minimal. Setting /etc/ssh/sshd_config: Match group jaileduser ChrootDirectory…
0
votes
2 answers

Make who in all jails

Looking for a script what will show all logged users sorted by FreeBSD jails where they're logged in. So, need run the who command in all currently running FreeBSD jails and in the main host too. I make this: who #main host jls | grep -v JID |…
novacik
  • 1,497
  • 1
  • 9
  • 19
0
votes
1 answer

Linux VSFTPD : Jail a "Specific SFTP User" to its home?

I'm using both Redhat and CentOS. I previously wanted to jail a "Specific User" to its home. Then i got it by following this answer. When the user (lets say, using FileZilla) use: Protocol: FTP .. it is fine! But again there, when the user…
夏期劇場
  • 17,821
  • 44
  • 135
  • 217
0
votes
2 answers

debootstrap accessing original root system chroot jail

I am writing an online coding jude site like spoj.pl and i am creating a jail for compiling and executing the program. I wrote a script which takes c/c++ source code , compile and run the code. I need to execute this program in a jail created by…
user1159517
  • 5,390
  • 8
  • 30
  • 47
0
votes
1 answer

I have a jailed user , that cannot ping hostnames (only ip addresses)

I have a jailed user , that cannot ping hostnames (only ip addresses): [dimitar@nl ~]$ ping google.com ping: unknown host google.com Dig is working without any problem: [dimitar@nl ~]$ dig google.com ; <<>> DiG…
0
votes
2 answers

Run linux distro of choice inside existing distro

Just wondering if it's possible and what the best route might be to run a full-on Linux distro within my existing distro? It would be great to for instance run Arch Linux within a chroot, jail, etc.. I believe people are doing this on Chromium for…
stgtscc
  • 970
  • 1
  • 7
  • 19
0
votes
1 answer

How can I update the value of a pointer by pulling the value from an ini file?

I am trying to make a few fixes and enhancements to Jailkit. The source is in CVS version control so I cloned it to GitHub. The way this is set up, you edit a user's home directory in /etc/passwd to be something…
mark
  • 2,195
  • 1
  • 13
  • 8
0
votes
2 answers

Execute command in jail

I'm using Jailkit. Is it possible to execute a command inside the jail and get the output (from outside) ? I did a lot of digging in the docs but unable to find anything.
user1437328
  • 15,546
  • 9
  • 34
  • 44
0
votes
1 answer

Time in the FreeBSD jail is "jumping" every hour

I can't resolve my problem with time in FreeBSD JAIL :( I have set my timezone correctly. And I have commented this line: #1,31 0-5 * * * root adjkerntz -a Here is my cron log: Feb 3 12:15:00 blahblah…
Vladimir
  • 9
  • 1
-1
votes
1 answer

How do I run a Node.js script in a jail after it boots in TrueNAS

I'm very new to server related stuff, but I'm trying to have a node.js server start automatically in a TrueNAS jail upon booting up (instead of starting the server manually through the terminal). The most promising thing I could find is adding some…
-1
votes
1 answer

How to add MySQL filter to fail2ban on Plesk?

As you have noticed, Plesk doesn't come with a MySQL filter integrated natively for fail2ban, so we are not able to create a jail for this service. There is a way to add it but is not so elegant. What can I do to add support for MySQL on fail2ban…
JuliSmz
  • 996
  • 1
  • 12
  • 26
-1
votes
1 answer

chroot process jail with arbitrary directory set as root on each run

I am trying to run a command that needs to be limited to one directory and is executed in a shell function from a web application. My goal is to run that program but limit it to one directory. This directory will change each time I want to run the…
mmiscool
  • 31
  • 1
-1
votes
1 answer

Linux VSFTPD : Jail a "Specific User" to its home?

I'm using both Redhat and CentOS. When i do followings: # vi /etc/vsftpd/vsftpd.conf chroot_local_user=YES # service vsftpd restart Then All Users are jailed in their homes. What i really wanna know is: HOW TO JAIL A SPECIFIC USER ONLY?
夏期劇場
  • 17,821
  • 44
  • 135
  • 217