2020-02-16 14:23:05 -07:00
|
|
|
Bastille
|
|
|
|
|
========
|
2019-12-07 17:48:06 -07:00
|
|
|
[Bastille](https://bastillebsd.org/) is an open-source system for automating
|
|
|
|
|
deployment and management of containerized applications on FreeBSD.
|
2018-04-06 13:40:48 -06:00
|
|
|
|
2019-12-07 17:48:06 -07:00
|
|
|
Looking for [Bastille Templates](https://gitlab.com/BastilleBSD-Templates/)?
|
2019-08-02 10:00:03 -06:00
|
|
|
|
2018-11-18 20:37:03 -07:00
|
|
|
Installation
|
2019-06-22 09:28:42 -06:00
|
|
|
============
|
2019-11-22 21:59:11 -07:00
|
|
|
Bastille is available in the official FreeBSD ports tree.
|
2018-11-18 20:37:03 -07:00
|
|
|
|
2019-06-22 09:28:42 -06:00
|
|
|
**pkg**
|
|
|
|
|
```shell
|
2019-03-11 17:51:32 -06:00
|
|
|
pkg install bastille
|
|
|
|
|
```
|
2018-11-18 20:37:03 -07:00
|
|
|
|
2019-06-22 09:28:42 -06:00
|
|
|
**ports**
|
|
|
|
|
```shell
|
2019-11-22 21:59:11 -07:00
|
|
|
portsnap fetch auto
|
2019-06-22 09:28:42 -06:00
|
|
|
make -C /usr/ports/sysutils/bastille install clean
|
2018-11-18 20:37:03 -07:00
|
|
|
```
|
|
|
|
|
|
2020-02-16 14:23:05 -07:00
|
|
|
**Git** (bleeding edge / unstable -- primarily for developers)
|
2019-11-28 09:21:13 -07:00
|
|
|
```shell
|
|
|
|
|
git clone https://github.com/BastilleBSD/bastille.git
|
|
|
|
|
cd bastille
|
|
|
|
|
make install
|
|
|
|
|
```
|
|
|
|
|
|
2019-11-23 13:50:55 -07:00
|
|
|
**enable at boot**
|
|
|
|
|
```shell
|
|
|
|
|
sysrc bastille_enable=YES
|
|
|
|
|
```
|
|
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
Basic Usage
|
|
|
|
|
-----------
|
2018-11-20 21:03:08 -07:00
|
|
|
```shell
|
2019-11-22 21:59:11 -07:00
|
|
|
Bastille is an open-source system for automating deployment and management of
|
|
|
|
|
containerized applications on FreeBSD.
|
|
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
Usage:
|
2019-11-22 21:59:11 -07:00
|
|
|
bastille command TARGET args
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
Available Commands:
|
2019-11-17 18:15:19 -04:00
|
|
|
bootstrap Bootstrap a FreeBSD release for container base.
|
2020-04-14 11:52:29 +02:00
|
|
|
clone Clone an existing container.
|
2019-11-17 18:15:19 -04:00
|
|
|
cmd Execute arbitrary command on targeted container(s).
|
2020-03-04 10:52:17 +01:00
|
|
|
clone Clone an existing container.
|
2019-11-17 18:15:19 -04:00
|
|
|
console Console into a running container.
|
2020-02-02 13:56:02 -07:00
|
|
|
convert Convert a thin container into a thick container.
|
2019-11-17 18:15:19 -04:00
|
|
|
cp cp(1) files from host to targeted container(s).
|
2020-02-02 13:56:02 -07:00
|
|
|
create Create a new thin or thick container.
|
|
|
|
|
destroy Destroy a stopped container or a bootstrapped release.
|
2020-02-16 14:23:05 -07:00
|
|
|
edit Edit container configuration files (advanced).
|
2020-02-02 13:56:02 -07:00
|
|
|
export Exports a container archive or image.
|
2018-11-07 10:36:54 -07:00
|
|
|
help Help about any command
|
|
|
|
|
htop Interactive process viewer (requires htop).
|
2020-02-02 13:56:02 -07:00
|
|
|
import Import a container archive or image.
|
|
|
|
|
limits Apply resources limits to targeted container(s). See rctl(8).
|
|
|
|
|
list List containers, releases, templates, logs, limits or backups.
|
2019-11-17 18:15:19 -04:00
|
|
|
pkg Manipulate binary packages within targeted container(s). See pkg(8).
|
2020-02-01 16:06:13 +00:00
|
|
|
rdr Redirect host port to container port.
|
2019-11-17 18:15:19 -04:00
|
|
|
restart Restart a running container.
|
2019-11-22 21:59:11 -07:00
|
|
|
service Manage services within targeted container(s).
|
2019-11-17 18:15:19 -04:00
|
|
|
start Start a stopped container.
|
|
|
|
|
stop Stop a running container.
|
|
|
|
|
sysrc Safely edit rc files within targeted container(s).
|
2020-02-02 13:56:02 -07:00
|
|
|
template Apply automation templates to targeted container(s).
|
2018-11-07 10:36:54 -07:00
|
|
|
top Display and update information about the top(1) cpu processes.
|
2019-11-17 18:15:19 -04:00
|
|
|
update Update container base -pX release.
|
|
|
|
|
upgrade Upgrade container release to X.Y-RELEASE.
|
2020-02-02 13:56:02 -07:00
|
|
|
verify Verify bootstrapped release or automation template.
|
2019-11-22 21:59:11 -07:00
|
|
|
zfs Manage (get|set) zfs attributes on targeted container(s).
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
Use "bastille -v|--version" for version information.
|
|
|
|
|
Use "bastille command -h|--help" for more information about a command.
|
2019-11-22 21:59:11 -07:00
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
```
|
|
|
|
|
|
2020-02-02 13:56:02 -07:00
|
|
|
## 0.6-beta
|
2019-11-22 21:59:11 -07:00
|
|
|
This document outlines the basic usage of the Bastille container management
|
2019-03-11 17:51:32 -06:00
|
|
|
framework. This release is still considered beta.
|
2018-04-07 14:57:48 -06:00
|
|
|
|
2019-06-22 09:28:42 -06:00
|
|
|
Network Requirements
|
|
|
|
|
====================
|
2019-11-22 21:59:11 -07:00
|
|
|
Several networking options can be performed regarding the user needs. Basic
|
|
|
|
|
containers can support IP alias networking, where the IP address is assigned to
|
|
|
|
|
the host interface and used by the container, generally known as "shared IP"
|
|
|
|
|
based containers.
|
|
|
|
|
|
|
|
|
|
If you administer your own network and can assign and remove unallocated IP
|
|
|
|
|
addresses, then "shared IP" is a simple method to get started. If this is the
|
|
|
|
|
case, skip ahead to ZFS Support.
|
2019-11-17 18:15:19 -04:00
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
If you are not the administator of the network, or perhaps you're in "the
|
|
|
|
|
cloud" someplace and are only provided a single IP4 address. In this situation
|
|
|
|
|
Bastille can create and attach containers to a private loopback interface. The
|
|
|
|
|
host system then acts as the firewall, permitting and denying traffic as
|
|
|
|
|
needed. (This method has been my primary method for years.)
|
|
|
|
|
|
|
|
|
|
**bastille0**
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
First, create the loopback interface:
|
2018-04-07 14:57:48 -06:00
|
|
|
|
|
|
|
|
```shell
|
2018-11-20 21:03:08 -07:00
|
|
|
ishmael ~ # sysrc cloned_interfaces+=lo1
|
2019-11-20 19:49:39 -07:00
|
|
|
ishmael ~ # sysrc ifconfig_lo1_name="bastille0"
|
2018-11-07 10:36:54 -07:00
|
|
|
ishmael ~ # service netif cloneup
|
2018-04-07 14:57:48 -06:00
|
|
|
```
|
|
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
Create the firewall config, or merge as necessary.
|
2019-06-22 09:28:42 -06:00
|
|
|
|
|
|
|
|
/etc/pf.conf
|
|
|
|
|
------------
|
2018-11-07 10:36:54 -07:00
|
|
|
```
|
|
|
|
|
ext_if="vtnet0"
|
2018-04-07 14:57:48 -06:00
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
set block-policy return
|
2018-11-07 10:36:54 -07:00
|
|
|
scrub in on $ext_if all fragment reassemble
|
|
|
|
|
set skip on lo
|
2019-11-28 09:21:13 -07:00
|
|
|
|
2019-11-25 15:38:40 -07:00
|
|
|
table <jails> persist
|
|
|
|
|
nat on $ext_if from <jails> to any -> ($ext_if)
|
2018-11-07 10:36:54 -07:00
|
|
|
|
2020-02-01 16:06:13 +00:00
|
|
|
## static rdr example
|
2020-02-19 08:34:23 +01:00
|
|
|
# rdr pass inet proto tcp from any to any port {80, 443} -> 10.17.89.45
|
2018-11-07 10:36:54 -07:00
|
|
|
|
2020-02-19 08:34:23 +01:00
|
|
|
## Enable dynamic rdr (see below)
|
2020-02-01 16:06:13 +00:00
|
|
|
rdr-anchor "rdr/*"
|
|
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
block in all
|
2018-11-07 10:36:54 -07:00
|
|
|
pass out quick modulate state
|
|
|
|
|
antispoof for $ext_if inet
|
|
|
|
|
pass in inet proto tcp from any to any port ssh flags S/SA keep state
|
2020-02-01 16:06:13 +00:00
|
|
|
|
2020-02-19 08:34:23 +01:00
|
|
|
## make sure you also open up ports that you are going to use for dynamic rdr
|
2020-02-01 16:06:13 +00:00
|
|
|
# pass in inet proto tcp from any to any port <rdr-start>:<rdr-end> flags S/SA keep state
|
|
|
|
|
# pass in inet proto udp from any to any port <rdr-start>:<rdr-end> flags S/SA keep state
|
|
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* Make sure to change the `ext_if` variable to match your host system interface.
|
|
|
|
|
* Make sure to include the last line (`port ssh`) or you'll end up locked
|
2019-11-22 21:59:11 -07:00
|
|
|
out of a remote system.
|
2018-11-07 10:36:54 -07:00
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
Note: if you have an existing firewall, the key lines for in/out traffic to
|
|
|
|
|
containers are:
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
```
|
2019-11-25 17:12:27 -07:00
|
|
|
table <jails> persist
|
|
|
|
|
nat on $ext_if from <jails> to any -> ($ext_if)
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
## rdr example
|
2019-06-22 09:28:42 -06:00
|
|
|
## rdr pass inet proto tcp from any to any port {80, 443} -> 10.17.89.45
|
2018-04-07 14:57:48 -06:00
|
|
|
```
|
|
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
The `nat` routes traffic from the loopback interface to the external interface
|
|
|
|
|
for outbound access.
|
2018-04-07 14:57:48 -06:00
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
The `rdr pass ...` will redirect traffic from the host firewall on port X to
|
2019-11-22 21:59:11 -07:00
|
|
|
the ip of container Y. The example shown redirects web traffic (80 & 443) to the
|
|
|
|
|
container at `10.17.89.45`.
|
2018-04-07 14:57:48 -06:00
|
|
|
|
2019-11-25 17:12:27 -07:00
|
|
|
Finally, enable and (re)start the firewall:
|
2018-04-07 14:57:48 -06:00
|
|
|
|
2020-04-14 11:52:29 +02:00
|
|
|
## dynamic rdr
|
2020-02-01 16:06:13 +00:00
|
|
|
|
2020-04-14 11:52:29 +02:00
|
|
|
The `rdr-anchor "rdr/*"` enables dynamic rdr rules to be setup using the
|
2020-02-01 16:06:13 +00:00
|
|
|
`bastille rdr` command at runtime - eg.
|
|
|
|
|
|
2020-02-01 16:12:20 +00:00
|
|
|
```
|
2020-02-02 00:28:02 +00:00
|
|
|
bastille rdr <jail> tcp 2001 22 # Redirects tcp port 2001 on host to 22 on jail
|
|
|
|
|
bastille rdr <jail> udp 2053 53 # Same for udp
|
|
|
|
|
bastille rdr <jail> list # List dynamic rdr rules
|
|
|
|
|
bastille rdr <jail> clear # Clear dynamic rdr rules
|
2020-02-01 16:12:20 +00:00
|
|
|
```
|
2020-02-01 16:06:13 +00:00
|
|
|
|
|
|
|
|
Note that if you are rediirecting ports where the host is also listening
|
2020-04-14 11:52:29 +02:00
|
|
|
(eg. ssh) you should make sure that the host service is not listening on
|
2020-02-01 16:06:13 +00:00
|
|
|
the cloned interface - eg. for ssh set sshd_flags in rc.conf
|
|
|
|
|
|
2020-02-01 16:12:20 +00:00
|
|
|
## Enable pf rules
|
|
|
|
|
|
2018-04-07 14:57:48 -06:00
|
|
|
```shell
|
2019-11-25 17:12:27 -07:00
|
|
|
ishmael ~ # sysrc pf_enable="YES"
|
2018-11-07 10:36:54 -07:00
|
|
|
ishmael ~ # service pf restart
|
2018-04-07 14:57:48 -06:00
|
|
|
```
|
|
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
At this point you'll likely be disconnected from the host. Reconnect the ssh
|
|
|
|
|
session and continue.
|
|
|
|
|
|
|
|
|
|
This step only needs to be done once in order to prepare the host.
|
|
|
|
|
|
|
|
|
|
|
2019-06-22 09:28:42 -06:00
|
|
|
ZFS support
|
|
|
|
|
===========
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
Bastille 0.4 added initial support for ZFS. `bastille bootstrap` and `bastille
|
|
|
|
|
create` will generate ZFS volumes based on settings found in the
|
|
|
|
|
`bastille.conf`. This section outlines how to enable and configure Bastille for
|
|
|
|
|
ZFS.
|
|
|
|
|
|
|
|
|
|
Two values are required for Bastille to use ZFS. The default values in the
|
|
|
|
|
`bastille.conf` are empty. Populate these two to enable ZFS.
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
## ZFS options
|
|
|
|
|
bastille_zfs_enable="" ## default: ""
|
|
|
|
|
bastille_zfs_zpool="" ## default: ""
|
|
|
|
|
bastille_zfs_prefix="bastille" ## default: "${bastille_zfs_zpool}/bastille"
|
|
|
|
|
bastille_zfs_mountpoint=${bastille_prefix} ## default: "${bastille_prefix}"
|
|
|
|
|
bastille_zfs_options="-o compress=lz4 -o atime=off" ## default: "-o compress=lz4 -o atime=off"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Example**
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
ishmael ~ # sysrc -f /usr/local/etc/bastille/bastille.conf bastille_zfs_enable=YES
|
|
|
|
|
ishmael ~ # sysrc -f /usr/local/etc/bastille/bastille.conf bastille_zfs_zpool=ZPOOL_NAME
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Replace `ZPOOL_NAME` with the zpool you want Bastille to use. Tip: `zpool list`
|
2019-11-22 21:59:11 -07:00
|
|
|
and `zpool status` will help. If you get 'no pools available' you are likely
|
|
|
|
|
not using ZFS and can safely ignore these settings.
|
2019-06-22 09:28:42 -06:00
|
|
|
|
|
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
bastille bootstrap
|
|
|
|
|
------------------
|
2019-11-22 21:59:11 -07:00
|
|
|
Before you can begin creating containers, Bastille needs to "bootstrap" a
|
|
|
|
|
release. Current supported releases are 11.3-RELEASE, 12.0-RELEASE and
|
|
|
|
|
12.1-RELEASE.
|
2018-11-07 10:36:54 -07:00
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
**Important: If you need ZFS support see the above section BEFORE
|
|
|
|
|
bootstrapping.**
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
To `bootstrap` a release, run the bootstrap sub-command with the
|
|
|
|
|
release version as the argument.
|
2018-04-07 14:57:48 -06:00
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
**FreeBSD 11.3-RELEASE**
|
|
|
|
|
```shell
|
|
|
|
|
ishmael ~ # bastille bootstrap 11.3-RELEASE
|
|
|
|
|
```
|
2019-06-22 09:28:42 -06:00
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
**FreeBSD 12.1-RELEASE**
|
2019-06-22 09:28:42 -06:00
|
|
|
```shell
|
2019-11-22 21:59:11 -07:00
|
|
|
ishmael ~ # bastille bootstrap 12.1-RELEASE
|
2018-04-07 14:57:48 -06:00
|
|
|
```
|
|
|
|
|
|
2020-01-26 19:45:26 -04:00
|
|
|
**HardenedBSD 11-STABLE-BUILD-XX**
|
2019-06-22 09:28:42 -06:00
|
|
|
```shell
|
2020-01-26 19:45:26 -04:00
|
|
|
ishmael ~ # bastille bootstrap 11-STABLE-BUILD-XX
|
2019-06-22 09:28:42 -06:00
|
|
|
```
|
|
|
|
|
|
2020-01-26 19:45:26 -04:00
|
|
|
**HardenedBSD 12-STABLE-BUILD-XX**
|
2019-06-22 09:28:42 -06:00
|
|
|
```shell
|
2020-01-26 19:45:26 -04:00
|
|
|
ishmael ~ # bastille bootstrap 12-STABLE-BUILD-XX
|
2019-06-22 09:28:42 -06:00
|
|
|
```
|
|
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
> `bastille bootstrap RELEASE update` to apply updates automatically at bootstrap.
|
|
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
This command will ensure the required directory structures are in place and
|
|
|
|
|
download the requested release. For each requested release, `bootstrap` will
|
2019-06-22 09:28:42 -06:00
|
|
|
download the base.txz. If you need more than base (eg; ports, lib32, src) you
|
|
|
|
|
can configure the `bastille_bootstrap_archives` in the configuration file. By
|
|
|
|
|
default this value is set to "base". Additional components are added, space
|
2019-11-22 21:59:11 -07:00
|
|
|
separated, without file extension.
|
2019-06-22 09:28:42 -06:00
|
|
|
|
|
|
|
|
Bastille will attempt to fetch the required archives if they are not found in
|
2020-04-14 11:52:29 +02:00
|
|
|
the `cache/$RELEASE` directory.
|
2018-11-07 10:36:54 -07:00
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
Downloaded artifacts are stored in the `cache/RELEASE` directory. "bootstrapped"
|
|
|
|
|
releases are stored in `releases/RELEASE`.
|
2018-11-07 10:36:54 -07:00
|
|
|
|
2019-06-22 09:28:42 -06:00
|
|
|
Advanced: If you want to create your own custom base.txz, or use an unsupported
|
2019-11-22 21:59:11 -07:00
|
|
|
variant of FreeBSD, drop your own base.txz in `cache/RELEASE/base.txz` and
|
2019-06-22 09:28:42 -06:00
|
|
|
`bastille bootstrap` will attempt to extract and use it.
|
|
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
The bootstrap subcommand is generally only used once to prepare the system. The
|
2019-06-22 09:28:42 -06:00
|
|
|
other use cases for the bootstrap command are when a new FreeBSD version is
|
2019-11-22 21:59:11 -07:00
|
|
|
released and you want to start building containers on that version, or
|
|
|
|
|
bootstrapping templates from GitHub or GitLab.
|
2018-11-07 10:36:54 -07:00
|
|
|
|
2019-06-22 09:28:42 -06:00
|
|
|
See `bastille update` to ensure your bootstrapped releases include the latest
|
|
|
|
|
patches.
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
bastille create
|
|
|
|
|
---------------
|
2019-11-22 21:59:11 -07:00
|
|
|
`bastille create` uses a bootstrapped release to create a lightweight container
|
|
|
|
|
system. To create a container simply provide a name, release and a private
|
|
|
|
|
(rfc1918) IP address. Optionally provide a network interface name to attach the
|
|
|
|
|
IP at container creation.
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
- name
|
|
|
|
|
- release (bootstrapped)
|
2020-02-16 14:23:05 -07:00
|
|
|
- ip (ip4 or ip6)
|
2019-11-22 21:59:11 -07:00
|
|
|
- interface (optional)
|
2018-04-07 14:57:48 -06:00
|
|
|
|
2019-06-22 09:28:42 -06:00
|
|
|
|
2020-02-16 14:23:05 -07:00
|
|
|
**ip4**
|
2018-04-07 14:57:48 -06:00
|
|
|
```shell
|
2020-02-16 14:23:05 -07:00
|
|
|
ishmael ~ # bastille create folsom 12.1-RELEASE 10.17.89.10
|
2019-11-22 21:59:11 -07:00
|
|
|
Valid: (10.17.89.10).
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
NAME: folsom.
|
2019-06-22 09:28:42 -06:00
|
|
|
IP: 10.17.89.10.
|
2020-02-16 14:23:05 -07:00
|
|
|
RELEASE: 12.1-RELEASE.
|
2019-11-22 21:59:11 -07:00
|
|
|
|
|
|
|
|
syslogd_flags: -s -> -ss
|
|
|
|
|
sendmail_enable: NO -> NONE
|
|
|
|
|
cron_flags: -> -J 60
|
2018-04-07 14:57:48 -06:00
|
|
|
```
|
|
|
|
|
|
2020-02-16 14:23:05 -07:00
|
|
|
This command will create a 12.1-RELEASE container assigning the 10.17.89.10 ip
|
2019-06-22 09:28:42 -06:00
|
|
|
address to the new system.
|
2018-11-07 10:36:54 -07:00
|
|
|
|
2020-02-16 14:23:05 -07:00
|
|
|
**ip6**
|
|
|
|
|
```shell
|
|
|
|
|
ishmael ~ # bastille create folsom 12.1-RELEASE fd35:f1fd:2cb6:6c5c::13
|
|
|
|
|
Valid: (fd35:f1fd:2cb6:6c5c::13).
|
|
|
|
|
|
|
|
|
|
NAME: folsom.
|
|
|
|
|
IP: fd35:f1fd:2cb6:6c5c::13
|
|
|
|
|
RELEASE: 12.1-RELEASE.
|
|
|
|
|
|
|
|
|
|
syslogd_flags: -s -> -ss
|
|
|
|
|
sendmail_enable: NO -> NONE
|
|
|
|
|
cron_flags: -> -J 60
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
This command will create a 12.1-RELEASE container assigning the
|
|
|
|
|
fd35:f1fd:2cb6:6c5c::13 ip address to the new system.
|
|
|
|
|
|
2020-02-16 15:43:13 -07:00
|
|
|
**VNET**
|
|
|
|
|
```shell
|
|
|
|
|
ishmael ~ # bastille create -V vnetjail 12.1-RELEASE 192.168.87.55/24 em0
|
|
|
|
|
Valid: (192.168.87.55/24).
|
|
|
|
|
Valid: (em0).
|
|
|
|
|
|
|
|
|
|
NAME: vnettest0.
|
|
|
|
|
IP: 192.168.87.55/24.
|
|
|
|
|
INTERFACE: em0.
|
|
|
|
|
RELEASE: 12.1-RELEASE.
|
|
|
|
|
|
|
|
|
|
syslogd_flags: -s -> -ss
|
|
|
|
|
sendmail_enable: NO -> NONE
|
|
|
|
|
cron_flags: -> -J 60
|
|
|
|
|
ifconfig_e0b_bastille0_name: -> vnet0
|
|
|
|
|
ifconfig_vnet0: -> inet 192.168.87.55/24
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
This command will create a 12.1-RELEASE container assigning the
|
|
|
|
|
192.168.87.55/24 ip address to the new system.
|
|
|
|
|
|
|
|
|
|
VNET-enabled containers are attached to a virtual bridge interface for
|
|
|
|
|
connectivity. This bridge interface is defined by the interface argument in the
|
|
|
|
|
create command (in this case, em0).
|
|
|
|
|
|
|
|
|
|
VNET also requires a custom `devfs` ruleset. Create the file as needed on the host system:
|
|
|
|
|
|
|
|
|
|
**/etc/devfs.rules**
|
|
|
|
|
```
|
|
|
|
|
[bastille_vnet=13]
|
|
|
|
|
add include $devfsrules_hide_all
|
|
|
|
|
add include $devfsrules_unhide_basic
|
|
|
|
|
add include $devfsrules_unhide_login
|
|
|
|
|
add include $devfsrules_jail
|
|
|
|
|
add path 'bpf*' unhide
|
|
|
|
|
```
|
|
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
Optionally `bastille create [ -T | --thick ]` will create a container with a
|
|
|
|
|
private base. This is sometimes referred to as a "thick" container (whereas the
|
|
|
|
|
shared base container is a "thin").
|
2019-11-17 18:15:19 -04:00
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
ishmael ~ # bastille create -T folsom 12.0-RELEASE 10.17.89.10
|
|
|
|
|
```
|
|
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
I recommend using private (rfc1918) ip address ranges for your containers.
|
2018-11-07 10:36:54 -07:00
|
|
|
These ranges include:
|
|
|
|
|
|
|
|
|
|
- 10.0.0.0/8
|
|
|
|
|
- 172.16.0.0/12
|
|
|
|
|
- 192.168.0.0/16
|
|
|
|
|
|
2019-06-22 09:28:42 -06:00
|
|
|
If your Bastille host also uses private (rfc1918) addresses, use a different
|
2019-11-22 21:59:11 -07:00
|
|
|
range for your containers. ie; Host uses 192.168.0.0/16, containers use 10.0.0.0/8.
|
2019-06-22 09:28:42 -06:00
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
Bastille does its best to validate the submitted ip is valid. I generally use
|
|
|
|
|
the 10.0.0.0/8 range for containers.
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
bastille start
|
|
|
|
|
--------------
|
2019-11-22 21:59:11 -07:00
|
|
|
To start a containers you can use the `bastille start` command.
|
2018-04-07 14:57:48 -06:00
|
|
|
|
|
|
|
|
```shell
|
2018-11-07 10:36:54 -07:00
|
|
|
ishmael ~ # bastille start folsom
|
|
|
|
|
[folsom]:
|
|
|
|
|
folsom: created
|
|
|
|
|
|
2018-04-07 14:57:48 -06:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
bastille stop
|
|
|
|
|
-------------
|
2019-11-22 21:59:11 -07:00
|
|
|
To stop a containers you can use the `bastille stop` command.
|
2018-04-07 14:57:48 -06:00
|
|
|
|
|
|
|
|
```shell
|
2018-11-07 10:36:54 -07:00
|
|
|
ishmael ~ # bastille stop folsom
|
|
|
|
|
[folsom]:
|
|
|
|
|
folsom: removed
|
|
|
|
|
|
2018-04-07 14:57:48 -06:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
bastille restart
|
|
|
|
|
----------------
|
2019-11-22 21:59:11 -07:00
|
|
|
To restart a container you can use the `bastille restart` command.
|
2018-04-07 14:57:48 -06:00
|
|
|
|
|
|
|
|
```shell
|
2018-11-07 10:36:54 -07:00
|
|
|
ishmael ~ # bastille restart folsom
|
|
|
|
|
[folsom]:
|
|
|
|
|
folsom: removed
|
2018-04-07 16:58:11 -06:00
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
[folsom]:
|
|
|
|
|
folsom: created
|
2018-04-07 16:58:11 -06:00
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
```
|
2018-04-07 16:58:11 -06:00
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
bastille list
|
|
|
|
|
-------------
|
|
|
|
|
This sub-command will show you the running containers on your system.
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
ishmael ~ # bastille list
|
|
|
|
|
JID IP Address Hostname Path
|
|
|
|
|
bastion 10.17.89.65 bastion /usr/local/bastille/jails/bastion/root
|
|
|
|
|
unbound0 10.17.89.60 unbound0 /usr/local/bastille/jails/unbound0/root
|
|
|
|
|
unbound1 10.17.89.61 unbound1 /usr/local/bastille/jails/unbound1/root
|
|
|
|
|
squid 10.17.89.30 squid /usr/local/bastille/jails/squid/root
|
|
|
|
|
nginx 10.17.89.45 nginx /usr/local/bastille/jails/nginx/root
|
|
|
|
|
folsom 10.17.89.10 folsom /usr/local/bastille/jails/folsom/root
|
|
|
|
|
```
|
|
|
|
|
|
2019-11-23 12:56:21 -07:00
|
|
|
You can also list non-running containers with `bastille list containers`. In
|
|
|
|
|
the same manner you can list archived `logs`, downloaded `templates`, and
|
2020-02-02 13:56:02 -07:00
|
|
|
`releases` and `backups`. Providing the `-j` flag to list alone will result in
|
|
|
|
|
JSON output.
|
2019-11-22 21:59:11 -07:00
|
|
|
|
2018-04-07 16:58:11 -06:00
|
|
|
|
2019-06-23 08:51:47 -06:00
|
|
|
bastille service
|
|
|
|
|
----------------
|
2019-11-22 21:59:11 -07:00
|
|
|
To restart services inside a containers you can use the `bastille service`
|
|
|
|
|
command.
|
2019-06-23 08:51:47 -06:00
|
|
|
|
|
|
|
|
```shell
|
2019-11-22 21:59:11 -07:00
|
|
|
ishmael ~ # bastille service folsom postfix restart
|
2019-06-23 08:51:47 -06:00
|
|
|
[folsom]
|
|
|
|
|
postfix/postfix-script: stopping the Postfix mail system
|
|
|
|
|
postfix/postfix-script: starting the Postfix mail system
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
bastille cmd
|
|
|
|
|
------------
|
2019-11-22 21:59:11 -07:00
|
|
|
To execute commands within the container you can use `bastille cmd`.
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
```shell
|
2019-11-22 21:59:11 -07:00
|
|
|
ishmael ~ # bastille cmd folsom ps -auxw
|
2018-11-07 10:36:54 -07:00
|
|
|
[folsom]:
|
|
|
|
|
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
|
|
|
|
|
root 71464 0.0 0.0 14536 2000 - IsJ 4:52PM 0:00.00 /usr/sbin/syslogd -ss
|
|
|
|
|
root 77447 0.0 0.0 16632 2140 - SsJ 4:52PM 0:00.00 /usr/sbin/cron -s
|
|
|
|
|
root 80591 0.0 0.0 18784 2340 1 R+J 4:53PM 0:00.00 ps -auxw
|
2018-04-07 16:58:11 -06:00
|
|
|
|
2018-04-07 14:57:48 -06:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
bastille pkg
|
|
|
|
|
------------
|
2019-11-22 21:59:11 -07:00
|
|
|
To manage binary packages within the container use `bastille pkg`.
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
```shell
|
2019-11-22 21:59:11 -07:00
|
|
|
ishmael ~ # bastille pkg folsom install vim-console git-lite zsh
|
2018-11-07 10:36:54 -07:00
|
|
|
[folsom]:
|
|
|
|
|
Updating FreeBSD repository catalogue...
|
|
|
|
|
[folsom] Fetching meta.txz: 100% 944 B 0.9kB/s 00:01
|
2019-11-22 21:59:11 -07:00
|
|
|
[folsom] Fetching packagesite.txz: 100% 6 MiB 6.6MB/s 00:01
|
2018-11-07 10:36:54 -07:00
|
|
|
Processing entries: 100%
|
2019-11-22 21:59:11 -07:00
|
|
|
FreeBSD repository update completed. 32617 packages processed.
|
2018-11-07 10:36:54 -07:00
|
|
|
All repositories are up to date.
|
|
|
|
|
Updating database digests format: 100%
|
|
|
|
|
The following 10 package(s) will be affected (of 0 checked):
|
|
|
|
|
|
|
|
|
|
New packages to be INSTALLED:
|
2019-11-22 21:59:11 -07:00
|
|
|
vim-console: 8.1.1954
|
|
|
|
|
git-lite: 2.23.0
|
|
|
|
|
zsh: 5.7.1_1
|
|
|
|
|
expat: 2.2.8
|
|
|
|
|
curl: 7.66.0
|
|
|
|
|
libnghttp2: 1.39.2
|
|
|
|
|
ca_root_nss: 3.47.1
|
|
|
|
|
pcre: 8.43_2
|
|
|
|
|
gettext-runtime: 0.20.1
|
2018-11-07 10:36:54 -07:00
|
|
|
indexinfo: 0.3.1
|
|
|
|
|
|
|
|
|
|
Number of packages to be installed: 10
|
|
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
The process will require 87 MiB more space.
|
|
|
|
|
18 MiB to be downloaded.
|
2018-11-07 10:36:54 -07:00
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
Proceed with this action? [y/N]:
|
|
|
|
|
...[snip]...
|
2018-11-07 10:36:54 -07:00
|
|
|
```
|
2018-04-07 14:57:48 -06:00
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
The PKG sub-command can, of course, do more than just `install`. The
|
|
|
|
|
expectation is that you can fully leverage the pkg manager. This means,
|
2019-06-22 09:28:42 -06:00
|
|
|
`install`, `update`, `upgrade`, `audit`, `clean`, `autoremove`, etc.
|
2018-04-07 14:57:48 -06:00
|
|
|
|
|
|
|
|
```shell
|
2018-11-07 10:36:54 -07:00
|
|
|
ishmael ~ # bastille pkg ALL upgrade
|
|
|
|
|
[bastion]:
|
2019-03-11 17:51:32 -06:00
|
|
|
Updating pkg.bastillebsd.org repository catalogue...
|
2018-11-07 10:36:54 -07:00
|
|
|
[bastion] Fetching meta.txz: 100% 560 B 0.6kB/s 00:01
|
|
|
|
|
[bastion] Fetching packagesite.txz: 100% 118 KiB 121.3kB/s 00:01
|
|
|
|
|
Processing entries: 100%
|
2019-03-11 17:51:32 -06:00
|
|
|
pkg.bastillebsd.org repository update completed. 493 packages processed.
|
2018-11-07 10:36:54 -07:00
|
|
|
All repositories are up to date.
|
|
|
|
|
Checking for upgrades (1 candidates): 100%
|
|
|
|
|
Processing candidates (1 candidates): 100%
|
|
|
|
|
Checking integrity... done (0 conflicting)
|
|
|
|
|
Your packages are up to date.
|
|
|
|
|
|
|
|
|
|
[unbound0]:
|
2019-03-11 17:51:32 -06:00
|
|
|
Updating pkg.bastillebsd.org repository catalogue...
|
2018-11-07 10:36:54 -07:00
|
|
|
[unbound0] Fetching meta.txz: 100% 560 B 0.6kB/s 00:01
|
|
|
|
|
[unbound0] Fetching packagesite.txz: 100% 118 KiB 121.3kB/s 00:01
|
|
|
|
|
Processing entries: 100%
|
2019-03-11 17:51:32 -06:00
|
|
|
pkg.bastillebsd.org repository update completed. 493 packages processed.
|
2018-11-07 10:36:54 -07:00
|
|
|
All repositories are up to date.
|
|
|
|
|
Checking for upgrades (0 candidates): 100%
|
|
|
|
|
Processing candidates (0 candidates): 100%
|
|
|
|
|
Checking integrity... done (0 conflicting)
|
|
|
|
|
Your packages are up to date.
|
|
|
|
|
|
|
|
|
|
[unbound1]:
|
2019-03-11 17:51:32 -06:00
|
|
|
Updating pkg.bastillebsd.org repository catalogue...
|
2018-11-07 10:36:54 -07:00
|
|
|
[unbound1] Fetching meta.txz: 100% 560 B 0.6kB/s 00:01
|
|
|
|
|
[unbound1] Fetching packagesite.txz: 100% 118 KiB 121.3kB/s 00:01
|
|
|
|
|
Processing entries: 100%
|
2019-03-11 17:51:32 -06:00
|
|
|
pkg.bastillebsd.org repository update completed. 493 packages processed.
|
2018-11-07 10:36:54 -07:00
|
|
|
All repositories are up to date.
|
|
|
|
|
Checking for upgrades (0 candidates): 100%
|
|
|
|
|
Processing candidates (0 candidates): 100%
|
|
|
|
|
Checking integrity... done (0 conflicting)
|
|
|
|
|
Your packages are up to date.
|
|
|
|
|
|
|
|
|
|
[squid]:
|
2019-03-11 17:51:32 -06:00
|
|
|
Updating pkg.bastillebsd.org repository catalogue...
|
2018-11-07 10:36:54 -07:00
|
|
|
[squid] Fetching meta.txz: 100% 560 B 0.6kB/s 00:01
|
|
|
|
|
[squid] Fetching packagesite.txz: 100% 118 KiB 121.3kB/s 00:01
|
|
|
|
|
Processing entries: 100%
|
2019-03-11 17:51:32 -06:00
|
|
|
pkg.bastillebsd.org repository update completed. 493 packages processed.
|
2018-11-07 10:36:54 -07:00
|
|
|
All repositories are up to date.
|
|
|
|
|
Checking for upgrades (0 candidates): 100%
|
|
|
|
|
Processing candidates (0 candidates): 100%
|
|
|
|
|
Checking integrity... done (0 conflicting)
|
|
|
|
|
Your packages are up to date.
|
|
|
|
|
|
|
|
|
|
[nginx]:
|
2019-03-11 17:51:32 -06:00
|
|
|
Updating pkg.bastillebsd.org repository catalogue...
|
2018-11-07 10:36:54 -07:00
|
|
|
[nginx] Fetching meta.txz: 100% 560 B 0.6kB/s 00:01
|
|
|
|
|
[nginx] Fetching packagesite.txz: 100% 118 KiB 121.3kB/s 00:01
|
|
|
|
|
Processing entries: 100%
|
2019-03-11 17:51:32 -06:00
|
|
|
pkg.bastillebsd.org repository update completed. 493 packages processed.
|
2018-11-07 10:36:54 -07:00
|
|
|
All repositories are up to date.
|
|
|
|
|
Checking for upgrades (1 candidates): 100%
|
|
|
|
|
Processing candidates (1 candidates): 100%
|
|
|
|
|
The following 1 package(s) will be affected (of 0 checked):
|
|
|
|
|
|
|
|
|
|
Installed packages to be UPGRADED:
|
|
|
|
|
nginx-lite: 1.14.0_14,2 -> 1.14.1,2
|
|
|
|
|
|
|
|
|
|
Number of packages to be upgraded: 1
|
|
|
|
|
|
|
|
|
|
315 KiB to be downloaded.
|
|
|
|
|
|
|
|
|
|
Proceed with this action? [y/N]: y
|
|
|
|
|
[nginx] [1/1] Fetching nginx-lite-1.14.1,2.txz: 100% 315 KiB 322.8kB/s 00:01
|
|
|
|
|
Checking integrity... done (0 conflicting)
|
|
|
|
|
[nginx] [1/1] Upgrading nginx-lite from 1.14.0_14,2 to 1.14.1,2...
|
|
|
|
|
===> Creating groups.
|
|
|
|
|
Using existing group 'www'.
|
|
|
|
|
===> Creating users
|
|
|
|
|
Using existing user 'www'.
|
|
|
|
|
[nginx] [1/1] Extracting nginx-lite-1.14.1,2: 100%
|
|
|
|
|
You may need to manually remove /usr/local/etc/nginx/nginx.conf if it is no longer needed.
|
2018-04-07 14:57:48 -06:00
|
|
|
```
|
|
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
bastille destroy
|
|
|
|
|
----------------
|
2019-11-22 21:59:11 -07:00
|
|
|
Containers can be destroyed and thrown away just as easily as they were
|
|
|
|
|
created. Note: containers must be stopped before destroyed.
|
2018-04-07 14:57:48 -06:00
|
|
|
|
|
|
|
|
```shell
|
2018-11-07 10:36:54 -07:00
|
|
|
ishmael ~ # bastille stop folsom
|
|
|
|
|
[folsom]:
|
|
|
|
|
folsom: removed
|
|
|
|
|
|
|
|
|
|
ishmael ~ # bastille destroy folsom
|
2019-11-22 21:59:11 -07:00
|
|
|
Deleting Container: folsom.
|
|
|
|
|
Note: container console logs not destroyed.
|
2018-11-07 10:36:54 -07:00
|
|
|
/usr/local/bastille/logs/folsom_console.log
|
|
|
|
|
|
2018-04-07 14:57:48 -06:00
|
|
|
```
|
|
|
|
|
|
2018-11-13 10:38:33 -07:00
|
|
|
bastille template
|
|
|
|
|
-----------------
|
2019-11-23 13:50:55 -07:00
|
|
|
Looking for ready made CI/CD validated [Bastille
|
|
|
|
|
Templates](https://gitlab.com/BastilleBSD-Templates)?
|
|
|
|
|
|
2018-11-13 10:38:33 -07:00
|
|
|
Bastille supports a templating system allowing you to apply files, pkgs and
|
2019-11-22 21:59:11 -07:00
|
|
|
execute commands inside the container automatically.
|
2018-11-13 10:38:33 -07:00
|
|
|
|
2020-01-26 12:43:45 -07:00
|
|
|
Currently supported template hooks are: `LIMITS`, `INCLUDE`, `PRE`, `FSTAB`,
|
|
|
|
|
`PKG`, `OVERLAY`, `SYSRC`, `SERVICE`, `CMD`.
|
2020-01-12 07:32:10 -07:00
|
|
|
Planned template hooks include: `PF`, `LOG`
|
2018-11-13 10:38:33 -07:00
|
|
|
|
|
|
|
|
Templates are created in `${bastille_prefix}/templates` and can leverage any of
|
2020-01-12 07:32:10 -07:00
|
|
|
the template hooks. Simply create a new directory in the format project/repo,
|
|
|
|
|
ie; `username/base-template`
|
2018-11-13 10:38:33 -07:00
|
|
|
|
|
|
|
|
```shell
|
2020-01-12 07:32:10 -07:00
|
|
|
mkdir -p /usr/local/bastille/templates/username/base-template
|
2018-11-13 10:38:33 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
To leverage a template hook, create an UPPERCASE file in the root of the
|
|
|
|
|
template directory named after the hook you want to execute. eg;
|
|
|
|
|
|
|
|
|
|
```shell
|
2020-01-12 07:32:10 -07:00
|
|
|
echo "zsh vim-console git-lite htop" > /usr/local/bastille/templates/username/base-template/PKG
|
|
|
|
|
echo "/usr/bin/chsh -s /usr/local/bin/zsh" > /usr/local/bastille/templates/username/base-template/CMD
|
|
|
|
|
echo "usr" > /usr/local/bastille/templates/username/base-template/OVERLAY
|
2018-11-13 10:38:33 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Template hooks are executed in specific order and require specific syntax to
|
2020-01-12 07:32:10 -07:00
|
|
|
work as expected. This table outlines that order and those requirements:
|
|
|
|
|
|
|
|
|
|
| SUPPORTED | format | example |
|
|
|
|
|
|-----------|---------------------|------------------------------------------------|
|
2020-01-26 12:43:45 -07:00
|
|
|
| LIMITS | resource value | memoryuse 1G |
|
2020-01-12 07:32:10 -07:00
|
|
|
| INCLUDE | template path/URL | http?://TEMPLATE_URL or username/base-template |
|
|
|
|
|
| PRE | /bin/sh command | mkdir -p /usr/local/path |
|
|
|
|
|
| FSTAB | fstab syntax | /host/path container/path nullfs ro 0 0 |
|
|
|
|
|
| PKG | port/pkg name(s) | vim-console zsh git-lite tree htop |
|
|
|
|
|
| OVERLAY | paths (one/line) | etc usr |
|
|
|
|
|
| SYSRC | sysrc command(s) | nginx_enable=YES |
|
|
|
|
|
| SERVICE | service command(s) | nginx restart |
|
|
|
|
|
| CMD | /bin/sh command | /usr/bin/chsh -s /usr/local/bin/zsh |
|
2019-03-11 17:51:32 -06:00
|
|
|
|
|
|
|
|
| PLANNED | format | example |
|
|
|
|
|
|---------|------------------|----------------------------------------------------------------|
|
2020-02-16 14:23:05 -07:00
|
|
|
| RDR | pf rdr entry | rdr pass inet proto tcp from any to any port 80 -> 10.17.89.80 |
|
2019-03-11 17:51:32 -06:00
|
|
|
| LOG | path | /var/log/nginx/access.log |
|
2018-11-20 21:03:08 -07:00
|
|
|
|
|
|
|
|
Note: SYSRC requires NO quotes or that quotes (`"`) be escaped. ie; `\"`)
|
2018-11-13 10:38:33 -07:00
|
|
|
|
|
|
|
|
In addition to supporting template hooks, Bastille supports overlaying files
|
2019-11-22 21:59:11 -07:00
|
|
|
into the container. This is done by placing the files in their full path, using the
|
2018-11-13 10:38:33 -07:00
|
|
|
template directory as "/".
|
|
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
An example here may help. Think of
|
|
|
|
|
`/usr/local/bastille/templates/username/base`, our example template, as the
|
|
|
|
|
root of our filesystem overlay. If you create an `etc/hosts` or
|
2020-01-12 07:32:10 -07:00
|
|
|
`etc/resolv.conf` inside the base template directory, these can be overlayed
|
2019-11-22 21:59:11 -07:00
|
|
|
into your container.
|
2018-11-13 10:38:33 -07:00
|
|
|
|
|
|
|
|
Note: due to the way FreeBSD segregates user-space, the majority of your
|
|
|
|
|
overlayed template files will be in `usr/local`. The few general
|
2020-01-12 07:32:10 -07:00
|
|
|
exceptions are the `etc/hosts`, `etc/resolv.conf`, and `etc/rc.conf.local`.
|
2018-11-13 10:38:33 -07:00
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
After populating `usr/local/` with custom config files that your container will
|
|
|
|
|
use, be sure to include `usr` in the template OVERLAY definition. eg;
|
2018-11-13 10:38:33 -07:00
|
|
|
|
|
|
|
|
```shell
|
2019-11-22 21:59:11 -07:00
|
|
|
echo "etc" > /usr/local/bastille/templates/username/base/OVERLAY
|
|
|
|
|
echo "usr" >> /usr/local/bastille/templates/username/base/OVERLAY
|
2018-11-13 10:38:33 -07:00
|
|
|
```
|
|
|
|
|
|
2019-11-15 16:38:00 +01:00
|
|
|
The above example will include anything under "etc" and "usr" inside
|
2018-11-13 10:38:33 -07:00
|
|
|
the template. You do not need to list individual files. Just include the
|
|
|
|
|
top-level directory name.
|
|
|
|
|
|
2019-03-11 17:51:32 -06:00
|
|
|
|
2018-11-13 10:38:33 -07:00
|
|
|
Applying Templates
|
|
|
|
|
------------------
|
|
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
Containers must be running to apply templates.
|
2018-11-13 10:38:33 -07:00
|
|
|
|
|
|
|
|
Bastille includes a `template` sub-command. This sub-command requires a target
|
|
|
|
|
and a template name. As covered in the previous section, template names
|
|
|
|
|
correspond to directory names in the `bastille/templates` directory.
|
|
|
|
|
|
|
|
|
|
```shell
|
2019-11-22 21:59:11 -07:00
|
|
|
ishmael ~ # bastille template folsom username/base
|
2018-11-13 10:38:33 -07:00
|
|
|
[folsom]:
|
|
|
|
|
Copying files...
|
|
|
|
|
Copy complete.
|
|
|
|
|
Installing packages.
|
|
|
|
|
...[snip]...
|
|
|
|
|
Executing final command(s).
|
|
|
|
|
chsh: user information updated
|
|
|
|
|
Template Complete.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
bastille top
|
|
|
|
|
------------
|
2019-11-22 21:59:11 -07:00
|
|
|
This one simply runs `top` in that container. This command is interactive, as
|
|
|
|
|
`top` is interactive.
|
2018-11-07 10:36:54 -07:00
|
|
|
|
2018-04-07 14:57:48 -06:00
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
bastille htop
|
|
|
|
|
-------------
|
2019-11-22 21:59:11 -07:00
|
|
|
This one simply runs `htop` inside the container. This one is a quick and dirty
|
|
|
|
|
addition. note: won't work if you don't have htop installed in the container.
|
2018-04-07 14:57:48 -06:00
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
bastille sysrc
|
|
|
|
|
--------------
|
|
|
|
|
The `sysrc` sub-command allows for safely editing system configuration files.
|
2019-11-22 21:59:11 -07:00
|
|
|
In container terms, this allows us to toggle on/off services and options at
|
2018-11-07 10:36:54 -07:00
|
|
|
startup.
|
2018-04-07 14:57:48 -06:00
|
|
|
|
|
|
|
|
```shell
|
2019-06-22 09:28:42 -06:00
|
|
|
ishmael ~ # bastille sysrc nginx nginx_enable=YES
|
2018-11-07 10:36:54 -07:00
|
|
|
[nginx]:
|
|
|
|
|
nginx_enable: NO -> YES
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
See `man sysrc(8)` for more info.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bastille console
|
|
|
|
|
----------------
|
2019-11-22 21:59:11 -07:00
|
|
|
This sub-command launches a login shell into the container. Default is
|
|
|
|
|
password-less root login. If you provide an additional argument of a username
|
|
|
|
|
you will be logged in as that user. (user must be created first)
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
ishmael ~ # bastille console folsom
|
|
|
|
|
[folsom]:
|
2019-11-22 21:59:11 -07:00
|
|
|
FreeBSD 11.3-RELEASE-p4 (GENERIC) #0: Thu Sep 27 08:16:24 UTC 2018
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
Welcome to FreeBSD!
|
|
|
|
|
|
|
|
|
|
Release Notes, Errata: https://www.FreeBSD.org/releases/
|
|
|
|
|
Security Advisories: https://www.FreeBSD.org/security/
|
|
|
|
|
FreeBSD Handbook: https://www.FreeBSD.org/handbook/
|
|
|
|
|
FreeBSD FAQ: https://www.FreeBSD.org/faq/
|
|
|
|
|
Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/
|
|
|
|
|
FreeBSD Forums: https://forums.FreeBSD.org/
|
|
|
|
|
|
|
|
|
|
Documents installed with the system are in the /usr/local/share/doc/freebsd/
|
|
|
|
|
directory, or can be installed later with: pkg install en-freebsd-doc
|
|
|
|
|
For other languages, replace "en" with a language code like de or fr.
|
|
|
|
|
|
|
|
|
|
Show the version of FreeBSD installed: freebsd-version ; uname -a
|
|
|
|
|
Please include that output and any error messages when posting questions.
|
|
|
|
|
Introduction to manual pages: man man
|
|
|
|
|
FreeBSD directory layout: man hier
|
|
|
|
|
|
|
|
|
|
Edit /etc/motd to change this login announcement.
|
|
|
|
|
root@folsom:~ #
|
2018-04-07 14:57:48 -06:00
|
|
|
```
|
|
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
At this point you are logged in to the container and have full shell access.
|
2018-11-07 10:36:54 -07:00
|
|
|
The system is yours to use and/or abuse as you like. Any changes made inside
|
2020-04-14 11:52:29 +02:00
|
|
|
the container are limited to the container.
|
2018-04-07 14:57:48 -06:00
|
|
|
|
2019-03-11 17:51:32 -06:00
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
bastille cp
|
|
|
|
|
-----------
|
2019-11-22 21:59:11 -07:00
|
|
|
This sub-command allows efficiently copying files from host to container(s).
|
2018-04-07 14:57:48 -06:00
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
```shell
|
|
|
|
|
ishmael ~ # bastille cp ALL /tmp/resolv.conf-cf etc/resolv.conf
|
|
|
|
|
[folsom]:
|
2019-11-22 21:59:11 -07:00
|
|
|
/tmp/resolv.conf-cf -> /usr/local/bastille/jails/folsom/root/etc/resolv.conf
|
2018-11-07 10:36:54 -07:00
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
[nginx]:
|
|
|
|
|
/tmp/resolv.conf-cf -> /usr/local/bastille/jails/nginx/root/etc/resolv.conf
|
2018-11-07 10:36:54 -07:00
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
[squid]:
|
|
|
|
|
/tmp/resolv.conf-cf -> /usr/local/bastille/jails/squid/root/etc/resolv.conf
|
2018-11-07 10:36:54 -07:00
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
[unbound0]:
|
|
|
|
|
/tmp/resolv.conf-cf -> /usr/local/bastille/jails/unbound0/root/etc/resolv.conf
|
2018-11-07 10:36:54 -07:00
|
|
|
```
|
|
|
|
|
|
2020-02-16 14:23:05 -07:00
|
|
|
bastille rdr
|
2020-02-01 16:06:13 +00:00
|
|
|
------------
|
|
|
|
|
|
2020-02-02 00:28:02 +00:00
|
|
|
`bastille rdr` allows you to configure dynamic rdr rules for your containers
|
2020-04-14 11:52:29 +02:00
|
|
|
without modifying pf.conf (assuming you are using the `bastille0` interface
|
|
|
|
|
for a private network and have enabled `rdr-anchor 'rdr/*'` in /etc/pf.conf
|
2020-02-01 16:06:13 +00:00
|
|
|
as described in the Networking section).
|
|
|
|
|
|
|
|
|
|
```shell
|
2020-02-16 14:23:05 -07:00
|
|
|
# bastille rdr help
|
2020-02-02 00:28:02 +00:00
|
|
|
Usage: bastille rdr TARGET [clear] | [list] | [tcp <host_port> <jail_port>] | [udp <host_port> <jail_port>]
|
|
|
|
|
# bastille rdr dev1 tcp 2001 22
|
|
|
|
|
# bastille rdr dev1 list
|
2020-02-01 16:06:13 +00:00
|
|
|
rdr on em0 inet proto tcp from any to any port = 2001 -> 10.17.89.1 port 22
|
2020-02-02 00:28:02 +00:00
|
|
|
# bastille rdr dev1 udp 2053 53
|
|
|
|
|
# bastille rdr dev1 list
|
2020-02-01 16:06:13 +00:00
|
|
|
rdr on em0 inet proto tcp from any to any port = 2001 -> 10.17.89.1 port 22
|
|
|
|
|
rdr on em0 inet proto udp from any to any port = 2053 -> 10.17.89.1 port 53
|
2020-02-02 00:28:02 +00:00
|
|
|
# bastille rdr dev1 clear
|
2020-02-01 16:06:13 +00:00
|
|
|
nat cleared
|
|
|
|
|
```
|
|
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
bastille update
|
|
|
|
|
---------------
|
2019-11-22 21:59:11 -07:00
|
|
|
The `update` command targets a release instead of a container. Because every
|
|
|
|
|
container is based on a release, when the release is updated all the containers
|
|
|
|
|
are automatically updated as well.
|
2018-11-07 10:36:54 -07:00
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
To update all containers based on the 11.2-RELEASE `release`:
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
Up to date 11.2-RELEASE:
|
|
|
|
|
```shell
|
|
|
|
|
ishmael ~ # bastille update 11.2-RELEASE
|
|
|
|
|
Targeting specified release.
|
|
|
|
|
11.2-RELEASE
|
|
|
|
|
|
|
|
|
|
Looking up update.FreeBSD.org mirrors... 2 mirrors found.
|
|
|
|
|
Fetching metadata signature for 11.2-RELEASE from update4.freebsd.org... done.
|
|
|
|
|
Fetching metadata index... done.
|
|
|
|
|
Inspecting system... done.
|
|
|
|
|
Preparing to download files... done.
|
|
|
|
|
|
|
|
|
|
No updates needed to update system to 11.2-RELEASE-p4.
|
|
|
|
|
No updates are available to install.
|
|
|
|
|
```
|
|
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
To be safe, you may want to restart any containers that have been updated live.
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
bastille upgrade
|
|
|
|
|
----------------
|
|
|
|
|
This sub-command lets you upgrade a release to a new release. Depending on the
|
|
|
|
|
workflow this can be similar to a `bootstrap`.
|
|
|
|
|
|
|
|
|
|
```shell
|
2019-11-22 21:59:11 -07:00
|
|
|
ishmael ~ # bastille upgrade 11.3-RELEASE 12.0-RELEASE
|
2018-11-07 10:36:54 -07:00
|
|
|
...
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bastille verify
|
|
|
|
|
---------------
|
|
|
|
|
This sub-command scans a bootstrapped release and validates that everything
|
|
|
|
|
looks in order. This is not a 100% comprehensive check, but it compares the
|
|
|
|
|
release against a "known good" index.
|
|
|
|
|
|
|
|
|
|
If you see errors or issues here, consider deleting and re-bootstrapping the
|
|
|
|
|
release.
|
|
|
|
|
|
2019-11-22 21:59:11 -07:00
|
|
|
It should be noted that releases bootstrapped through Bastille are validated
|
|
|
|
|
using `sha256` checksum against the release manifest. Archives that fail
|
|
|
|
|
validation are not used.
|
|
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
|
2019-06-22 14:15:20 -06:00
|
|
|
bastille zfs
|
|
|
|
|
------------
|
2019-11-22 21:59:11 -07:00
|
|
|
This sub-command allows managing zfs attributes for the targeted container(s).
|
|
|
|
|
Common usage includes setting container quotas.
|
2019-06-22 14:15:20 -06:00
|
|
|
|
2019-11-23 13:50:55 -07:00
|
|
|
**set quota**
|
2019-06-22 14:15:20 -06:00
|
|
|
```shell
|
2019-11-22 21:59:11 -07:00
|
|
|
ishmael ~ # bastille zfs folsom set quota=1G
|
2019-06-22 14:15:20 -06:00
|
|
|
```
|
|
|
|
|
|
2019-11-23 13:50:55 -07:00
|
|
|
**built-in: df**
|
2019-06-22 14:15:20 -06:00
|
|
|
```shell
|
|
|
|
|
ishmael ~ # bastille zfs ALL df
|
|
|
|
|
```
|
|
|
|
|
|
2019-11-23 13:50:55 -07:00
|
|
|
**built-in: df**
|
2019-06-22 14:15:20 -06:00
|
|
|
```shell
|
|
|
|
|
ishmael ~ # bastille zfs folsom df
|
|
|
|
|
```
|
|
|
|
|
|
2020-01-26 19:45:26 -04:00
|
|
|
bastille export
|
|
|
|
|
----------------
|
|
|
|
|
Containers can be exported for archiving purposes easily.
|
|
|
|
|
Note: On UFS systems containers must be stopped before export.
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
ishmael ~ # bastille export folsom
|
|
|
|
|
Exporting 'folsom' to a compressed .xz archive.
|
|
|
|
|
Sending zfs data stream...
|
2020-04-14 11:52:29 +02:00
|
|
|
100 % 1057.2 KiB / 9231.5 KiB = 0.115 0:01
|
2020-01-26 19:45:26 -04:00
|
|
|
Exported '/usr/local/bastille/jails/backups/folsom_2020-01-26-19:23:04.xz' successfully.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
bastille import
|
|
|
|
|
----------------
|
|
|
|
|
Containers can be imported from supported archives easily.
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
ishmael ~ # bastille import folsom_2020-01-26-19:22:23.xz
|
|
|
|
|
Validating file: folsom_2020-01-26-19:22:23.xz...
|
|
|
|
|
File validation successful!
|
|
|
|
|
Importing 'folsom' from compressed .xz archive.
|
|
|
|
|
Receiving zfs data stream...
|
|
|
|
|
/usr/local/bastille/jails/backups/folsom_2020-01-26-19:22:23.xz (1/1)
|
2020-04-14 11:52:29 +02:00
|
|
|
100 % 626.4 KiB / 9231.5 KiB = 0.068 0:02
|
2020-01-26 19:45:26 -04:00
|
|
|
Container 'folsom' imported successfully.
|
|
|
|
|
```
|
|
|
|
|
|
2020-03-04 10:52:17 +01:00
|
|
|
bastille clone
|
|
|
|
|
---------------
|
|
|
|
|
`bastille clone` will duplicate an existing container.
|
2020-03-04 12:22:24 +01:00
|
|
|
Please be aware that no host specific keys or hashes will be regenerated.
|
2020-03-04 10:52:17 +01:00
|
|
|
E. g. remove OpenSSH host keys to avoid duplicate host keys `rm /etc/ssh/ssh_host_*`
|
|
|
|
|
|
|
|
|
|
Usage: `bastille clone [TARGET] [NEWJAIL] [NEW_IPADRRESS]
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
ishmael ~ # bastille clone sourcejail targetjail 10.17.89.11
|
|
|
|
|
```
|
|
|
|
|
|
2018-11-07 10:36:54 -07:00
|
|
|
Example (create, start, console)
|
|
|
|
|
================================
|
2019-11-22 21:59:11 -07:00
|
|
|
This example creates, starts and consoles into the container.
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
```shell
|
2019-06-22 09:28:42 -06:00
|
|
|
ishmael ~ # bastille create alcatraz 11.2-RELEASE 10.17.89.7
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
RELEASE: 11.2-RELEASE.
|
|
|
|
|
NAME: alcatraz.
|
2019-06-22 09:28:42 -06:00
|
|
|
IP: 10.17.89.7.
|
2018-11-07 10:36:54 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
ishmael ~ # bastille start alcatraz
|
|
|
|
|
[alcatraz]:
|
|
|
|
|
alcatraz: created
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
ishmael ~ # bastille console alcatraz
|
|
|
|
|
[alcatraz]:
|
|
|
|
|
FreeBSD 11.2-RELEASE-p4 (GENERIC) #0: Thu Sep 27 08:16:24 UTC 2018
|
|
|
|
|
|
|
|
|
|
Welcome to FreeBSD!
|
|
|
|
|
|
|
|
|
|
Release Notes, Errata: https://www.FreeBSD.org/releases/
|
|
|
|
|
Security Advisories: https://www.FreeBSD.org/security/
|
|
|
|
|
FreeBSD Handbook: https://www.FreeBSD.org/handbook/
|
|
|
|
|
FreeBSD FAQ: https://www.FreeBSD.org/faq/
|
|
|
|
|
Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/
|
|
|
|
|
FreeBSD Forums: https://forums.FreeBSD.org/
|
|
|
|
|
|
|
|
|
|
Documents installed with the system are in the /usr/local/share/doc/freebsd/
|
|
|
|
|
directory, or can be installed later with: pkg install en-freebsd-doc
|
|
|
|
|
For other languages, replace "en" with a language code like de or fr.
|
|
|
|
|
|
|
|
|
|
Show the version of FreeBSD installed: freebsd-version ; uname -a
|
|
|
|
|
Please include that output and any error messages when posting questions.
|
|
|
|
|
Introduction to manual pages: man man
|
|
|
|
|
FreeBSD directory layout: man hier
|
|
|
|
|
|
|
|
|
|
Edit /etc/motd to change this login announcement.
|
|
|
|
|
root@alcatraz:~ #
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
root@alcatraz:~ # ps -auxw
|
|
|
|
|
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
|
|
|
|
|
root 83222 0.0 0.0 6412 2492 - IsJ 02:21 0:00.00 /usr/sbin/syslogd -ss
|
|
|
|
|
root 88531 0.0 0.0 6464 2508 - SsJ 02:21 0:00.01 /usr/sbin/cron -s
|
|
|
|
|
root 6587 0.0 0.0 6912 2788 3 R+J 02:42 0:00.00 ps -auxw
|
|
|
|
|
root 92441 0.0 0.0 6952 3024 3 IJ 02:21 0:00.00 login [pam] (login)
|
|
|
|
|
root 92565 0.0 0.0 7412 3756 3 SJ 02:21 0:00.01 -csh (csh)
|
|
|
|
|
root@alcatraz:~ #
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Project Goals
|
|
|
|
|
=============
|
2018-04-07 14:57:48 -06:00
|
|
|
These tools are created initially with the mindset of function over form. I
|
|
|
|
|
want to simply prove the concept is sound for real work. The real work is a
|
2019-11-22 21:59:11 -07:00
|
|
|
sort of meta-container-port system. Instead of installing the MySQL port
|
|
|
|
|
directly on a system, you would use Bastille to install the MySQL port within a
|
|
|
|
|
container template built for MySQL. The same goes for DNS servers, and
|
|
|
|
|
everything else in the ports tree.
|
2018-04-07 14:57:48 -06:00
|
|
|
|
|
|
|
|
Eventually I would like to have Bastille templates created for popular
|
|
|
|
|
FreeBSD-based services. From Plex Media Servers to ad-blocking DNS resolvers.
|
2019-11-22 21:59:11 -07:00
|
|
|
From tiny SSH containers to dynamic web servers. [COMPLETE]
|
2018-04-07 14:57:48 -06:00
|
|
|
|
|
|
|
|
I don't want to tell you what you can and can't run within this framework.
|
|
|
|
|
There are no arbitrary limitations based on what I think may or may not be the
|
|
|
|
|
best way to design systems. This is not my goal.
|
|
|
|
|
|
|
|
|
|
My goal is to provide a secure framework where processes and services can run
|
|
|
|
|
isolated. I want to limit the scope and reach of bad actors. I want to severely
|
2019-11-22 21:59:11 -07:00
|
|
|
limit the target areas available to anyone that has (or has gained) access.
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
Networking Tips
|
|
|
|
|
===============
|
|
|
|
|
|
2020-04-14 11:52:29 +02:00
|
|
|
Tip #1:
|
2018-11-07 10:36:54 -07:00
|
|
|
-------
|
|
|
|
|
Ports and destinations can be defined as lists. eg;
|
|
|
|
|
```
|
2019-06-22 09:28:42 -06:00
|
|
|
rdr pass inet proto tcp from any to any port {80, 443} -> {10.17.89.45, 10.17.89.46, 10.17.89.47, 10.17.89.48}
|
2018-11-07 10:36:54 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
This rule would redirect any traffic to the host on ports 80 or 443 and
|
2019-11-22 21:59:11 -07:00
|
|
|
round-robin between containers with ips 45, 46, 47, and 48 (on ports 80 or
|
|
|
|
|
443).
|
2018-11-07 10:36:54 -07:00
|
|
|
|
|
|
|
|
|
2020-04-14 11:52:29 +02:00
|
|
|
Tip #2:
|
2018-11-07 10:36:54 -07:00
|
|
|
-------
|
|
|
|
|
Ports can redirect to other ports. eg;
|
|
|
|
|
```
|
2019-06-22 09:28:42 -06:00
|
|
|
rdr pass inet proto tcp from any to any port 8080 -> 10.17.89.5 port 80
|
|
|
|
|
rdr pass inet proto tcp from any to any port 8081 -> 10.17.89.5 port 8080
|
|
|
|
|
rdr pass inet proto tcp from any to any port 8181 -> 10.17.89.5 port 443
|
2018-11-07 10:36:54 -07:00
|
|
|
```
|
|
|
|
|
|
2018-11-18 23:11:02 -07:00
|
|
|
Tip #3:
|
|
|
|
|
-------
|
|
|
|
|
Don't worry too much about IP assignments.
|
2019-11-22 21:59:11 -07:00
|
|
|
|
|
|
|
|
Initially I spent time worrying about what IP addresses to assign. In the end
|
|
|
|
|
I've come to the conclusion that it _really_ doesn't matter. Pick *any* private
|
|
|
|
|
address and be done with it. These are all isolated networks. In the end, what
|
|
|
|
|
matters is you can map host:port to container:port reliably, and we can.
|
2018-11-18 23:11:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
Community Support
|
|
|
|
|
=================
|
|
|
|
|
If you've found a bug in Bastille, please submit it to the [Bastille Issue
|
|
|
|
|
Tracker](https://github.com/bastillebsd/bastille/issues/new).
|