Skip to content

Instantly share code, notes, and snippets.

@wisedier
Last active May 18, 2017 05:44
Show Gist options
  • Save wisedier/357183e6a637f2182d9c7afa26ee587f to your computer and use it in GitHub Desktop.
Save wisedier/357183e6a637f2182d9c7afa26ee587f to your computer and use it in GitHub Desktop.
nsjail command
#!/bin/sh
# alarm() doesn't work in nsjail. So you need to add -t option
nsjail -d --log /var/log/nsjail/contact -Ml --port 10001 -u 65534:10001 -g 65534:10001 \
--disable_clone_newnet -R /opt/challenges/contact -E PATH=/usr/local/bin:/usr/bin:/bin \
-E HOME=/opt/challenges/contact -R /bin/ -R /lib/ -R /lib32/ -R /lib64/ -R /usr/ -R /sbin/ \
-T /dev -R /dev/urandom -R /etc/ssl/certs -R /etc/resolv.conf -R /run/resolvconf/ -T /tmp/ \
-t 300 -- /opt/challenges/contact/contact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment