SlideShare a Scribd company logo
linux as HA router
Author: Jakob Schwienbacher
Work done by: Telmekom NOC
Copyright: 2020 Telmekom GmbH
overview
things to do
●
network configuration
●
linux kernel
●
keepalived
●
conntrackd
network configuration
bash# cat /etc/network/interfaces
auto eth0
iface eth0 inet static
up ip link set up dev $IFACE
down ip link set down dev $IFACE
up ip route add 1.1.1.0/24 dev $IFACE
auto eth1
iface eth1 inet static
up ip link set up dev $IFACE
down ip link set down dev $IFACE
up ip route add 2.2.2.0/24 dev $IFACE
linux modules
bash# cat /etc/modules
nf_conntrack
nf_conntrack_pptp
nf_conntrack_proto_gre
linux sysctl
bash# cat /etc/sysctl.conf
net.ipv4.ip_forward=1
net.ipv6.conf.all.forwarding=1
net.netfilter.nf_conntrack_buckets = 32768
net.netfilter.nf_conntrack_max = 131072
keepalived
●
health check
●
VRRP
●
load balancing (optional)
keepalived
bash# cat /etc/keepalived/keepalived.conf
vrrp_sync_group FW_VOICE {
group {
VIP_IPV4
VIP_IPV6
}
notify_master "/etc/conntrackd/primary-backup.sh primary"
notify_backup "/etc/conntrackd/primary-backup.sh backup"
notify_fault "/etc/conntrackd/primary-backup.sh fault"
}
...
vrrp_instance VIP_IPV4 {
interface ha0
virtual_router_id 30
advert_int 0.5
priority 100
nopreempt
authentication {
auth_type PASS
auth_pass secret
}
virtual_ipaddress {
1.1.1.1/27 dev eth0
2.2.2.1/27 dev eth0
}
...
vrrp_instance VIP_IPV6 {
interface ha0
virtual_router_id 30
advert_int 0.5
priority 100
nopreempt
authentication {
auth_type PASS
auth_pass secret
}
virtual_ipaddress {
2001:db8:1::1/64 dev eth0
2001:db8:2::1/64 dev eth1
}
conntrackd
●
netfilter connection tracking
●
state syncronization
●
ignore IP list
bash# cat /etc/conntrackd/conntrackd.conf
Mode FTFW {
DisableExternalCache Off
CommitTimeout 1800
PurgeTimeout 5
}
UDP {
IPv4_address 169.254.1.1
IPv4_Destination_Address 169.254.1.2
Port 3780
Interface ha0
}
conntrackd
General {
Filter From Userspace {
Address Ignore {
IPv4_address 127.0.0.1
IPv6_address ::1
IPv4_address 169.254.1.1
IPv4_address 169.254.1.2
IPv4_address 1.1.1.1
IPv4_address 2.2.2.1
conntrackd
troubleshooting
●
ip
●
conntrack -C | -S
●
conntrackd -s
troubleshooting
bash# conntrackd -s
cache internal:
current active connections: 1
connections created: 1 failed: 0
connections updated: 2 failed: 0
connections destroyed: 0 failed: 0
cache external:
current active connections: 16597
connections created: 49986518 failed: 0
connections updated: 213445194 failed: 0
connections destroyed: 49969921 failed: 0
questions?

More Related Content

PDF
IPv6 in CloudStack Basic Networking
PDF
LT04 IDNOG04 - Affan Basalamah (ITB) - Documenting your network
PDF
Deployment tales
PDF
Deployment tales
PPTX
Quick Start Guide using Virtuozzo 7 (β) on AWS EC2
PDF
Nginx for Fun & Performance - Philipp Krenn - Codemotion Rome 2015
PPTX
Understanding kube proxy in ipvs mode
PPT
SnortReport Presentation
IPv6 in CloudStack Basic Networking
LT04 IDNOG04 - Affan Basalamah (ITB) - Documenting your network
Deployment tales
Deployment tales
Quick Start Guide using Virtuozzo 7 (β) on AWS EC2
Nginx for Fun & Performance - Philipp Krenn - Codemotion Rome 2015
Understanding kube proxy in ipvs mode
SnortReport Presentation

What's hot (19)

PDF
bro - what is in my network?
PDF
nginxをソースからインストールしてみたよ
PPTX
EuroPython 2014 - How we switched our 800+ projects from Apache to uWSGI
PPTX
Ansible intro
PDF
Scapy the packet 途中01
PPTX
BSides London - Scapy Workshop
PDF
Apache Ignite In-Memory Computing Install memo
PDF
Automação do físico ao NetSecDevOps
PPT
Full Web Stack Security
PPTX
BackTrack 4 R2 - SFISSA Presentation
PDF
Automatic Kamailio Deployments With Puppet
PPTX
uWSGI - Swiss army knife for your Python web apps
PPT
Linux Server Start
KEY
/etc/rc.d配下とかのリーディング勉強会
PDF
Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědě...
PDF
Introduction to Game Network Programming
PDF
Nginx2
PDF
Nxll14 cut through-proxy on asa
PDF
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
bro - what is in my network?
nginxをソースからインストールしてみたよ
EuroPython 2014 - How we switched our 800+ projects from Apache to uWSGI
Ansible intro
Scapy the packet 途中01
BSides London - Scapy Workshop
Apache Ignite In-Memory Computing Install memo
Automação do físico ao NetSecDevOps
Full Web Stack Security
BackTrack 4 R2 - SFISSA Presentation
Automatic Kamailio Deployments With Puppet
uWSGI - Swiss army knife for your Python web apps
Linux Server Start
/etc/rc.d配下とかのリーディング勉強会
Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědě...
Introduction to Game Network Programming
Nginx2
Nxll14 cut through-proxy on asa
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Ad

Similar to SFScon 2020 - Jakob Schwienbacher - Linux as HA Router - Linux Kernel keepalived conntrackd (20)

ODT
Centos failover link
PDF
High availability networking openstack
PPTX
Docker SDN (software-defined-networking) JUG
PDF
Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca...
PDF
HA Deployment Architecture with HAProxy and Keepalived
PPTX
Open stack ha design & deployment kilo
PDF
Alta disponibilidad en GNU/Linux
ODP
Integrating Linux routing with FusionCLI™
ODP
Securing the network for VMs or Containers
PDF
Pluggable Infrastructure with CI/CD and Docker
PPTX
Dockerizing the Hard Services: Neutron and Nova
PPTX
Vagrant, Ansible, and OpenStack on your laptop
PDF
Sharing your-internet-connection-on-linux
PDF
Automating auto-scaled load balancer based on linux and vm orchestrator
PDF
Contemporary Linux Networking
ODP
HAProxy scale out using open source
PDF
Livnat Peer & Arthur Berezin, Red Hat - Neutron High Availability - OpenStack...
PDF
Neutron high availability open stack architecture openstack israel event 2015
PDF
L2/L3 für Fortgeschrittene - Helle und dunkle Magie im Linux-Netzwerkstack
PDF
Configuration Firewalld On CentOS 8
Centos failover link
High availability networking openstack
Docker SDN (software-defined-networking) JUG
Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca...
HA Deployment Architecture with HAProxy and Keepalived
Open stack ha design & deployment kilo
Alta disponibilidad en GNU/Linux
Integrating Linux routing with FusionCLI™
Securing the network for VMs or Containers
Pluggable Infrastructure with CI/CD and Docker
Dockerizing the Hard Services: Neutron and Nova
Vagrant, Ansible, and OpenStack on your laptop
Sharing your-internet-connection-on-linux
Automating auto-scaled load balancer based on linux and vm orchestrator
Contemporary Linux Networking
HAProxy scale out using open source
Livnat Peer & Arthur Berezin, Red Hat - Neutron High Availability - OpenStack...
Neutron high availability open stack architecture openstack israel event 2015
L2/L3 für Fortgeschrittene - Helle und dunkle Magie im Linux-Netzwerkstack
Configuration Firewalld On CentOS 8
Ad

More from South Tyrol Free Software Conference (20)

PDF
SFSCON24 - Marina Latini - 1, 2, 3, Doc Kit!
PDF
SFSCON24 - Carmen Delgado Ivar Grimstad - Nurturing OpenJDK distribution: Ecl...
PDF
SFSCON24 - Eduardo Guerra - codEEmoji – Making code more informative with emojis
PDF
SFSCON24 - Juri Solovjov - How to start contributing and still have fun
PDF
SFSCON24 - Michal Skipala & Bruno Rossi - Monolith Splitter
PDF
SFSCON24 - Jorge Melegati - Software Engineering Automation: From early tools...
PDF
SFSCON24 - Chiara Civardi & Dominika Tasarz Sochacka - The Crucial Role of Op...
PDF
SFSCON24 - Moritz Mock, Barbara Russo & Jorge Melegati - Can Test Driven Deve...
PDF
SFSCON24 - Aurelio Buonomo & Christian Zanotti - Apisense – Easily monitor an...
PDF
SFSCON24 - Giovanni Giannotta & Orneda Lecini - Approaches to Object Detectio...
PDF
SFSCON24 - Alberto Nicoletti - The SMART Box of AURA Project
PDF
SFSCON24 - Luca Alloatti - Open-source silicon chips
PDF
SFSCON24 - Roberto Innocenti - 2025 scenario on OpenISA OpenPower Open Hardwa...
PDF
SFSCON24 - Juan Rico - Enabling global interoperability among smart devices ...
PDF
SFSCON24 - Seckin Celik & Davide Serpico - Adoption Determinants of Open Hard...
PDF
SFSCON24 - Stefan Mutschlechner - Smart Werke Meran - Lorawan Use Cases
PDF
SFSCON24 - Mattia Pizzirani - Raspberry Pi and Node-RED: Open Source Tools fo...
PDF
SFSCON24 - Attaullah Buriro - ClapMetrics: Decoding Users Genderand Age Throu...
PDF
SFSCON24 - Joseph P. De Veaugh Geiss - Opt out? Opt in? Opt Green! Bringing F...
PDF
SFSCON24 - Fulvio Mastrogiovanni - On the ethical challenges raised by robots...
SFSCON24 - Marina Latini - 1, 2, 3, Doc Kit!
SFSCON24 - Carmen Delgado Ivar Grimstad - Nurturing OpenJDK distribution: Ecl...
SFSCON24 - Eduardo Guerra - codEEmoji – Making code more informative with emojis
SFSCON24 - Juri Solovjov - How to start contributing and still have fun
SFSCON24 - Michal Skipala & Bruno Rossi - Monolith Splitter
SFSCON24 - Jorge Melegati - Software Engineering Automation: From early tools...
SFSCON24 - Chiara Civardi & Dominika Tasarz Sochacka - The Crucial Role of Op...
SFSCON24 - Moritz Mock, Barbara Russo & Jorge Melegati - Can Test Driven Deve...
SFSCON24 - Aurelio Buonomo & Christian Zanotti - Apisense – Easily monitor an...
SFSCON24 - Giovanni Giannotta & Orneda Lecini - Approaches to Object Detectio...
SFSCON24 - Alberto Nicoletti - The SMART Box of AURA Project
SFSCON24 - Luca Alloatti - Open-source silicon chips
SFSCON24 - Roberto Innocenti - 2025 scenario on OpenISA OpenPower Open Hardwa...
SFSCON24 - Juan Rico - Enabling global interoperability among smart devices ...
SFSCON24 - Seckin Celik & Davide Serpico - Adoption Determinants of Open Hard...
SFSCON24 - Stefan Mutschlechner - Smart Werke Meran - Lorawan Use Cases
SFSCON24 - Mattia Pizzirani - Raspberry Pi and Node-RED: Open Source Tools fo...
SFSCON24 - Attaullah Buriro - ClapMetrics: Decoding Users Genderand Age Throu...
SFSCON24 - Joseph P. De Veaugh Geiss - Opt out? Opt in? Opt Green! Bringing F...
SFSCON24 - Fulvio Mastrogiovanni - On the ethical challenges raised by robots...

Recently uploaded (20)

PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Electronic commerce courselecture one. Pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Modernizing your data center with Dell and AMD
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Approach and Philosophy of On baking technology
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPT
Teaching material agriculture food technology
PDF
cuic standard and advanced reporting.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
NewMind AI Weekly Chronicles - August'25 Week I
Mobile App Security Testing_ A Comprehensive Guide.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
NewMind AI Monthly Chronicles - July 2025
Diabetes mellitus diagnosis method based random forest with bat algorithm
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Electronic commerce courselecture one. Pdf
Machine learning based COVID-19 study performance prediction
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Modernizing your data center with Dell and AMD
Dropbox Q2 2025 Financial Results & Investor Presentation
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
The AUB Centre for AI in Media Proposal.docx
Approach and Philosophy of On baking technology
20250228 LYD VKU AI Blended-Learning.pptx
Teaching material agriculture food technology
cuic standard and advanced reporting.pdf

SFScon 2020 - Jakob Schwienbacher - Linux as HA Router - Linux Kernel keepalived conntrackd