Commit Graph

55 Commits (00b04179b10eafdebf5beef85d09f906bb86f90b)

Author SHA1 Message Date
Dustin 76b7db421c dch-network: Forward syncthing port to file0
*file0.pyrocufflink.blue* hosts syncthing. Forwarding the transport is
not strictly required, as syncthing can use relays to encapsulate
traffic in HTTPS, but allowing direct access improves performance.
2018-08-12 15:22:30 -05:00
Dustin 4e8bd8995b hosts: Add koji0.pyrocufflink.blue
*koji0.pyrocufflink.blue* hosts the Koji ecosystem, including a builder.
2018-08-12 10:27:20 -05:00
Dustin 943cdddc23 dch-gw: dhcpd: Update unifi0 MAC address
The UniFi controller has been moved to a different Raspberry Pi device.
2018-08-12 09:18:42 -05:00
Dustin 7ebc2bdfa2 burp-{client,server}: PBs to deploy BURP
The `burp-client.yml` and `burp-server.yml` playbooks apply the
*burp-client* and *burp-server* roles to BURP clients and servers,
respectively. The server playbook also applies the *postfix* role to
ensure that SMTP is configured and backup notifications can be sent.
2018-08-08 20:14:25 -05:00
Dustin 241f9d6afa all: Set SMTP relay
All machines (except the relay itself of course) should use the
*mail.pyrocufflink.blue* SMTP relay to send email.
2018-08-07 20:04:09 -05:00
Dustin ee6523faf6 pyrocufflink-dns: Correct IPv6 reverse zones
The zone names and forwarder addresses for IPv6 reverse lookups were
incorrect. This caused long timeouts when resolving IPv6 addresses, e.g.
for SSH.
2018-08-07 18:46:43 -05:00
Dustin b415c0403e dch-gw: Forward port 22 to file0 2018-08-03 00:27:44 -05:00
Dustin cff7789862 dch-gw: Add DHCP lease for file0.p.b
It is necessary for the file server to have a static address in order
for port forwarding for SSH to work.
2018-08-02 20:42:33 -05:00
Dustin 4aded1e75c pyrocufflink: Ensure Samba security is correct
Usually, the *samba* role is deployed as a dependency of the *winbind*
role, which explicitly sets `samba_security` to `ads`. The new
*fileserver* role also depends on the *samba* role, but it does NOT sett
that variable. This can cause `smb.conf` to be rewritten with a
different value whenever one or the other role is applied.

Explicitly setting the `samba_security` variable at the group level
ensures that the value is consistent no matter how the *samba* role is
applied. Since all domain member machines need the same value,
regardless of what function they perform, this is safe.
2018-08-01 22:05:18 -05:00
Dustin a8dd2e9ec3 vmhost: PB to set up VM hosts 2018-07-23 17:35:10 -05:00
Dustin 620fcc79b8 dch-network: Use dc0.p.b for NTP on test network 2018-07-23 17:35:10 -05:00
Dustin d6b4e4a098 dch-network: Add NTP servers for Management net 2018-07-15 09:42:22 -05:00
Dustin 5f65864d3a dch-network: Correct Management router interface 2018-07-15 09:41:46 -05:00
Dustin 44552dcd4a dch-gw: Add DHCP reservation for unifi0
The UniFi controller has been moved to a Raspberry Pi on the Management
network. This machine needs a static address to use in the "inform URL"
it sends to managed devices.
2018-07-15 09:19:53 -05:00
Dustin 9f89c4c835 Move APs to Management network
The UniFi access points are now connected to the Management network.
Their IP addresses have thus changed.
2018-07-15 09:19:39 -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 6602dd5b4a dch-gw: Allow inbound TCP port 9876
TCP port 9876 is used for the OpenVPN-over-TLS service.
2018-07-01 15:18:19 -05:00
Dustin b809d4294f pyrocufflink: Convert variables file to directory
Converting the *pyrocufflink* group variables definition from a file to
a directory will allow Jenkins jobs to place a Vault-envrypted file
within it that defines the `ansible_become_password` variable. In this
way, a different password can be used for machines that are members of
the *pyrocufflink.blue* domain than for other hosts. The existing
mechanism of specifying the path to the Vault-encrypted file that
defines the variable allows only a single password to be defined, so it
does not work when multiple machines in the same play have different
passwords.
2018-06-22 19:20:22 -05:00
Dustin ddafc09839 dch-gw: Open Zabbix ports in the firewall
Obviously, the Zabbix agent (active and passive) ports need to be open
in order for the gateway device itself to be monitored by Zabbix.
2018-06-19 20:41:45 -05:00
Dustin 974cc3dceb Set Let's Encrypt account email globally 2018-06-13 22:23:27 -05:00
Dustin efc6b62903 dch-gw: Forward HTTP, HTTPS to rprx0.p.b 2018-06-12 22:44:54 -05:00
Dustin 83253cb6d6 dch-gw: Add DHCP reservation for rprx0.p.b
*rprx0.pyrocufflink.blue* needs a DHCP reservation and static address
for port forwarding of HTTP and HTTPS.
2018-06-12 22:44:54 -05:00
Dustin 6396b9fc49 gitea: Restrict SSH configuration
Since Gitea servers may be exposed directly to the Internet, it is
important to prevent SSH tunneling, lest the server become an ingress
point into the network.

