loki, prometheus, promtail should connect via wireguard #200
Labels
No labels
Bug
Docs
Feature request
Good for newcomers
Infra
Privacy
Refactoring or migration
Security
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: pub-solar/infra#200
Loading…
Reference in a new issue
No description provided.
Delete branch "loki-prometheus-via-wireguard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This changes the behaviour that was implemented before we had wireguard connections between hosts. Previously, HTTPS + basic auth was used to push logs to loki and scrape metrics using prometheus. With the wireguard VPN between hosts, this is no longer necessary. Instead, we bind to the wireguard interface
wg-ssh
(or its IPv4+IPv6 IP addresses) and use HTTP tunnelled via wireguard.Also add new *.wg.pub.solar DNS
A
+AAAA
records to get the wireguard IPs of our hosts.@ -27,11 +27,6 @@
# Don't expose SSH via public interfaces
networking.firewall.interfaces.wg-ssh.allowedTCPPorts = [ 22 ];
networking.hosts = {
Is there a reason to move this into the global DNS? we can connect to other nodes in the network without DNS being available, so it might be nice to also have their local names without a DNS server being available.
As the commit message states, the goal is to avoid surprises. I find it very confusing to have the same DNS name resolve to different IP addresses depending what host you're on. It would be my preference to remove this for clarity.
But to get this straight: We have the internal "wg.pub.solar" hosts that would could additionally set statically via
networking.hosts
right? @teutat3sI tend to agree with @b12f about a possible fuckup because of broken DNS but the middle ground here would be to not have context based in relation to the host your on but cached dns entries. It creates a bit of additional maintenance work as we have to update both but that could be ruled out by mentioning it in the docs and hanging people for not RTFM.
I have no objections to setting
*.wg.pub.solar
in/etc/hosts
as well if you're suggesting that. Not sure if I understood your comment correctly, @hensoko.Better like this?
56f692740e
Yessss. @b12f also happy?
62add8e095
to8f1b932fdc