Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [jails]

The tag has no usage guidance.

1
vote
1answer
21 views

Multi-jail /var separation

I'm setting up multiple jails in FreeBSD to serve dynamic websites. The host environment has a webserver that dispatches connection based on HTTP Host header, and each jail has a /var/lib/www-db ...
0
votes
0answers
33 views

Securing an open FTP on FreeBSD for visitor wifi speed testing?

I'd like to add a really simple local FTP server to my FreeBSD system, to allow guests to do wifi speed testing. Because of the use, I don't need more than very basic functionality - anon R/W to a ...
1
vote
0answers
17 views

Can I limit a process's access to specified files and stdout only without root?

I want to setup a server for students to upload C code. The server compiles C code, run the binary and shows output to students. Now I am having security concern. Students can upload any code, but I ...
1
vote
2answers
73 views

What is the reason FreeBSD jails don't get the entropy pool

I've noticed that the FreeBSD script that generates entropy, bails out if it finds it itself is running from within a jail. # uname -srm ## notice: install of mfsBSD (https://mfsbsd.vx.sk) FreeBSD ...
0
votes
1answer
62 views

Running Tor service in the jail environment

I want to torify my FreeBSD old machine purposed to mainly darknet activities. Questions: Should I worry about these errors during creating jail? Warning: Some services already seem to be listening ...
1
vote
1answer
206 views

How to use Jailkit Jail Manager in Virtualmin to restrict users

How to use Jailkit Jail Manager in Virtualmin (Webmin 1.892) to restrict users in their homes including virtual website and all services running under user? I am setting up small website hosting ...
1
vote
1answer
157 views

Is a Chroot Jail for SSH *and* SFTP?

I'm trying to setup a chroot jail, but I'm not sure how to make this work in SSH and SFTP. A quick question, will something like this work for both SSH and SFTP or just SSH? If it doesn't work for ...
2
votes
0answers
55 views

Can the contents of a FreeBSD jail be installed as the main OS?

Is it conceptually possible to take a FreeBSD jail and copy the contents to my root filesystem and expect it to boot up? Note that because the jail doesn't have a kernel, I will have to copy that ...
1
vote
2answers
532 views

chroot an user to more than one directory in different locations

I would like to know how I can constraint a user to only be able to access and have RWX permissions to directories like /etc/httpd, /etc/php and /var/www/html as well as its own home directory. Also ...
0
votes
1answer
306 views

Proper way to jail user so shell doesn't immediately close

Trying to use jailkit on Centos7. I've installed by source and also used RPM's at http://dries.eu/rpms/jailkit/jailkit, and get the same results. I am primarily following https://olivier.sessink.nl/...
0
votes
1answer
141 views

Why will shell automatically close for jailed user with 777 home?

Jailed a user using https://olivier.sessink.nl/jailkit/ on Centos7 sudo jk_jailuser -m -j /home/jail -v -s /bin/bash testing sudo jk_cp -v -f /home/jail /bin/bash Then made /home/jail/home/testing ...
2
votes
1answer
2k views

How to change the default (binary) python version in a FreeBSD jail?

In a jail, I have installed python3.6 along python3.4. Both were installed using pkg install, no ports. I want to keep the 3.4 version for some time, but set the 3.6 as default. Answers found in ...
1
vote
1answer
134 views

Create a second Jail on FreeBSD?

I recently created a Jail on FreeBSD 11 Release, I used the steps listed on the ezjail section of the handbook The handbook, specifically: echo cloned_interfaces="lo1" >> /etc/rc.conf service ...
1
vote
0answers
49 views

Problem in Bind with 4 views

I have Bind server installed on FreeBSD Jails. I have master and two slaves. And I have 4 views for different locations. When I add some record on master zone and type rndc reload I see that all 4 ...
4
votes
1answer
45 views

How can I run a program with limited permissions

I noticed that a lot of my programs run under the same user like (firefox,chromium,steam,etc...) and therefore should have the same permissions as this user, but I would prefer to limit their accesses....
0
votes
1answer
534 views

How to run firejail as root?

How can I run firejail as a root user? # firejail --seccomp firefox Reading profile /etc/firejail/firefox.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/...
4
votes
1answer
1k views

ssh in chrooted jail doesn't work because of /dev/null operation not supported

I am trying to set up a ssh-chroot jail on one of my NAS servers. The system runs on NAS4Free (which is based on nanobsd). The user should be able to run only one command, which is a bash-script that ...
2
votes
0answers
85 views

Problem with MySQL timezone

I have installed MySQL,version 5.6.16.My OS is FreeBSD,version is 9.3.MySQL installed on jail.When I check date I see Thu Nov 17 15:22:14 AMT 2016,I see this output also on the system.In MySQL,when I ...
2
votes
1answer
444 views

Complete isolation in Linux sandboxing

Applications on iOS (and perhaps the ones that are sandboxed on OS X) are confined to a virtual root filesystem that only has the files and directories specific to the application. The root seen by an ...
3
votes
1answer
700 views

Freebsd: pf firewall doesn't work on restart

I'm running FreeBSD 10.3 p4 and observed some strange behavior When restarting the machine pf starts due to /etc/rc.conf entry # JAILS cloned_interfaces="${cloned_interfaces} lo1" gateway_enable="...
1
vote
1answer
201 views

Globally writable files and user-based process jailing

I want to be able to generically pick a certain executable (potentially malicious) x and run it (from an admin account) with write access restricted to certain directories (dynamically deduced) "${...
6
votes
2answers
726 views

Accessing ports on public IP from within a FreeBSD jail

In a FreeBSD 10 setup, I have a jail running the publicly accessible nginx web server and another jail for the Java backend server based on Jetty. Each jail has its own internal IP address 127.0.1.x ...
4
votes
1answer
1k views

How to change Squid service UID in FreeBSD?

Strangely enough, it appears that Squid cannot start if the squid user is not affected to the UID 100. When trying to use another PID, the service systematically fails to start with the following ...
1
vote
1answer
238 views

FreeBSD - UFS equivalent of ZFS command

I'm trying to configure jails with this tutorial. Since I don't want to use ZFS, could anyone tell me the UFS equivalent of zfs create -o mountpoint=/local/jails zpool/jails chmod 700 /local/jails &...
1
vote
1answer
1k views

ezjail: update problems

I'm having problems whenever I try to update my ezjail baseball on FreeSDB 10. I'm on FreeBSD 10.2-RELEASE-p11 and ezjail v3.4.2 The jails show the right version inside but the update progress doesn'...
3
votes
1answer
785 views

FreeBSD jails - Nginx, PHP-FPM, Wordpress - Share folder between jails (read-only)

Question I want to separate PHP (PHP-FPM) and Nginx into different jails. One jail with Nginx, and one with PHP-FPM / PHP / Wordpress. Nginx is good at serving static assets, so I would like to ...
1
vote
1answer
1k views

FreeBSD: adding ip alias to interface breaks network on primary ip

I am trying to add an alias to my network card (I would like to use jails) on my FreeBSD box. It is running version 10.2-RELEASE-p7 (generic amd64 kernel). The machine is running in a Hyper-V virtual ...
2
votes
1answer
220 views

Can I jail an older 32-bit FreeBSD on a (current) 64-bit FreeBSD?

Is it possible to jail an older 32-bit FreeBSD, such as 6.4 or 8.4 in a 64-bit FreeBSD 10.2? I'll also appreciate pointers and explanations on how to accomplish this and information on what ...
1
vote
2answers
321 views

How is OpenSSH sftp jail/chroot working?

This question is actually too broad... What I really want to know is whether or not it actually chroots and, if so, how a SSH user deamon[1] can be launched in that jail in spite of the obvious lack ...
2
votes
1answer
666 views

Is there a way to isolate a running program from the rest of a Linux system?

First of all, I know about virtualisation and containers. I'm sure "he wants containers" is what popped in your mind. (Don't deny it!) However containers are like chroot: if you want to execute bash ...
2
votes
1answer
2k views

FreeBSD - No internet connection inside jail

I am currently trying to set up a server on FreeBSD. I want to create jails with ezjails according to the handbook. I am following the example to install BIND inside a jail but I am stuck at the ...
0
votes
1answer
569 views

Logout from jail

I'm trying to use FreeNAS on my office along with Syncthing, and some things are giving me headache. FreeNAS installed Syncthing as a jail, and I did the jexec command to login into the jail, but now ...
0
votes
0answers
53 views

List all dependencies for package

I am configuring a ubuntu 14.04 server, for making it more secure i wanted to jail each user to his home directory. So far this worked as expected. But-;)-i am installed a complete RoR ...
2
votes
1answer
345 views

