Category: Devops
Postgres replication part 1 (of potentially 1)
As is often the case when dealing with servers, there are outdated versions. The reason is almost always the same: there wasn't enough time to keep things up to date.
It makes sense — sticking to the LTS of anything is hard work. You have a working system, and even if it's a fairly uncomplicated beast, updating dependencies to a new version is rarely simple. It might seem like everything is fine, but then on a Saturday at 01:30, things start breaking down because that once- in-a-blue-moon event without a unit test executes — and it depends on that one deprecated functionality nobody really needed.
Fail2ban
When you're running a very simple website such as this, and you're running, say, nginx and sshd, you're going to attract a fair amount of unwelcome traffic. In fact, in all likelihood, the majority of your traffic is likely to be bots looking for ways to take over your server.
If there was something really important on your server, you'd obviously not expose it to the internet. You'd have firewalls, load balancers, cache servers, etc., and only valid traffic would ever reach the server. That costs a fair amount of money compared to a simple VM, so it's likely not making much sense to do for a blog few will read.
Proxmox at home
Proxmox is really popular with both people having some kind of home server, but also with companies renting bare metal servers. It's a viable alternative to XCP-ng and VMware, for instance. I'm going to use mine for some minor services, but mainly as a testing rig to learn more about both Proxmox itself as well as projects I'm curious about.
As a freelancer it's important to have some kind of environment to test things on, as it's not so common that the companies I work for can provide that. I
splurged and got myself a new ZBOX-CI337NANO N100. I usually prefer trying to stick to used hardware, but having a reasonably strong little server
that consumes little energy and has passive cooling felt important. I put in 32 GB of RAM and 512 GB of storage.
Varnish woes
Varnish woes
Recently (*) at work, I was seeing some really odd behavior: browsers were requesting static files and getting truncated results.
The setup
Router
Basic router routing the traffic to the correct HA Proxy.
HA Proxy
HA Proxy is the edge and SSL terminator. It identifies the client, drops bad actors, and forwards the traffic to the next step.
Varnish
Varnish is used for routing the traffic to the right place and, of course, caching content that should be cached.
Category: Hugo
Hugo configuration
I'm using Hugo to render this site, slightly self harming but using Emacs org-mode for the templates instead of Markdown. There are some things that I've found confusing that might help somone else.
Being a bit anal I've split up my configuration into different files. It doesn't make much sense to do so for a small site like mine but it's possible and who knows, one day I might have plenty of pages and even want to have a staging environment.
Category: Home
Proxmox at home
Proxmox is really popular with both people having some kind of home server, but also with companies renting bare metal servers. It's a viable alternative to XCP-ng and VMware, for instance. I'm going to use mine for some minor services, but mainly as a testing rig to learn more about both Proxmox itself as well as projects I'm curious about.
As a freelancer it's important to have some kind of environment to test things on, as it's not so common that the companies I work for can provide that. I
splurged and got myself a new ZBOX-CI337NANO N100. I usually prefer trying to stick to used hardware, but having a reasonably strong little server
that consumes little energy and has passive cooling felt important. I put in 32 GB of RAM and 512 GB of storage.
Category: Server
Proxmox at home
Proxmox is really popular with both people having some kind of home server, but also with companies renting bare metal servers. It's a viable alternative to XCP-ng and VMware, for instance. I'm going to use mine for some minor services, but mainly as a testing rig to learn more about both Proxmox itself as well as projects I'm curious about.
As a freelancer it's important to have some kind of environment to test things on, as it's not so common that the companies I work for can provide that. I
splurged and got myself a new ZBOX-CI337NANO N100. I usually prefer trying to stick to used hardware, but having a reasonably strong little server
that consumes little energy and has passive cooling felt important. I put in 32 GB of RAM and 512 GB of storage.
Category: Home Network
Your own router with Deutsche Telekom
Using your own router behind "Glasfaser Modem 2" is really simple. It's just that Deutsche Telekom aren't very helpful.
There's a nice guide here for OpenWRT routers. The basic steps apply to any router:
- Use PPPoE for the WAN interface
- Use your Internet-Zugangsnummer as the username
- Use your Persönliches Kennwort as the password
- VLAN-tag your internet traffic with 7 (and IPTV with 8)
Every router has these settings in different places, most of which make little sense to me. Below, I'll show what you need to do on three different routers:
Category: Investigation
Varnish woes
Varnish woes
Recently (*) at work, I was seeing some really odd behavior: browsers were requesting static files and getting truncated results.
The setup
Router
Basic router routing the traffic to the correct HA Proxy.
HA Proxy
HA Proxy is the edge and SSL terminator. It identifies the client, drops bad actors, and forwards the traffic to the next step.
Varnish
Varnish is used for routing the traffic to the right place and, of course, caching content that should be cached.