Commit Graph

47 Commits (7d7dda60617c170255b3996e32cdfd1216c74774)

Author SHA1 Message Date
Dustin 3f99708c48 cloud0: burp backup paths
Nextcloud data are no longer stored at `/var/www/html` since switching
to the Fedora-packaged distribution.
2021-12-17 20:22:42 -06:00
Dustin 6c705f54af hosts: vmhost1: Switch to systemd-networkd
Using *systemd-networkd* to configure network interfaces on *vmhost0* is
working really well.  It is decidedly more stable than *dhcpcd* was, and
certainly easier to work with than NetworkManager.  Let's go ahead and
switch *vmhost1* as well.
2021-10-31 01:12:25 -05:00
Dustin 881c8de625 Switch Prometheus/collectd to pull
Transitioning from push-based to pull-based monitoring with
Prometheus/collectd.  The *write_prometheus* plugin will be installed on
all hosts, and Prometheus will be configured to scrape them directly.
2021-10-30 16:41:17 -05:00
Dustin d8919f6424 hosts: dns0: Allow DDNS updates from gw1
Since the firewall is now the DHCP server, the DNS server needs to allow
it to send DDNS updates for *pyrocufflink.red*.
2021-10-17 14:12:19 -05:00
Dustin 3f49175c1d host: vmhost0: Set host-specific network config
*vmhost0.pyrocufflink.blue* no longer uses `dhcpcd` for network
configuration, but *systemd-networkd*.

The host-specific network settings for a VM host include the
configuration for the management interface, as well as the configuration
of the physical ports that make up the bonded interfaces.
2021-10-10 16:09:15 -05:00
Dustin b7ba6a59ab hosts: Add nvr0.p.b
*nvr0.pyrocufflink.blue* hosts Frigate.  It is deployed on a separate
subnet, for two reasons:

* To avoid streaming video from the cameras through the firewall
* To prevent any hosts on the LAN except Home Assistant from
  communicating with Frigate, since it does not have any kind of
  authentication or access control
2021-08-21 17:20:19 -05:00
Dustin bbfb66b49f Merge branch 'collectd-vmhost' 2021-07-24 18:39:06 -05:00
Dustin 207c9d6428 hosts: vmhost{0,1}: Configure collectd server
The VM hosts have multiple network interfaces with IPv6 addresses, so
collectd may not always choose the correct one to send metrics.  Thus we
have to explicitly tell it to use the management interface, to avoid it
sending data on the SAN interface.
2021-07-24 18:37:18 -05:00
Dustin 3998b08b10 homeassistant: Apply hass-dhcp role
Applying the *hass-dhcp* role the Home Assistant server, making it the
authoritative DHCP and DNS server for the home automation network.
2021-07-24 18:34:50 -05:00
Dustin b826d8355e hosts: Add hass2.p.b
*hass2.pyrocufflink.blue* is a Raspberry Pi Compute Module 4-based
system, currently mounted in a WaveShare CM4 Mini Base Board (A).  With
an NVMe SSD for primary storage, it runs significantly faster than a
standard Raspberry Pi 4, and blows the old Raspberry Pi 3-based Home
Assistant deployment out of the water. It has a Zooz 700 series Z-Wave
Plus S2 USB stick and a ConBee II Zigbee USB stick attached to its USB
2.0 ports.  It runs a customized Fedora Minimal distribution.
2021-07-19 15:58:58 -05:00
Dustin 71f55ddfdf hosts: hass1: Set collectd network interface
Because *hass1.pyrocufflink.blue* has multiple interfaces, collectd does
not know which interface it should use to send multicast metrics
messages.  To force it to use the wired interface, which is connected to
the default internal ("blue") network, the `interface` property needs to
be set.
2020-12-23 20:57:01 -06:00
Dustin 84313601ef roles/named: Implement response policy zones
BIND response policy zones (RPZ) support provides a mechanism for
overriding the responses to DNS queries based on a wide range of
criteria.  In the simplest form, a response policy zone can be used to
provide different responses to different clients, or "block" some DNS
names.

For the Pyrocufflink and related networks, I plan to use an RPZ to
implement ad/tracker blocking.  The goal will be to generate an RPZ
definition from a collection of host lists (e.g. those used by uBlock
Origin) periodically.

