Skip to content

Instantly share code, notes, and snippets.

@arioch
Forked from aw/gist:1008793
Created March 28, 2013 15:47
Show Gist options
  • Save arioch/5264238 to your computer and use it in GitHub Desktop.
Save arioch/5264238 to your computer and use it in GitHub Desktop.
#! /bin/sh
#
## Tested on Linux Debian 5.0 (Lenny)
#
# OK I know this is nothing new/special.
# If you've always configured your LBs a certain way, you might have to use this method instead.
#
# Scenario: High-availability setup with 2 HAProxy/Keepalived load-balancers on IPv6
#
# Problem: HAProxy won't start (cannot bind socket) because the virtual IPv6 address is not assigned
#
# With IPv4, you can set the sysctl parameter: net.ipv4.ip_nonlocal_bind=1
#
# Solution: configure the floating/virtual IPv6 address on the LOOPBACK interface
#
# Example:
/sbin/ip -6 addr add 2001:db8::ffff:1/64 dev lo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment