Commit Graph

23 Commits (7fc3465d56f9b444360aafa1f50d7bdc990033d7)

Author SHA1 Message Date
Dustin 2d51e2001d gw1: Allow internal IPv6 clients
Specifically to allow the Synology to synchronize its clock, as it only
has an IPv6 address.

We also need to explicitly override `chrony_servers` to an empty list
for the firewall itself, since it syncs with the NTP pool, rather than
its next hop router.
2025-08-17 20:52:36 -05:00
Dustin 6359a140ac gw1/squid: Allow proxy access from kube network
Since we use the proxy when PXE booting to speed up Live OS image and
RPM package downloads, we need to allow machines using it to access the
kickstart files which are now hosted on the PXE server.  Virtual
machines on the Kubernetes network (_pyrocufflink.black_ also need
access to those kickstarts, so we need to mark that subnet as trusted.
2025-07-12 16:45:47 -05:00
Dustin fefa85c83b gw1: squid: Allow access to PXE/kickstarts
The PXE server now hosts the kickstart scripts.
2025-07-12 16:12:23 -05:00
Dustin 0c070c9807 gw1/squid: Allow Unifi controller to internal repos
I've move the Unifi controller back to running on a Fedora Linux
machine.  It therefore needs access to Fedora RPM repositories, as well
as the internal "dch" RPM repository, for system packages.

I also created a new custom container image for the Unifi Network
software (the linuxserver.io one sucks), so the server needs access to
the OCI repo on Gitea.
2025-03-29 08:01:50 -05:00
Dustin c300dc1b6c chrony: Add role/PB for chrony
I continually struggle with machines' (physical and virtual, even the
Roku devices!) clocks getting out of sync.  I have been putting off
fixing this because I wanted to set up a Windows-compatible NTP server
(i.e. on the domain controllers, with Kerberos signing), but there's
really no reason to wait for that to fix the clocks on all the
non-Windows machines, especially since there are exactly 0 Windows
machines on the network right now.

The *chrony* role and corresponding `chrony.yml` playbook are generic,
configured via the `chrony_pools`, `chrony_servers`, and `chrony_allow`
variables.  The values for these variables will configure the firewall
to act as an NTP server, synchronizing with the NTP pool on the
Internet, while all other machines will synchronize with it.  This
allows machines on networks without Internet access to keep their clocks
in sync.
2025-03-16 16:37:19 -05:00
Dustin 81663a654d gw1/squid: Allow to Gitea kicstarts+from p.r
Since the canonical location for Anaconda kickstart scripts is now
Gitea, we need to allow hosts to access them from there.

Also allowing access from the _pyrocufflink.red_ network for e.g.
installation testing.
2024-12-27 13:07:11 -06:00
Dustin 29d65dd0d5 gw1: squid: Allow access to Gitea
Specifically to allow _nvr2.pyrocufflink.blue_ to fetch the
_frigate-exporter_ container image.
2024-10-21 20:27:31 -05:00
Dustin 621f82c88d hosts: Migrate remaining hosts to Restic
Gitea and Vaultwarden both have SQLite databases.  We'll need to add
some logic to ensure these are in a consistent state before beginning
the backup.  Fortunately, neither of them are very busy databases, so
the likelihood of an issue is pretty low.  It's definitely more
important to get backups going again sooner, and we can deal with that
later.
2024-09-07 20:45:24 -05:00
Dustin 14a7d39e11 gw1/squid: Allow Frigate access to Github API
Frigate uses the Github API to check for new releases.  It then
populates the `update.frigate_server` entity in Home Assistant via MQTT
with the information it retrieved.  If it is unable to access the Github
API, the Home Assistant entity will be marked as "unavailable," which
triggers an alert notification from Home Assistant. Thus, we need to
allow Frigate to access Github if we want to use that entity as an
indicator of whether or not Frigate is connected to the MQTT broker.

I don't want to allow access to the Github API to everything on the
Frigate server, just Frigate itself.  To do that, I've assigned a unique
username and password for Frigate.  Only requests with the proper
`Proxy-Authorization` header will be allowed access.  By providing the
credentials only the Frigate container, we can ensure no other process
has access.