This commit introduces basic support for RPZ configuration in the
*named* role.  It can be activated by providing a list of "response
policy" definitions (e.g. `zone "name"`) in the `named_response_policy`
variable, and defining the corresponding zones in `named_zones`.
2020-09-06 10:40:01 -05:00
Dustin 44404950c1 Merge branch 'graylog' into master 2020-08-31 20:17:12 -05:00
Dustin 40c8df1b13 hosts: cloud0: Configure backups with BURP
Back up `/var/www/html`.
2020-08-29 14:22:17 -05:00
Dustin da3eb1aaf0 hosts: hass1: Configure backups with BURP
Back up `/var/lib/homeassistant`.
2020-08-29 14:22:17 -05:00
Dustin 9ef88da95f hosts: hassdb0: Add missing vars file 2020-08-29 14:01:50 -05:00
Dustin 4c661478b2 hosts: bw0: Use Lego cert 2020-03-17 08:45:34 -05:00
Dustin cd1cf38774 hosts: git0: Switch to Lego wildcard cert 2020-02-22 16:43:46 -06:00
Dustin e25b9a2e8e hosts: Add logs0.p.b
*logs0.pyrocufflink.blue* hosts Graylog
2019-10-28 18:47:09 -05:00
Dustin fab662bd53 hosts: hass0: Add untracked host_vars file 2019-09-19 19:50:35 -05:00
Dustin b2cc467581 hosts: Add build0-amd64
*build0-amd64.securepassage.com* is a Jenkins agent that runs Docker,
allowing pipeline jobs to run inside containers.
2019-09-19 19:50:35 -05:00
Dustin e3e30eea1c hosts: dns0: Update DHCP server address
Now that the DHCP server has moved from *dns1* to *dns0*, the DNS server
needs to be updated to allow DDNS updates from the latter.
2019-09-19 19:27:30 -05:00
Dustin 9306252e75 hosts: Add bw0.p.b
*bw0.pyrocufflink.blue* runs Bitwarden_rs via Docker.
2019-09-19 19:27:30 -05:00
Dustin f002da86ef dns0: Update DHCP server IP address
DHCP is provided by *dns1.pyrocufflink.blue* now, not the gateway. To
allow dynamic DNS updates from it, the correct source address must be
listed in the zone configuration for *pyrocufflink.red*.
2019-02-19 13:20:19 -06:00
Dustin 284e3817e0 jenkins0: Bind Samba to real interface only
Because *jenkins0.pyrocufflink.blue* runs Docker, it has an extra
virtual interface and IP address, for container communication. By
default, Samba registers all IP addresses in DNS, and cannot
differentiate between the actual interface and the Docker bridge. This
can cause other hosts to attempt to contact *jenkins0.pyrocufflink.blue*
using the wrong address.

The `samba_interfaces` variable controls the value of the `interfaces`
global configuration option for Samba. One of the things this option
controls is which addresses to register in DNS. By setting it to the
network address of the *pyrocufflink.blue* network, we can prevent the
virtual address from being used at all.
2019-01-06 12:24:52 -06:00
Dustin 1745f268de smtp1: Allow relay from Management network 2018-10-13 11:50:31 -05:00
Dustin 07a23267c6 hosts: Add dns1.pyrocufflink.blue
To avoid having a single point of failure, a second recursive DNS server
is necessary. This will be useful in cases where the VM hosts must both
be taken offline, but Internet access is still required.

The new server, *dns1.pyrocufflink.blue*, has all the same zones defined
as the original. It forwards the *pyrocufflink.blue* zone and
corresponding reverse zones to the domain controllers, and acts as a
slave for the *pyrocufflink.red* zone.
2018-08-12 17:24:37 -05:00
Dustin d36e0d5a0a pyrocufflink-dns: Split named_zones definition
In order to support adding a second DNS server, the BIND zone
configuration needs to be partially modularized. While the forwarder
definitions for *pyrocufflink.blue*, etc. will remain the same, the
*pyrocufflink.red* zone will be different, as it will be a slave zone on
the second server. This commit breaks up the definition of the
`named_zones` variable into two parts:

* `pyrocufflink_red_zones`: This is a list of zone objects for
  *pyrocufflink.red* and its corresponding reverse zone. On
  *dns1.pyrocufflink.blue*, these are master zones. On the new server,
  these will be slaves.
* `pyrocufflink_common_zones`: This is a list of zone objects for the
  zones that are the same on both servers, since they are all forwarding
  zones.

Similarly, the `named_keys` variable only needs to be defined on the
master, since DHCP will only send updates there.
2018-08-12 17:23:34 -05:00
Dustin 00b04179b1 hosts: Remove smtp0.p.b
Now that the SMTP relay has been moved to *smtp1.pyrocufflink.blue*,
*smtp0* is no longer needed.
2018-08-12 15:23:08 -05:00
Dustin 72b148bd0e hosts: Add smtp1.p.b
*smtp1.pyrocufflink.blue* is a VM that will replace
*smtp0.pyrocufflink.blue*, a Raspberry Pi.

