mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-20 09:10:15 +01:00
Merge branch 'BastilleBSD:master' into rdr-multiple-interfaces
This commit is contained in:
32
docs/chapters/subcommands/config.rst
Normal file
32
docs/chapters/subcommands/config.rst
Normal file
@@ -0,0 +1,32 @@
|
||||
=======
|
||||
config
|
||||
=======
|
||||
|
||||
Gets or sets properties for a target container.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
Usage: bastille config TARGET get|set propertyName [newValue]
|
||||
|
||||
Getting a property that *is* defined in jail.conf:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
ishmael ~ # bastille config azkaban get ip4.addr
|
||||
192.168.2.23
|
||||
|
||||
Getting a property that *is not* defined in jail.conf
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
ishmael ~ # bastille config azkaban get notaproperty
|
||||
not set
|
||||
|
||||
Setting a property:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
ishmael ~ # bastille config azkaban set ip4.addr 192.168.2.24
|
||||
A restart is required for the changes to be applied. See 'bastille restart azkaban'.
|
||||
|
||||
The restart message will appear every time a property is set.
|
||||
@@ -2,8 +2,7 @@
|
||||
console
|
||||
=======
|
||||
|
||||
This sub-command launches a login shell into the container. Default is password-less
|
||||
root login.
|
||||
This sub-command launches a login shell into the container. Default is password-less root login.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
@@ -11,6 +10,25 @@ root login.
|
||||
[folsom]:
|
||||
root@folsom:~ #
|
||||
|
||||
TARGET can also be a running jails JID value.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
ishmael ~ # bastille list
|
||||
JID IP Address Hostname Path
|
||||
1 10.1.2.3 ishmael /usr/local/bastille/jails/ishmael/root
|
||||
ishmael ~ # bastille console 1
|
||||
[ishmael]:
|
||||
root@ishmael:~ #
|
||||
|
||||
At this point you are logged in to the container and have full shell access. The
|
||||
system is yours to use and/or abuse as you like. Any changes made inside the
|
||||
container are limited to the container.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
"Usage: bastille console [option(s)] TARGET [user]"
|
||||
Options:
|
||||
|
||||
-a | --auto Auto mode. Start/stop jail(s) if required.
|
||||
-x | --debug Enable debug mode.
|
||||
|
||||
@@ -2,21 +2,31 @@
|
||||
cp
|
||||
==
|
||||
|
||||
This command allows efficiently copying files from host to container(s).
|
||||
This command allows copying files from host to jail(s).
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
ishmael ~ # bastille cp ALL /tmp/resolv.conf-cf etc/resolv.conf
|
||||
ishmael ~ # bastille cp ALL /tmp/resolv.conf-cf /etc/resolv.conf
|
||||
[bastion]:
|
||||
|
||||
/tmp/resolv.conf-cf -> /usr/local/bastille/jails/bastion/root/etc/resolv.conf
|
||||
[unbound0]:
|
||||
|
||||
/tmp/resolv.conf-cf -> /usr/local/bastille/jails/unbound0/root/etc/resolv.conf
|
||||
[unbound1]:
|
||||
|
||||
/tmp/resolv.conf-cf -> /usr/local/bastille/jails/unbound1/root/etc/resolv.conf
|
||||
[squid]:
|
||||
|
||||
/tmp/resolv.conf-cf -> /usr/local/bastille/jails/squid/root/etc/resolv.conf
|
||||
[nginx]:
|
||||
|
||||
/tmp/resolv.conf-cf -> /usr/local/bastille/jails/nginx/root/etc/resolv.conf
|
||||
[folsom]:
|
||||
/tmp/resolv.conf-cf -> /usr/local/bastille/jails/folsom/root/etc/resolv.conf
|
||||
|
||||
Unless you see errors reported in the output the `cp` was successful.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
ishmael ~ # bastille cp help
|
||||
Usage: bastille cp [option(s)] TARGET HOST_PATH JAIL_PATH
|
||||
Options:
|
||||
|
||||
-q | --quiet Suppress output.
|
||||
-x | --debug Enable debug mode.
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
htop
|
||||
====
|
||||
|
||||
This one runs `htop` inside the container.
|
||||
note: won't work if you don't have htop installed in the container.
|
||||
This command runs `htop` in the targeted jail.
|
||||
Requires htop to be installed in the jail.
|
||||
|
||||
|
||||
.. image:: ../../images/htop.png
|
||||
|
||||
30
docs/chapters/subcommands/jcp.rst
Normal file
30
docs/chapters/subcommands/jcp.rst
Normal file
@@ -0,0 +1,30 @@
|
||||
===
|
||||
jcp
|
||||
===
|
||||
|
||||
This command allows copying files from jail to jail(s).
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
ishmael ~ # bastille jcp bastion /tmp/resolv.conf-cf ALL /etc/resolv.conf
|
||||
[unbound0]:
|
||||
/usr/local/bastille/jails/bastion/root/tmp/resolv.conf-cf -> /usr/local/bastille/jails/unbound0/root/etc/resolv.conf
|
||||
[unbound1]:
|
||||
/usr/local/bastille/jails/bastion/root/tmp/resolv.conf-cf -> /usr/local/bastille/jails/unbound1/root/etc/resolv.conf
|
||||
[squid]:
|
||||
/usr/local/bastille/jails/bastion/root/tmp/resolv.conf-cf -> /usr/local/bastille/jails/squid/root/etc/resolv.conf
|
||||
[nginx]:
|
||||
/usr/local/bastille/jails/bastion/root/tmp/resolv.conf-cf -> /usr/local/bastille/jails/nginx/root/etc/resolv.conf
|
||||
[folsom]:
|
||||
/usr/local/bastille/jails/bastion/root/tmp/resolv.conf-cf -> /usr/local/bastille/jails/folsom/root/etc/resolv.conf
|
||||
|
||||
Unless you see errors reported in the output the `jcp` was successful.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
ishmael ~ # bastille jcp help
|
||||
Usage: bastille jcp [option(s)] SOURCE_JAIL JAIL_PATH DEST_JAIL JAIL_PATH
|
||||
Options:
|
||||
|
||||
-q | --quiet Suppress output.
|
||||
-x | --debug Enable debug mode.
|
||||
@@ -10,7 +10,7 @@ Syntax follows standard `/etc/fstab` format:
|
||||
|
||||
Usage: bastille mount TARGET HOST_PATH JAIL_PATH [filesystem_type options dump pass_number]
|
||||
|
||||
The 'options' string can include a comma-separated list of mount options, but must start with 'ro' or 'rw'.
|
||||
The 'options' string can include a comma-separated list of mount options, but must include one of (rw,ro,rq,sw,xx) according to fstab documentation.
|
||||
|
||||
Example: Mount a tmpfs filesystem with options.
|
||||
.. code-block:: shell
|
||||
|
||||
22
docs/chapters/subcommands/rcp.rst
Normal file
22
docs/chapters/subcommands/rcp.rst
Normal file
@@ -0,0 +1,22 @@
|
||||
===
|
||||
rcp
|
||||
===
|
||||
|
||||
This command allows copying files from jail to host.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
ishmael ~ # bastille rcp bastion /test/testfile.txt /tmp/testfile.txt
|
||||
[bastion]:
|
||||
/usr/local/bastille/jails/bastion/root/test/testfile.txt -> /tmp/testfile.txt
|
||||
|
||||
Unless you see errors reported in the output the `rcp` was successful.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
ishmael ~ # bastille rcp help
|
||||
Usage: bastille rcp [option(s)] TARGET JAIL_PATH HOST_PATH
|
||||
Options:
|
||||
|
||||
-q | --quiet Suppress output.
|
||||
-x | --debug Enable debug mode.
|
||||
@@ -2,7 +2,7 @@
|
||||
top
|
||||
===
|
||||
|
||||
This one runs `top` in that container.
|
||||
This command runs `top` in the targeted jail.
|
||||
|
||||
|
||||
.. image:: ../../images/top.png
|
||||
|
||||
Reference in New Issue
Block a user