Jail

From SHellium Wiki
Jump to: navigation, search
Geographylogo.png In other languages: English | Afrikaans | Albanian | Arabic | Brazilian | Bulgarian | Catalan | Chinese | Croatian | Czech | Danish | Dutch | Esperanto | Estonian | Filipino | Finnish | Flemish | French | German | Greek | Hebrew | Hindi | Hungarian | Indonesian | Italian | Japanese | Latvian | Lithuanian | Macedonian | Malay | Malayalam | Norwegian (Bokmål) | Norwegian (Nynorsk) | Persian | Polish | Portuguese | Romanian | Russian | Serbian | Slovak | Slovenian | Spanish | Swedish | Turkish | Ukrainian | Urdu

Warning.gif

This Feature Is Prohibited

If you attempt to use this on SHellium you will be banned.

This is how to create a freebsd jail or at least some helpful tutorials

Pulpie's tutorial



cd /usr/src
make buildworld
make installworld DESTDIR=/usr/jail/
cd /usr/src/etc
make distribution DESTDIR=/usr/jail/

As the jail doe not have its own kernel, create a fake one.

cd /usr/jail/
ln -sf dev/null kernel 

For this to work you need a mounted devfs filesystem, so before creating the fake kernel mount it.

mount_devfs devfs /usr/jail/dev 

Make a new resolv.conf from your host.

cp /etc/resolv.conf /usr/jail/etc/

This is how I set mine up. Jail rc.conf

sshd_enable="YES" # optional, make sure you setup /etc/ssh/sshd_config if you do this.
hostname="***.***.***"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
linux_enable="YES" # optional, make sure you setup linproc (at end end of this tutorial)


Kill periodical emails Jail /etc/periodic.conf

daily_clean_hoststat_enable="NO" 
daily_status_mail_rejects_enable="NO" 
daily_status_include_submit_mailq="NO" 
daily_submit_queuerun="NO" 


Host rc.conf jail settings

jail_enable="YES"        
jail_list="first"            # Space separates list of names of jails
jail_set_hostname_allow="NO" # Allow root user in a jail to change its hostname
jail_socket_unixiproute_only="YES" # Route only TCP/IP within a jail
jail_interface="dc0"    # change to host interface alias for same ip
jail_devfs_enable="YES"  # mount devfs in the jail
jail_procfs_enable="YES" # mount procfs in jail 

specific settings for jail "one"

jail_first_rootdir="/usr/jail"
jail_first_hostname="***.***.***" 
jail_first_ip=.127.0.0.2. # for one ip, use the same ip as host.
jail_first_exec="/bin/sh /etc/rc" 
jail_one_devfs_enable="YES"

start jail

/etc/rc.d/jail start

Setup ports (In jail)

portsnap fetch
portsnap extract

or

porsnap fetch extract

Install Linux Base (In jail and host)

cd /usr/ports/emulators/linux_base-fc4
sudo make install

Add linuxproc to jail, edit hosts /etc/fstab

jlinproc /usr/jail/compat/linux/proc linprocfs rw 0 0

Then mount (in host of course) NOTE: jlinprc in the line above can be changed.

mount jlinproc  

Please email jamesthefishy@gmail.com for errors.

Personal tools
Namespaces

Variants
Actions
Navigation
Indexes
SHellium Sites
Toolbox