Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. # make and copy dirs
  2. mkdir jail1 jail2
  3. cp -r newroot/* jail1/.
  4. cp -r newroot/* jail1/.
  5.  
  6. # create/remove jail defined in /etc/jail.conf
  7. sudo jail -c testjail
  8. sudo jail -r testjail
  9.  
  10. # create jail using command line args
  11. sudo jail -c path=/home/vagrant/testjail1 mount.devfs interface=em0 ip4.addr=10.0.2.16 allow.raw_sockets=1 command=/bin/sh
  12. sudo jail -c path=/home/vagrant/testjail2 mount.devfs interface=em0 ip4.addr=10.0.2.17 allow.raw_sockets=1 command=/bin/sh
  13.  
  14. # view processes with Jail ID (jid) etc
  15. ps -axo uid,pid,jid,args
  16.  
  17. # jail cleanup
  18. sudo ifconfig em0 -alias 10.0.2.16
  19. sudo umount /home/vagrant/jail2/dev
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement