Security Architecture Linux with IPV6 Part 1
Linux IPv6 Hardening Guide

Security Architecture Linux with IPV6 Part 1

2023, Oct 03    

Introduction / Einführung

Securing Linux Servers Against IPv6-related Attacks: A Comprehensive Guide IPv6 (Internet Protocol version 6) offers several advantages over its predecessor, IPv4, but it also introduces new security challenges. In this guide, we’ll walk you through the process of securely configuring Linux servers to prevent IPv6-related attacks.

Absicherung von Linux-Servern gegen IPv6-bezogene Angriffe: Ein umfassender Leitfaden IPv6 (Internet Protocol Version 6) bietet zahlreiche Vorteile gegenüber seinem Vorgänger IPv4, bringt aber auch neue Sicherheitsherausforderungen mit sich. In diesem Leitfaden führen wir Sie durch den Prozess der sicheren Konfiguration von Linux-Servern, um IPv6-bezogene Angriffe zu verhindern.

Understanding sysctl / Verständnis sysctl

Sysctl is a Linux kernel tuning tool that provides an interface for examining and dynamically changing kernel parameters. To configure IPv6 settings, you can modify the sysctl parameters related to IPv6. The configuration settings for sysctl are stored in /etc/sysctl.conf or /etc/sysctl.d/.conf.

Sysctl ist ein Linux-Kernel-Tuning-Tool, das eine Schnittstelle zur Überprüfung und dynamischen Änderung von Kernel-Parametern bietet. Um IPv6-Einstellungen zu konfigurieren, können Sie die sysctl-Parameter in Bezug auf IPv6 ändern. Die Konfigurationseinstellungen für sysctl werden in /etc/sysctl.conf oder /etc/sysctl.d/.conf gespeichert.

vi /etc/sysctl.d/1337-IPV6.conf
# System default settings live in /usr/lib/sysctl.d/00-system.conf.
# To override those settings, enter new settings here, or in an
/etc/sysctl.d/<name>.conf file
# For more information, see sysctl.conf(5) and sysctl.d(5).
#IPV6 ONLY SERVER
net.ipv6.bindv6only=1
#
net.ipv6.route.mtu_expires = 60
net.ipv6.conf.all.forwarding = 0
net.ipv6.conf.default.forwarding = 0
net.ipv6.conf.enp0s8.forwarding = 0
net.ipv6.conf.all.accept_ra=0
net.ipv6.conf.default.accept_ra=0
net.ipv6.conf.enp0s8.accept_ra=0
net.ipv6.conf.all.accept_redirects=0
net.ipv6.conf.default.accept_redirects=0
net.ipv6.conf.enp0s8.accept_redirects=0
net.ipv6.conf.all.autoconf = 0
net.ipv6.conf.default.autoconf = 0
net.ipv6.conf.enp0s8.autoconf = 0
net.ipv6.conf.all.accept_dad = 0
net.ipv6.conf.default.accept_dad = 0
net.ipv6.conf.enp0s8.accept_dad = 0
net.ipv6.conf.all.dad_transmits = 0
net.ipv6.conf.default.dad_transmits = 0
net.ipv6.conf.enp0s8.dad_transmits = 0
net.ipv6.conf.all.hop_limit=64
net.ipv6.conf.default.hop_limit=64
net.ipv6.conf.enp0s8.hop_limit=64
net.ipv6.conf.all.force_mld_version = 2
net.ipv6.conf.default.force_mld_version = 2
net.ipv6.conf.enp0s8.force_mld_version = 2
net.ipv6.conf.all.mldv2_unsolicited_report_interval=100000000000
net.ipv6.conf.default.mldv2_unsolicited_report_interval=100000000000
net.ipv6.conf.enp0s8.mldv2_unsolicited_report_interval=100000000000
net.ipv6.conf.all.mc_forwarding=0
net.ipv6.conf.default.mc_forwarding=0
net.ipv6.conf.enp0s8.mc_forwarding=0
net.ipv6.route.gc_elasticity = 9
net.ipv6.route.gc_interval = 30
net.ipv6.route.gc_min_interval = 0
net.ipv6.route.gc_min_interval_ms = 500
net.ipv6.route.gc_thresh = 1024
net.ipv6.route.gc_timeout = 60
net.ipv6.ip6frag_high_thresh = 4194304
net.ipv6.ip6frag_low_thresh = 3145728
net.ipv6.ip6frag_secret_interval = 600
net.ipv6.ip6frag_time = 60

Apply the changes:

Übernehmen Sie die Änderungen:

sudo sysctl -p

Setting up a static interface / Einrichtung eines statische Interfaces

IPV6 Static Configuration for Debian and Ubuntu Change your /etc/network/interfaces file

IPV6 Statische Konfiguration für Debian und Ubuntu Ändern Sie Ihre /etc/network/interfaces Datei

iface eth0 inet6 static
address aaaa:bbbb::abcd:abcd
netmask 64
mtu 1280
gateway aaaa:bbbb::abcd::1

Im zweiten Teil werden wir uns noch den Firewall Regeln des Servers zuwenden. Hier werden wir ein Service erstellen und diese dann

Quellen / Sources:

  1. Linux Security Guide for Hardening IPv6
  2. Configuration for IPv6 ACLs
  3. Windows Security Guide for Hardening IPv6
  4. Operational Security Considerations for IPv6 Networks

AIPOST