Posts

User-friendly Bash script template

Sometimes you need a user-friendly interface for scripts. Using raw ARG0, ARG1… is messy. Here’s a clean example of parsing arguments like -h or -a=one in Bash.

Fail python-pip after upgrade on Debian 8 and 9

Sometimes after running pip install --upgrade pip , pip fails with the error ImportError: cannot import name main . Here’s the simplest way to fix it.

How to Safely Manage iptables with Docker Compose

How to protect iptables when using docker-compose . By default, Docker dynamically modifies iptables rules, which prevents normal firewall management. Many guides suggest saving Docker rules and restoring them later — I don't think this is a good approach. If Docker cannot handle firewall tasks properly, let's free it from this responsibility. See also docker-compose demonization with systemd .

Docker compose demonization with systemd

Easy way to (auto)start your infrastructure with docker-compose . Very useful for development, review servers, pre-prod, or test environments. Also includes tips on protecting iptables when using docker-compose .

AWS + StrongSwan

Sometimes you need to connect two AWS networks without using AWS managed VPN services. Most tutorials show a simple tunnel between two instances, but they ignore high availability. That usually leads to asymmetric routing or a single point of failure.

CloudFlare API - list zone records

Easy and fast way get all domains or records via CloudFlare API

Moving WordPress redirects to nginx

We have pretty cool json from WordPress redirect table and we need move this action to nginx.