I decided that there is little use in having the availability guarantee of
a discreet machine for the SMTP relay. The only system that would NEED
to send mail if the VM host fails is Zabbix, which operates as its own
relay anyway. As such, the main relay can be a VM, and the Raspberry Pi
can be repurposed as a recursive DNS server.
2018-08-12 15:22:31 -05:00
Dustin 997951d59e hosts: Add file0.p.b to burp-client
Adding *file0.pyrocufflink.blue* to enable automatic backups. The
`/home` and `/srv/cifs/Downloads` paths are backed up.
2018-08-08 22:07:32 -05:00
Dustin 69a7e869b4 hosts: Add file0.p.b 2018-08-01 22:11:40 -05:00
Dustin 11dc40bc76 hosts: Add vmhost{0,1}.p.b 2018-07-23 17:35:10 -05:00
Dustin 9cf4111af7 gw0: Set dhcpcd_nodev
Disabling device management in `dhcpcd` avoids the "received NULL
device" log spam.
2018-07-20 17:47:04 -05:00
Dustin d811a9fe22 dch-gw: Add Management network
The Management network (VLAN 10, 172.30.0.240/28) will be used for
communication with and configuration of network devices including
switches and access points. This keeps configuration separate from
normal traffic, and allows complete isolation of infrastructure devices.
2018-07-15 09:15:26 -05:00
Dustin 5188250cfc hosts: Add dch-gw to zabbix group
The gateway device is now monitored by Zabbix. Adding it to the *zabbix*
group ensures that the Zabbix agent is installed and configured
correctly.

Because the *zabbix-agent* role has a task to configure FirewallD, the
`host_uses_firewalld` variable needs to be set to `false` for *gw0*,
since it does not use FirewallD.
2018-06-19 20:40:58 -05:00
Dustin f14683aaac git0: Set gitea_root_url
The `gitea_root_url` variable is used to configure the root URL for
Gitea, which is in turn used to generate HTTP/HTTPS "clone" links for
Git repositories. If this value is not set, the default is used, which
does not work since the application is behind a reverse proxy.
2018-06-18 19:22:21 -05:00
Dustin 222acdba32 git0: Switch to Let's Encrypt certificate 2018-06-13 22:23:27 -05:00
Dustin 4f6260d77d hosts: git0: Define Gitea SSH domain 2018-06-04 20:03:55 -05:00
Dustin f8641cb912 dch-gw: Host Pyrocufflink VPN locally
This commit adjusts the firewall and networking configuration on dc0 to
host the Pyrocufflink remote access IPsec VPN locally instead of
forwarding it to the internal VPN server.
2018-05-20 13:23:20 -05:00
Dustin 2b127e1616 hosts: Add zbx0.p.b to smtp-server
Zabbix servers should also be SMTP relays, so as to limit the
possibility for lost trigger alerts caused by outages.
2018-04-15 13:28:45 -05:00
Dustin 2d58fdcebf hosts: Add smtp0.pyrocufflink.blue
The host *smtp0.pyrocufflink.blue* serves the main SMTP relay for the
Pyrocufflink network.
2018-04-15 11:39:33 -05:00
Dustin 2d8bb54ba9 gw0: Use internal DNS 2018-04-06 20:38:11 -05:00
Dustin b5620631ff dch-gw: Add IPv6 ULA prefix to pyrocufflink.blue
For internal services, particularly DNS, it is easier to use a ULA
prefix than rely exclusively on routed addresses, since these can change
relatively frequently.
2018-04-06 20:36:30 -05:00
Dustin a0a4b91faf roles/dch-gw: Configure the filter table
The *filter* table is responsible for deciding which packets will be
accepted and which will be rejected. It has three chains, which classify
packets according to whether they are destined for the local machine
(input), passing through this machine (forward) or originating from the
local machine (output).

The *dch-gw* role now configures all three chains in this table. For
now, it defines basic rules, mostly based on TCP/UDP destination port:

* Traffic destined for a service hosted by the local machine (DNS, DHCP,
  SSH), is allowed if it does not come from the Internet
* Traffic passing through the machine is allowed if:
  * It is passing between internal networks
  * It is destined for a host on the FireMon network (VPN)
  * It was NATed to in internal host (marked 323)
  * It is destined for the Internet
* Only DHCP, HTTP, and DNS are allowed to originate from the local
machine

This configuration requires an `internet_iface` variable, which
indicates the name of the network interface connected to the Internet
directly.
2018-03-29 10:06:30 -05:00
Dustin da5da95894 hosts: add gw0 2018-03-29 07:52:20 -05:00
Dustin bf820c482e hosts: Add new domain controllers 2018-02-19 22:46:27 -06:00