iptables & nftables

Netfilter tables, chains, rules, NAT, connection tracking, and Kubernetes kube-proxy iptables rules.

Overview

Overview iptables is the userspace interface to Netfilter, the Linux kernel's packet filtering framework. nftables is the modern replacement, but iptables knowledge remains essential because Kubernetes kube-proxy still uses iptables mode by default.

Key concepts

  • Chains
  • Connection tracking
  • DNAT / SNAT
  • MASQUERADE
  • Default policy

Interview questions

  • How does Kubernetes kube-proxy use iptables to implement a ClusterIP service?
  • How do you allow all outbound traffic but only allow inbound SSH and established return traffic?

Sign up free to read the full topic

More Linux topics

Start free on Cariara · Coding problems · System design studio