Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-26-2006, 01:14 AM   #1
Registered: Jan 2004
Location: Delaware
Distribution: gentoo
Posts: 96

Rep: Reputation: 15
compiling iptables_nat into my kernel =/

i just can't figure out how to do it!

this box is running gentoo, with a 2.6.17 kernel

in make menuconfig, i've tried messing with the networking ==> networking options ==> network packet filtering section, but no matter how many times i try, i just can't seem to get it to work!

its been a while since i've touched linux, so im a bit rusty, but i used to use the following set of commands to enable nat to share my box's internet connection

modprobe iptable_nat
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
however, these commands fail because it cant find the module iptable_nat

localhost linux # modprobe iptable_nat
FATAL: Module iptable_nat not found.
localhost linux # iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
FATAL: Module ip_tables not found.
iptables v1.3.5: can't initialize iptables table `nat': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
so, can you guys help me get this module up and running? >.< i hate using my router to distribute internet xD
Old 09-26-2006, 03:21 AM   #2
Registered: Jun 2006
Location: Belarus
Distribution: Debian GNU/Linux testing/unstable
Posts: 471

Rep: Reputation: 40
Well, there no module ip_tables compiled in your kernel. You should recompile it with packet filtering options included.
Old 09-26-2006, 09:15 PM   #3
Registered: Jan 2004
Location: Delaware
Distribution: gentoo
Posts: 96

Original Poster
Rep: Reputation: 15
thats the problem im having (recompiling my kernel with packet filtering options)!

modprobe ip_tables works

modprobe iptable_nat does not!

i've tried enabling like everything in the networking options section involving packet filtering/iptables/nat, but i obviously keep missing something!

by the way, the last time i got this to work was on a 2.4 kernel (a preconfigured debian kernel)...

summary: i need to know how to configure my 2.6 kernel on gentoo to support iptables with packet filtering support (nat, in specific)... >.<

i'm not really sure what else to post, so if you you need any files/logs/whatever, just ask

Old 09-26-2006, 09:45 PM   #4
Registered: Jan 2004
Location: Delaware
Distribution: gentoo
Posts: 96

Original Poster
Rep: Reputation: 15
well, i just recompiled my kernel again and i got it! dunno what made this time different than my other futile attempts, but i have the module now *saves kernel config data* now i just gotta hope my forwarding will work


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling kernel problem --- Kernel panic: unable to mount root fs ........ anthonymts123 Linux - General 5 07-31-2006 03:29 AM
Errors Compiling Kernel 2.6 on Slackware 10.2 - Old kernel headers required? Dave S. Slackware 8 03-04-2006 01:15 AM
Compiling kernel module for linux kernel 2.4 in 2.6 guam Linux - Software 0 01-13-2005 03:02 AM
Where Is Kernel Directory In Rh9(kernel 2.4.20-8), For Compiling HSP56 MR(pctel) Mode rudy3107 Linux - Software 1 07-25-2004 05:17 AM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 06:31 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:50 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration