<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[linux-&amp;gt; iptables: cant initialize table nat (need to insmod?)]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich bekomme bei meinem Vorhaben folgende Fehlermeldung (Ubuntu 8.10):</p>
<p><strong>&quot;iptables v1.4.0: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)<br />
Perhaps iptables or your kernel needs to be upgraded.&quot;</strong></p>
<p>Möglicherweise reicht das schon aus, damit mir ein Linuxer sagen kann, was zu tun ist.</p>
<p>Ansonsten:</p>
<p>Die menuconfig des Kernels <strong>2.6.22.19</strong> (auf die ich angewiesen bin) bietet mir keine ersichtliche möglichkeit, NAT Unterstützung einzubinden.</p>
<p>Der Inhalt von<br />
<strong>/lib/modules/2.6.22.19-vs2.2.0.7/kernel/net/ipv4/netfilter/</strong><br />
ist wie folgt:</p>
<p><strong>arptable_filter.ko ip_queue.ko iptable_raw.ko ipt_ah.ko ipt_LOG.ko ipt_ttl.ko<br />
arp_tables.ko iptable_filter.ko ip_tables.ko ipt_ecn.ko ipt_recent.ko ipt_TTL.ko<br />
arpt_mangle.ko iptable_mangle.ko ipt_addrtype.ko ipt_ECN.ko ipt_REJECT.ko ipt_ULOG.ko</strong></p>
<p>Da fehlt, soweit ich das Problem eingrenzen konnte, die <strong>iptables_nat.ko</strong>.</p>
<p>Die Datei einfach aus dem Verzeichnis einer anderen (neueren) Kernelversion zu kopieren bringt nichts.<br />
Auch nicht mit dem /boot/config Eintrag CONFIG_IP_NF_NAT=y.</p>
<p>Ich vermute mal so einfach ist es nicht. Aber ich habe endlos gegoogelt und nichts gefunden.<br />
Laut apt ist iptables auf dem neusten Stand und ich finde keine klare Anleitung wie das Problem zu lösen ist. (Wie, in welcher Form, das Modul zu erweitern ist!?)</p>
<p>Hat jemand Rat?</p>
<p>Kurz zum Hintergrund:<br />
Habe Ubuntu 8.10 und führe einen gepatchten Kernel aus.<br />
Den Kernel musste ich für vserver patchen und das funktioniert nun alles auch problemlos.<br />
D.h. ich kann einen neuen vserver starten und die test-scripts laufen fehlerlos.<br />
Das Problem kommt beim verbinden meines virtuellen Rechners mit der Außenwellt: Wenn ich via NAT eine lokale IP meines virtuellen Systems per Portmapping mit meiner einzigen externen IP verbinden will:</p>
<p><strong>#iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -d ! 192.168.1.0/24 -j SNAT --to-source $meine_externe_IP<br />
-&gt;&quot;iptables v1.4.0: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)<br />
Perhaps iptables or your kernel needs to be upgraded.&quot;</strong></p>
<p>Danke fürs Lesen.</p>
<p>Bin ziemlicher Linux-Neuling. Wenn nicht alles Sinn macht und die Lösung auf der Hand liegt, bitte ich das zu entschuldigen. Ansonsten: Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/229589/linux-gt-iptables-cant-initialize-table-nat-need-to-insmod</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 03:04:06 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/229589.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 13 Dec 2008 23:44:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to linux-&amp;gt; iptables: cant initialize table nat (need to insmod?) on Sat, 13 Dec 2008 23:44:35 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich bekomme bei meinem Vorhaben folgende Fehlermeldung (Ubuntu 8.10):</p>
<p><strong>&quot;iptables v1.4.0: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)<br />
Perhaps iptables or your kernel needs to be upgraded.&quot;</strong></p>
<p>Möglicherweise reicht das schon aus, damit mir ein Linuxer sagen kann, was zu tun ist.</p>
<p>Ansonsten:</p>
<p>Die menuconfig des Kernels <strong>2.6.22.19</strong> (auf die ich angewiesen bin) bietet mir keine ersichtliche möglichkeit, NAT Unterstützung einzubinden.</p>
<p>Der Inhalt von<br />
<strong>/lib/modules/2.6.22.19-vs2.2.0.7/kernel/net/ipv4/netfilter/</strong><br />
ist wie folgt:</p>
<p><strong>arptable_filter.ko ip_queue.ko iptable_raw.ko ipt_ah.ko ipt_LOG.ko ipt_ttl.ko<br />
arp_tables.ko iptable_filter.ko ip_tables.ko ipt_ecn.ko ipt_recent.ko ipt_TTL.ko<br />
arpt_mangle.ko iptable_mangle.ko ipt_addrtype.ko ipt_ECN.ko ipt_REJECT.ko ipt_ULOG.ko</strong></p>
<p>Da fehlt, soweit ich das Problem eingrenzen konnte, die <strong>iptables_nat.ko</strong>.</p>
<p>Die Datei einfach aus dem Verzeichnis einer anderen (neueren) Kernelversion zu kopieren bringt nichts.<br />
Auch nicht mit dem /boot/config Eintrag CONFIG_IP_NF_NAT=y.</p>
<p>Ich vermute mal so einfach ist es nicht. Aber ich habe endlos gegoogelt und nichts gefunden.<br />
Laut apt ist iptables auf dem neusten Stand und ich finde keine klare Anleitung wie das Problem zu lösen ist. (Wie, in welcher Form, das Modul zu erweitern ist!?)</p>
<p>Hat jemand Rat?</p>
<p>Kurz zum Hintergrund:<br />
Habe Ubuntu 8.10 und führe einen gepatchten Kernel aus.<br />
Den Kernel musste ich für vserver patchen und das funktioniert nun alles auch problemlos.<br />
D.h. ich kann einen neuen vserver starten und die test-scripts laufen fehlerlos.<br />
Das Problem kommt beim verbinden meines virtuellen Rechners mit der Außenwellt: Wenn ich via NAT eine lokale IP meines virtuellen Systems per Portmapping mit meiner einzigen externen IP verbinden will:</p>
<p><strong>#iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -d ! 192.168.1.0/24 -j SNAT --to-source $meine_externe_IP<br />
-&gt;&quot;iptables v1.4.0: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)<br />
Perhaps iptables or your kernel needs to be upgraded.&quot;</strong></p>
<p>Danke fürs Lesen.</p>
<p>Bin ziemlicher Linux-Neuling. Wenn nicht alles Sinn macht und die Lösung auf der Hand liegt, bitte ich das zu entschuldigen. Ansonsten: Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1630159</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1630159</guid><dc:creator><![CDATA[LinuxAhnungsloser]]></dc:creator><pubDate>Sat, 13 Dec 2008 23:44:35 GMT</pubDate></item><item><title><![CDATA[Reply to linux-&amp;gt; iptables: cant initialize table nat (need to insmod?) on Sun, 14 Dec 2008 03:51:45 GMT]]></title><description><![CDATA[<p>Boote mal mit einen anderen Kernel und berichte...</p>
<p>Ivo</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1630197</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1630197</guid><dc:creator><![CDATA[Ivo]]></dc:creator><pubDate>Sun, 14 Dec 2008 03:51:45 GMT</pubDate></item><item><title><![CDATA[Reply to linux-&amp;gt; iptables: cant initialize table nat (need to insmod?) on Sun, 14 Dec 2008 11:10:58 GMT]]></title><description><![CDATA[<p>LinuxAhnungsloser schrieb:</p>
<blockquote>
<p>Die menuconfig des Kernels <strong>2.6.22.19</strong> (auf die ich angewiesen bin) bietet mir keine ersichtliche möglichkeit, NAT Unterstützung einzubinden.</p>
</blockquote>
<p>Das glaube ich nicht, da musst Du falsch nachgesehen haben:</p>
<pre><code>~ % uname -r
2.6.22.1
~ % zcat /proc/config.gz| grep 'NAT='
CONFIG_NF_NAT=m
~ %
</code></pre>
<p>Ach ja, zur Ergänzung:</p>
<pre><code>~ % lsmod | grep -i nat
iptable_nat            11268  1 
nf_nat                 19628  1 iptable_nat
nf_conntrack_ipv4      17676  4 iptable_nat
nf_conntrack           53384  4 iptable_nat,nf_nat,nf_conntrack_ipv4,xt_state
ip_tables              15572  2 iptable_nat,iptable_filter
x_tables               16132  4 iptable_nat,xt_tcpudp,xt_state,ip_tables
~ %
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1630269</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1630269</guid><dc:creator><![CDATA[nman]]></dc:creator><pubDate>Sun, 14 Dec 2008 11:10:58 GMT</pubDate></item><item><title><![CDATA[Reply to linux-&amp;gt; iptables: cant initialize table nat (need to insmod?) on Sun, 14 Dec 2008 18:24:35 GMT]]></title><description><![CDATA[<p>nman schrieb:</p>
<blockquote>
<p>LinuxAhnungsloser schrieb:</p>
<blockquote>
<p>Die menuconfig des Kernels <strong>2.6.22.19</strong> (auf die ich angewiesen bin) bietet mir keine ersichtliche möglichkeit, NAT Unterstützung einzubinden.</p>
</blockquote>
<p>Das glaube ich nicht, da musst Du falsch nachgesehen haben:</p>
</blockquote>
<p>Ich habe das hier bei der Kernelkonfiguration angewählt:<br />
&quot;IP tables support (required for filtering/masq/NAT) (IP_NF_IPTABLES)&quot;</p>
<p>Bei einem neueren Kernel (2.6.27.8) gibt es noch diese Unteroption:<br />
&quot;Full NAT (NF_NAT)&quot;</p>
<p>Die ist beim 2.6.22.19 aber eben nicht zu finden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1630439</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1630439</guid><dc:creator><![CDATA[LinuxAhnungsloser]]></dc:creator><pubDate>Sun, 14 Dec 2008 18:24:35 GMT</pubDate></item><item><title><![CDATA[Reply to linux-&amp;gt; iptables: cant initialize table nat (need to insmod?) on Sun, 14 Dec 2008 21:46:45 GMT]]></title><description><![CDATA[<p>Ok hat sich wohl erledigt.<br />
Die Option wurde wegen einem Abhängigkeitsproblem nicht angezeit. Erst durch vorherige Auswahl anderer Module.</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1630538</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1630538</guid><dc:creator><![CDATA[LinuxAhnungsloser]]></dc:creator><pubDate>Sun, 14 Dec 2008 21:46:45 GMT</pubDate></item><item><title><![CDATA[Reply to linux-&amp;gt; iptables: cant initialize table nat (need to insmod?) on Mon, 15 Dec 2008 12:39:38 GMT]]></title><description><![CDATA[<p>nman schrieb:</p>
<blockquote>
<pre><code>~ % uname -r
2.6.22.1
~ % zcat /proc/config.gz| grep 'NAT='
CONFIG_NF_NAT=m
~ %
</code></pre>
</blockquote>
<p>Du weißt aber schon, dass es zgrep gibt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1630743</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1630743</guid><dc:creator><![CDATA[Sys-Admin]]></dc:creator><pubDate>Mon, 15 Dec 2008 12:39:38 GMT</pubDate></item><item><title><![CDATA[Reply to linux-&amp;gt; iptables: cant initialize table nat (need to insmod?) on Mon, 15 Dec 2008 12:53:05 GMT]]></title><description><![CDATA[<p>Sys-Admin schrieb:</p>
<blockquote>
<p>Du weißt aber schon, dass es zgrep gibt?</p>
</blockquote>
<p>Ja, aber ist auf dem Rechner zerschossen. (Oder da war irgendeine händisch installierte Uralt-Version von irgendwann weiter vorne im PATH oder so; muss ich mir mal genauer ansehen.)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1630752</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1630752</guid><dc:creator><![CDATA[nman]]></dc:creator><pubDate>Mon, 15 Dec 2008 12:53:05 GMT</pubDate></item></channel></rss>