Additionally, the *gitea* user should not be allowed to use password
authentication, as this would only work if the user actually has a
password (which it does not) and would result in shell access instead of
Gitea.
2018-06-06 21:45:36 -05:00
Dustin ce75b1567c zabbix-server: Force prefork Apache MPM
The PHP module for Apache, which is required for the Zabbix front end,
is incompatible with the *event* MPM, so the *prefork* MPM must be used.
2018-06-04 20:03:52 -05:00
Dustin 1c130bf840 samba-dc: Configure TLS 2018-05-28 15:24:34 -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 ab9bdd447b dhcpd: Add reservation for diddy.pyrocufflink.blue 2018-05-06 20:08:58 -05:00
Dustin 67057fc72e Disable DHCP-DDNS on blue network
DNS updates are only allowed on the blue network from domain members.
2018-05-06 13:39:40 -05:00
Dustin 40e9573f57 Move APs to blue network 2018-05-06 13:12:55 -05:00
Dustin 2cf4e71170 dch-gw: dhcpd: Reduce blue pool size
A few more hosts are going to need static addresses, so the pool needs
to start later in the address space to make room for them.
2018-05-06 13:11:57 -05:00
Dustin aba3fe8e04 hosts: Add DCs to radius group
All domain controllers for the *pyrocufflink.blue* domain are RADIUS
servers as well.
2018-05-06 13:10:31 -05:00
Dustin 94a89d8d78 smtp-relay: PB to deploy Postfix SMTP relay
The `smtp-relay.yml` playbook configures Postfix on the managed node as
an SMTP relay.
2018-04-15 11:38:51 -05:00
Dustin f3739d91ac hosts: Add hosts to zabbix group
Hosts in the *zabbix* group will get the Zabbix agent deployed to them.
2018-04-14 15:47:49 -05:00
Dustin 3bbe5aee6a hosts: Add zbx0.pyrocufflink.blue
The host *zbx0.pyrocufflink.blue* (a Raspberry Pi) runs the Zabbix
server and web UI. It has a reserved IPv4 address to simplify reverse
DNS management for now, since Samba's dynamic DNS client does not
register PTR records.
2018-04-14 15:47:30 -05:00
Dustin 9ace01788a zabbix: Playbooks for Zabbix server, agents 2018-04-14 15:31:17 -05:00
Dustin 0ce0c0f834 pyrocufflink-dns: Add IPv6 reverse DNS zones
These IPv6 reverse DNS zones are managed by the Samba AD DCs for the
*pyrocufflink.blue* domain. These zones correspond to the IPv6 prefixes
used by the "blue" network.
2018-04-14 15:15:02 -05:00
Dustin 54bc5570f1 jenkins-slave: PB to deploy Jenkins slave 2018-04-08 12:04:03 -05:00
Dustin 87b9b0c60d dch-gw: Allow outbound NTP 2018-04-07 09:40:50 -05:00
Dustin ef2b31880b dch-gw: Allow outbound DHCP
Connection Tracking does not work for DHCP messages, since many are
broadcast. As such, the firewall must explicitly allow datagrams
destined for the DHCP client port.
2018-04-07 09:39:22 -05:00
Dustin de5aa114d1 dch-network: Use dns0.pyrocufflink.blue everywhere
All internal networks (except Guest) now use *dns0.pyrocufflink.blue*
for DNS resolution.
2018-04-06 20:40:22 -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 2bc6bc69f3 dch-gw: Fix network address for pyrocufflink.red 2018-04-06 20:35:52 -05:00
Dustin 452a030b9d dch-gw: Remove Malfurion
Malfurion (second pyrocufflink.jazz Active Directory Domain Controller)
is currently offline.
2018-04-06 20:35:04 -05:00
Dustin 5c8a552eb2 fixup-dns 2018-04-06 20:31:18 -05:00
Dustin 3edf038e5e dch-gw: Change pyrocufflink.blue SLA ID
When specifying a SLA ID of "0", *dhcpcd* uses the whole delegated
subnet (i.e. /56 instead of /64).
2018-04-06 20:24:53 -05:00
Dustin 14440840e2 dch-gw: Clean up DNS/NTP address enumerations
Instead of listing the addresses for DNS and NTP servers again in the
DHCP server configuration, these are now taken from the canonical
definitions in the `dch_networks` variable.
2018-04-06 20:21:34 -05:00
Dustin e8ff331acc dch-gw: Update radvd_interfaces for multi-prefix
The *radvd* role now supports/requires specifying a list of prefixes for
each interface.
2018-04-06 20:19:09 -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 a7ac6c586d dch-gw: Initial commit
The *dch-gw* role, and the corresponding `dch-gw.yml` playbook, apply
all of the necessary configuration to the edge router on my home
network.
2018-03-27 20:44:43 -05:00
Dustin 5a91cb731a samba-dc: Configure samba4 winbind
The *samba-dc* role now configures `winbindd` on domain controllers to
support identity mapping on the local machine. This will allow domain
users to log into the domain controller itself, e.g. via SSH.

The Fedora packaging of *samba4* still has some warts. Specifically, it
does not have a proper SELinux policy, so some work-arounds need to be
put into place in order for confined processes to communicate with
winbind.
2018-03-11 18:16:17 -05:00