intelligence_src_6dc544294b7f21f98a
- Source-provided label
- Publisher RSS metadata
- Evidence class
- mentioned in report
- Confidence
- Not reported
- Observed
- Dec 02, 2026 06:20 UTC
- Retrieved
- Dec 02, 2026 06:23 UTC
In an earlier post I dug into Corosync and how a Proxmox cluster decides whether its peers are alive. This time it's a more everyday kind of redundancy: a VIP (virtual IP) made highly available with HAProxy + Keepalived. Spinning up five VMs just to test this is tedious, though. So I built "2 load balancers + 2 web servers + a client" inside a single Linux box using network namespaces, and watched the VIP move. No Docker, no VMs. Every screenshot here is a real run on my Ubuntu machine. Topology Component Job HAProxy round-robins to web1 / web2 and health-checks them Keepalived uses VRRP to decide whether lb1 or lb2 owns the VIP; gives the VIP up when HAProxy dies Environment Item Version OS Ubuntu 24.04 HAProxy 2.8.30 Keepalived 2.2.8 sudo apt install -y haproxy keepalived iproute2 Step 1: Build the lab with network namespaces One bridge, br-lab, with five namespaces hanging off it via veth pairs: # up.sh #!/bin/bash # Build "2 LBs + 2 webs + client" inside one Linux box with network namespaces set -e ip link add br-lab type bridge && ip link set br-lab up i=0 for ns in client lb1 lb2 web1 web2; do case $ns in client) ip=10.0.0.100;; lb1) ip=10.0.0.11;; lb2) ip=10.0.0.12;; web1) ip=10.0.0.21;; web2) ip=10.0.0.22;; esac ip netns add $ns ip link add v-$ns type veth peer name eth0 netns $ns ip link set v-$ns master br-lab up ip -n $ns addr add $ip/24 dev eth0 ip -n $ns link set eth0 up ip -n $ns link set lo up done # Let the LBs bind the VIP even when they do not hold it for ns in lb1 lb2; do ip netns exec $ns sysctl -qw net.ipv4.ip_nonlocal_bind=1; done # Web: just return its own name for ns in web1 web2; do mkdir -p /tmp/$ns && echo "hello from $ns" > /tmp/$ns/index.html ip netns exec $ns nohup python3 -m http.server 80 --directory /tmp/$ns >/tmp/$ns.log 2>&1 & done echo "lab is up" Tearing it down: # down.sh #!/bin/bash for ns in client lb1 lb2 web1 web2; do ip netns pids $ns 2>/dev/null | xargs -r kill 2>/dev/null; ip netns del $ns 2>/dev/null; done ip link del br-lab 2>/dev/null; echo "lab is down" Step 2: HAProxy lb1 and lb2 are almost identical; only the X-LB header differs, so we can see which LB answered. # haproxy-lb1.cfg global log stdout format raw local0 pidfile /run/haproxy-lb1.pid defaults mode http log global option httplog timeout connect 2s timeout client 10s timeout server 10s frontend fe_web bind 10.0.0.10:80 http-response set-header X-LB lb1 default_backend be_web frontend fe_health bind 127.0.0.1:8404 monitor-uri /health backend be_web balance roundrobin option httpchk GET / server web1 10.0.0.21:80 check inter 1s fall 2 rise 2 server web2 10.0.0.22:80 check inter 1s fall 2 rise 2 bind 10.0.0.10:80 — listen on the VIP. ip_nonlocal_bind=1 lets the LB that doesn't hold the VIP bind it anyway fe_health — an endpoint (monitor-uri) Keepalived uses to ask "is HAProxy alive?" check inter 1s fall 2 rise 2 — web health checks; a server is pulled after 2 failures Step 3: Keepalived # keepalived-lb1.conf global_defs { router_id lb1 script_user root enable_script_security } vrrp_script chk_haproxy { script "/usr/bin/curl -sf -o /dev/null http://127.0.0.1:8404/health" interval 1 fall 2 rise 2 } vrrp_instance VI_WEB { state MASTER interface eth0 virtual_router_id 51 priority 110 advert_int 1 unicast_src_ip 10.0.0.11 unicast_peer { 10.0.0.12 } virtual_ipaddress { 10.0.0.10/24 dev eth0 } track_script { chk_haproxy } } The only differences on lb2: $ diff keepalived-lb1.conf keepalived-lb2.conf 2c2 < router_id lb1 --- > router_id lb2 15c15 < state MASTER --- > state BACKUP 18c18 < priority 110 --- > pr
b8cf7feadcb4fd1df89865085737d3418399035e9e6838727d5c0316580f2331Network indicators are visibly defanged. This page does not make them clickable or send them to another service.
No validated file hashes or network indicators are stored for this record.
This record contains metadata and attribution only. It does not host, download, unpack, render, or execute malware samples.
Sources represented on this page. Publication and observation dates describe the content; successful batch dates describe local collection. A recent batch does not certify complete coverage or current provider availability.
1 sources: 0 stale, 0 needing attention, 0 paused, 0 unverified.
Stale means older than twice the recorded collection interval, with a minimum of one hour; without an interval, the threshold is 24 hours. Cached content remains available while a feed is stale, paused, or unverified.