I think I did this mostly as an exercise; there's no particular reason
to disallow access to the Github API, since it's mostly read-only and
can't really be used to exfiltrate any data (probably?).
2024-08-14 20:26:11 -05:00
Dustin 3250628cd1 gw1/squid: Allow NVR servers access to repos
The Frigate NVR servers, prod & test, need to be able to access Fedora
COPR (for the *gasket-dkms* package) and Github Container Registry (for
Frigate itself).
2024-08-12 18:47:04 -05:00
Dustin 3214d4b9b2 gw1/squid: Allow UniFi controller to OCI registries
The UniFi Network server needs to be able access the
_linuxserver.io_/GitHub and Docker Hub OCI image registries for the
Unifi Network and Caddy container images, respectively.
2024-07-31 18:41:13 -05:00
Dustin 805a900f8a gw1/squid: Allow Invoice Ninja to Stripe API
HLC uses Invoice Ninja Stripe integration to process credit card
payments from parents.
2024-07-14 15:45:36 -05:00
Dustin b83c6de28a gw1/squid: Add more URLs for Fedora/CoreOS updates
After adding these, *unifi2.pyrocufflink.blue* (FCOS) was finally able
to update successfully.
2024-07-02 20:44:29 -05:00
Dustin 93eeaaaed4 gw1: Allow access to DCH yum repo via proxy
Allows installing _sshca-cli-systemd_ from Kickstart.
2024-06-26 18:39:25 -05:00
Dustin 4bdd00d339 gw1: Do not reboot after dnf automatic updates
We don't want the firewall rebooting itself after kernel updates.
Instead, I will reboot it manually at the next appropriate time.
2024-06-13 08:10:55 -05:00
Dustin 1babedaf55 gw1: squid: Cache RPMs and installer images
Installing Fedora on a bunch of machines, simultaneously or in rapid
succession, can be painfully slow, as several large files need to be
downloaded.  To speed this up, we download those files via the proxy and
cache them on the proxy server.

As a side-effect, the proxy needs to allow access to the Kickstart
"server" (i.e. my workstation, at least for now), since Anaconda will
use the configured proxy for everything it downloads.
2024-06-12 18:54:29 -05:00
Dustin 9365fd2dd5 gw1: squid: Allow access to FCOS update servers
*unifi2.pyrocufflink.blue*, which is connected to the management
network, can only access the Internet via the proxy.  In order for
Zincati/`rpm-ostree` to automatically update the machine, the proxy
needs to allow access to the FCOS update servers.
2024-06-12 18:52:54 -05:00
Dustin c51589adff gw1: Scrape BIND DNS server logs
The BIND server on the firewall is configured to write query logs and
RPZ rewrite logs to files under `/var/log/named`.  We can scrape these
logs with Promtail and use the messages for analytics on the DNS-based
firewall, etc.
2024-02-28 19:06:23 -06:00
Dustin b96164ce11 gw1: Allow rpm.grafana.com via proxy
In order to install Promtail on machines (e.g. *unifi1*) that do not
have direct access to the Internet.
2024-02-22 20:40:51 -06:00
Dustin 1bff9b2649 gw1: Enable pam_ssh_agent_auth for sudo
This machine is _not_ a member of the _pyrocufflink.blue_ AD domain, so
it does not inherit the settings from that group.  Also, Jenkins does
not manage it, so only my personal keys are authorized.
2024-01-28 12:16:35 -06:00
Dustin be63424fd8 hosts: Deploy Squid on gw1
Running Squid on the firewall makes sense; it's a sort of layer-7
firewall, after all.  There's not much storage on that machine, though
so we don't really want to cache anything.  In fact, it's only purpose
is to allow very limited web access for certain applications.  All
outbound traffic is blocked, with two exceptions:

* Fedora package repositories (for the UniFi controller server)
* Google Fonts (for Invoice Ninja)
2024-01-27 20:09:34 -06:00
Dustin 423951bac1 {burp1, gw1}: Configure upsmon 2024-01-19 21:55:36 -06:00
Dustin d0b0f2ff38 hosts: gw1: Deploy BURP, collectd
Although *gw1* is not really managed by Ansible, it is much easier to
deploy collectd and BURP with the existing playbooks.
2024-01-19 20:52:48 -06:00