Is it possible to create a freebsd 10 or 11 jail in freebsd 9?

My title question is exactly my question : is it possible to create a freebsd 10 or 11 jail into a freebsd 9 instance?
2
votes
1answer
480 views

Running ssh from chroot jail in SuSE

I'm trying to make a server that acts as sort of an access point for lots of other machines. I want to give one user jailed access to it so they can ssh to other machines in the network. I've got ...
2
votes
1answer
127 views

Restrict user script execution

I have a game engine running on a Debian server. The game involves bots, which are coded in Python by the players. A player write a bot in Python Upon validation, the code is sent to the server A ...
1
vote
0answers
38 views

Chroot Users to /opt and subdirectories [duplicate]

I'll make this short and hopefully I make sense. Im trying to give a user ssh access, but, he/she must only be able to access /opt and the few subdirectories that live under it. However, here's ...
0
votes
1answer
741 views

How can I install tomcat8 using openjdk8 in a FreeBSD jail?

I have a FreeBSD 10.1 machine. I want to install tomcat8 and openjdk8 in a jail. This jail will only be used for few web application, and I do not want to install the ports collection, nor the full ...
0
votes
0answers
303 views

fail2ban stops logging after some time (3-4 days)

I've noticed that whenever I want to see fail2ban logs after 3 or 4 days of being working, it compresses the logs to .gz which Im fine with that: -rw-r--r--. 1 root root 90034 May 1 12:49 ...
1
vote
3answers
14k views

How to remove a (plugin) jail from FreeNAS

I'm running FreeNAS (v9.2.1.9) as a file and media server and have several jails installed, some of them as plugin jails others as "standard" jails. After I had replaced one of the plugin jails by a "...
2
votes
1answer
1k views

Files in folder /run/udev/data

Does someone know, when and how the files in this folder /run/udev/data are generated. I ask because I have a program, which needs udev in jail. But the version in jail is newer (version 208) than ...
1
vote
1answer
2k views

FreeBSD: IPv6 in Jails (ezjail)

I'm on FreeBSD 10.1 and in the process of setting up a server. After some hassle I managed to get IPv6 running. I'm now setting up jails with ezjail and I learned how to set up a working flavor and a ...
1
vote
1answer
831 views

FreeBSD 10: Do I need jails?

I'm in the process of setting up a FreeBSD 10 server with just some services on a KVM server: NGINX webserver w PHP-FPM 2 domains, 3 subdomains Mailserver 3 Email addresses MySQL (or other) ...
0
votes
0answers
870 views

How to use binaries in jailshell?

I'm offering jailshell (on CentOS- whm) access to someone in order to use the folder sync tool called Unison (Some sort of bidirectional rsync) That's for the background. Unison is installed, as ...
1
vote
1answer
212 views

Jail in chroot in debian 7.5 - Privileges Separation problem

I'm trying to create a jail for a user in my server. Let's call the user "juser". What do I want to achieve? I want an ssh user to be jailed in his home folder and not have any access (whatsoever) on ...
1
vote
1answer
208 views

How do I know if I'm in a jail, container, snapshot, etc. environment? [duplicate]

I received a machine (Ubuntu 12.04 server) from a coworker when he left the company. I created my own user as sudo/admin and used the machine for months via SSH. After rebooting for the first time ...
11
votes
1answer
1k views

Linux: Is there handy way to exec a program binding it to IP-address of choice?

In FreeBSD 4.9 it was very easy to accomplish with just a single command like jail [-u username] path hostname ip-number command if path was / you had running just the same program as usual but all ...
2
votes
1answer
40 views

Absolutely jail a user with minimum IP, file, & command rights

I am trying to secure a custom application as much as possible from outside tampering. I've seen many pages on jailing a user, but they usually include many exceptions, and I want to lock down this ...
2
votes
1answer
321 views

Update jails FreeBSD in silent mode

What if I want to add all process to the cron? Is there silent way to upgrade jail? After these steps: # make buildworld # make installworld DESTDIR=/jails/somejail It comes time to: # ...
61
votes
1answer
45k views

Linux LXC vs FreeBSD jail

Are there any notable differences between LXC (Linux containers) and FreeBSD's jails in terms of security, stability & performance? On first look, both approaches look very similar.