<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.williams-net.org/index.php?action=history&amp;feed=atom&amp;title=IP_Tables_config</id>
	<title>IP Tables config - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.williams-net.org/index.php?action=history&amp;feed=atom&amp;title=IP_Tables_config"/>
	<link rel="alternate" type="text/html" href="https://wiki.williams-net.org/index.php?title=IP_Tables_config&amp;action=history"/>
	<updated>2026-06-01T02:37:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>https://wiki.williams-net.org/index.php?title=IP_Tables_config&amp;diff=9&amp;oldid=prev</id>
		<title>DrEdWilliams: Created page with &quot;== IP Tables Config == Configure the host to use IP Tables for routing packets.  As root:   echo 1 &gt; /proc/sys/net/bridge/bridge-nf-call-iptables  echo 1 &gt; /proc/sys/net/ipv4/...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.williams-net.org/index.php?title=IP_Tables_config&amp;diff=9&amp;oldid=prev"/>
		<updated>2019-08-03T00:48:13Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== IP Tables Config == Configure the host to use IP Tables for routing packets.  As root:   echo 1 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-iptables  echo 1 &amp;gt; /proc/sys/net/ipv4/...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== IP Tables Config ==&lt;br /&gt;
Configure the host to use IP Tables for routing packets.  As root:&lt;br /&gt;
&lt;br /&gt;
 echo 1 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-iptables&lt;br /&gt;
 echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
 echo &amp;quot;net.bridge.bridge-nf-call-iptables = 1&amp;quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;
 echo &amp;quot;net.ipv4.ip_forward = 1&amp;quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;
 iptables -P FORWARD ACCEPT&lt;br /&gt;
&lt;br /&gt;
== Systemd Service on boot ==&lt;br /&gt;
To set up a refresh at boot time, create a systemd service:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[Unit]&lt;br /&gt;
Description=Common on-boot commands&lt;br /&gt;
After=kubelet.service&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
ExecStart=/usr/sbin/iptables -P FORWARD ACCEPT&lt;br /&gt;
ExecStart=/bin/bash -c &amp;quot;/usr/bin/date &amp;gt; /etc/systemd/system/onboot.tag&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=multi-user.target&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save this in the /etc/systemd/system directory (as onboot.service)&lt;br /&gt;
&lt;br /&gt;
Then issue the systemctl commands to load and enable it:&lt;br /&gt;
&lt;br /&gt;
 systemctl enable onboot&lt;br /&gt;
 systemctl start onboot&lt;br /&gt;
&lt;br /&gt;
This also creates a file called &amp;#039;onboot.tag&amp;#039; with the date of the last execution of this command ...&lt;br /&gt;
&lt;br /&gt;
== For Distros using iptables v1.8+ ==&lt;br /&gt;
This includes (at least):&lt;br /&gt;
* Debian 10 (buster)&lt;br /&gt;
* RHEL 8&lt;br /&gt;
* CentOS 8&lt;br /&gt;
&lt;br /&gt;
Someone in the Linux world decided that it was time to change from &amp;#039;iptables&amp;#039; packet processing rules to the newer &amp;#039;nf_tables&amp;#039; (or nft) packet processing rules.  iptables v1.8.* is supposed to be a transition version that could do both the iptables method of packet routing and nft method.  The problem is that the kubernetes application pods (e.g. kube-proxy) use the older version that messes with the iptables rules ... while the command-line version is messing with nft rules by default.  This causes &amp;quot;weird and wonderful&amp;quot; problems.&lt;br /&gt;
&lt;br /&gt;
The short answer (until someone gets this worked out and updates the kube-proxy containers to use the nft rule sets) is to force the host to use the iptables rules.  Fortunately, iptables is loaded as an &amp;#039;alternative&amp;#039; app, so we can just flip it:&lt;br /&gt;
&lt;br /&gt;
 update-alternatives --set iptables /usr/sbin/iptables-legacy&lt;br /&gt;
 update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy&lt;br /&gt;
 update-alternatives --set arptables /usr/sbin/arptables-legacy&lt;br /&gt;
 update-alternatives --set ebtables /usr/sbin/ebtables-legacy&lt;br /&gt;
&lt;br /&gt;
The first one is all that is strictly necessary, but it is best to keep all the iptables stuff together.&lt;br /&gt;
&lt;br /&gt;
There is an extensive discussion including both practical and philosophical issues on the kubernetes github issue board:  https://github.com/kubernetes/kubernetes/issues/71305&lt;/div&gt;</summary>
		<author><name>DrEdWilliams</name></author>
	</entry>
</feed>