View previous topic :: View next topic |
Author |
Message |
Zarathustra[H] Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/79354631457878a5a5ced.jpg)
Joined: 30 Dec 2002 Posts: 389 Location: Cambridge, MA, USA
|
Posted: Thu Mar 27, 2003 10:13 pm Post subject: ip tables issues... |
|
|
Hey all..
I'm not particularly good at configuring firewalls manually, so I decided to try some of the GUI alternatives out there.
I have tried both firestarter and kmyfirwall from the portage tree.
Neither of them work.
The error from kmyfirwall looks like this:
Code: | modprobe: Can't locate module ip_tables
iptables v1.2.7a: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded. |
iptables is definitely emerged on my system.
This means its likely I am missing some kernel option, but whihc one? What options should I compile in or compile as modules in order to use iptables?
Thanks,
Matt _________________ ----
Athlon 64 3000+ / 1Gb Kingston Hyperx PC3500 / MSI K8N Neo / Geforce 6800GT
---- |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ian Goldby Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/3efe00093cf54ba356f49.jpg)
Joined: 18 May 2002 Posts: 539 Location: (Inactive member)
|
Posted: Thu Mar 27, 2003 11:17 pm Post subject: |
|
|
If you compile all of the 'IP: Netfilter Configuration --->' options as modules it will do no harm. Only the ones that are needed for your firewall rules will be loaded. You'll need of course 'Network packet filtering (replaces ipchains)' as well. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Zarathustra[H] Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/79354631457878a5a5ced.jpg)
Joined: 30 Dec 2002 Posts: 389 Location: Cambridge, MA, USA
|
Posted: Fri Mar 28, 2003 10:40 pm Post subject: |
|
|
iangoldby wrote: | If you compile all of the 'IP: Netfilter Configuration --->' options as modules it will do no harm. Only the ones that are needed for your firewall rules will be loaded. You'll need of course 'Network packet filtering (replaces ipchains)' as well. |
Thank you for your help.
I have tried to compile these in as modules, but I get a error
Any ideas what could casue the error below?
Code: | ipt_realm.c: In function `match':
ipt_realm.c:29: structure has no member named `tclassid'
make[2]: *** [ipt_realm.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r2/net/ipv4/netfilter'
make[1]: *** [_modsubdir_ipv4/netfilter] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r2/net'
make: *** [_mod_net] Error 2
|
Thanks,
Matt _________________ ----
Athlon 64 3000+ / 1Gb Kingston Hyperx PC3500 / MSI K8N Neo / Geforce 6800GT
---- |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ian Goldby Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/3efe00093cf54ba356f49.jpg)
Joined: 18 May 2002 Posts: 539 Location: (Inactive member)
|
Posted: Sat Mar 29, 2003 5:02 pm Post subject: |
|
|
The dreaded Kernel Build errors...
The usual solution is to copy your .config file to a safe place, then copy .config back, then Code: | # make menuconfig
# make dep
# make clean && make bzImage modules modules_install |
If that doesn't work, post a bit more of the error message and I hope someone will be able to help. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
tmo318 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Funny_Figure/gruft.gif)
Joined: 17 Mar 2003 Posts: 21 Location: Minnesota
|
Posted: Sun Mar 30, 2003 9:08 pm Post subject: |
|
|
I have the same problem as the original poster. I tried the
# make mrproper
# make menuconfig
# make dep
# make clean && make bzImage modules modules_install
Here is the error message that I get.
KBUILD_BASENAME=ip_conntrack_ftp -c -o ip_conntrack_ftp.o ip_conntrack_ftp.c
ip_conntrack_ftp.c:439: parse error before "this_object_must_be_defined_as_export_objs_in_the_Makefile"
ip_conntrack_ftp.c:439: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile'
ip_conntrack_ftp.c:439: warning: data definition has no type or storage class
make[3]: *** [ip_conntrack_ftp.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r2/net/ipv4/netfilter'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r2/net/ipv4/netfilter'
make[1]: *** [_subdir_ipv4/netfilter] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r2/net'
make: *** [_dir_net] Error 2
I think it might have to do with export_objs in the Makefile, but I do not know what that is.
Thanks
Tim |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
gondoi Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/5522552643e8cf37bcc745.jpg)
Joined: 27 Mar 2003 Posts: 138 Location: San Angelo, TX
|
Posted: Wed Apr 02, 2003 2:26 am Post subject: same errors |
|
|
I am getting the same errors on compile too.
I have all of them as modules.
Does anyone know the solution? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
papabean Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/158320210258c42d11512e2.jpg)
Joined: 26 Oct 2002 Posts: 130 Location: Sacramento, California
|
Posted: Wed Apr 02, 2003 6:36 am Post subject: |
|
|
After reading this:
Quote: | If you compile all of the 'IP: Netfilter Configuration --->' options as modules it will do no harm. Only the ones that are needed for your firewall rules will be loaded. You'll need of course 'Network packet filtering (replaces ipchains)' as well. |
I decided to give it a go and had similar errors during the kernel compilation.
To clear them, I deselected the following:
Code: | < > TIME match support (EXPERIMENTAL)
< > IPV4OPTIONS match support (EXPERIMENTAL)
< > realm match support |
After that, I was able to compile just fine and the dynfw scripts and iptables seem to work just fine. _________________ -- The world is full of tough guys. It doesn't need me to be one too. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
coolcut n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Star Wars/movie_star_wars_storm_trooper.gif)
Joined: 21 Jan 2003 Posts: 21 Location: Belgium
|
Posted: Wed Apr 02, 2003 7:19 pm Post subject: |
|
|
under which section can I find the options Ip: Netfilter Configuration?
Because I cannot find it under the Network Options???
Tnx |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
papabean Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/158320210258c42d11512e2.jpg)
Joined: 26 Oct 2002 Posts: 130 Location: Sacramento, California
|
Posted: Wed Apr 02, 2003 10:14 pm Post subject: |
|
|
It can be found under:
Code: | Networking options ---> |
Make sure you select:
Code: | [*] Network packet filtering (replaces ipchains) |
And then you'll be able to select modules under:
Code: | IP: Netfilter Configuration ---> |
![Smile :)](images/smiles/icon_smile.gif) _________________ -- The world is full of tough guys. It doesn't need me to be one too. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
OdinsDream Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1858c05e3cf8f229cadc2.gif)
Joined: 01 Jun 2002 Posts: 1057
|
Posted: Thu Apr 03, 2003 6:04 am Post subject: |
|
|
I doubt you'll need to enable all of the options... I'm using iptables to do masquerading and NAT translation for my network from gentoo. My kernel config is as follows:
Code: |
IP: Netfilter Configuration -->
<*> Connection Tracking (required for masq/NAT)
<*> FTP protocol support (NEW)
<*> IP Tables support (required for filtering/masq/NAT)
<*> Connection state match support (NEW)
<*> Packet Filtering (NEW)
<*> REJECT target support (NEW)
<*> Full NAT (NEW)
<*> MASQUERADE target support (NEW)
<*> REDIRECT target support (NEW)
<*> Packet mangling (NEW)
<*> LOG target support (NEW)
|
This was, mind you, following a howto specifically for masquerading/NAT. So, maybe you'll need more things than this, but, at least this can give you guys somewhere to start. My kernel compiled fine this way. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
papabean Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/158320210258c42d11512e2.jpg)
Joined: 26 Oct 2002 Posts: 130 Location: Sacramento, California
|
Posted: Thu Apr 03, 2003 6:57 am Post subject: |
|
|
In your estimation, is it better to have the filtering options compiled directly into the kernel or as modules? _________________ -- The world is full of tough guys. It doesn't need me to be one too. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
wolf31o2 Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/1906444432453e19c03fc1c.jpg)
Joined: 31 Jan 2003 Posts: 628 Location: Mountain View, CA
|
Posted: Thu Apr 03, 2003 3:10 pm Post subject: |
|
|
Personally, I keep all the filtering options directly in the kernel. I do this because I enable my filtering rules before I allow my networking to start. This way I am protected at all times. After all, you never know when that magic packet might just come in in the few seconds between interface going up and filter rules being applied. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
LornKnight n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/20174705123e8db31b6dda5.gif)
Joined: 04 Apr 2003 Posts: 31 Location: St. Louis, Missouri - USA
|
Posted: Fri Apr 04, 2003 8:41 pm Post subject: |
|
|
What kernel is everyone using, the latest (that would be gentoo-sources 2.4.20_rc2 as of this time of writing as far as I know)?
I have had seemingly infinite trouble with iptables, be it a set of modules or compiled directly into the kernel, in the gentoo-sources kernels 2.4.20_rc1 and rc2. I had tried all the above mentioned fixes, yet, I still could not manage to get iptables working.
In the end, I had to revert to the gentoo-sources 2.4.19_rc9 kernel. Everything iptables related works fine in this version, at least it does for me. Also a few more GRSecurity options that I like to enable seem to be available in 2.4.19_rc9 as well.
Im not sure if people are still having problems, but if you simply must have iptables working, and you are using the latest gentoo-sources 2.4.20_rc2 kernel, you might try using the gentoo-sources 2.4.19_rc9 kernel instead to see if that might help fix any iptables issues. It worked well for me. _________________ What the hell, he thought, you're only young once, and threw himself out of the window.
That would at least keep the element of surprise on his side. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
atze n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 14 Jul 2002 Posts: 55
|
Posted: Sat Apr 05, 2003 4:52 pm Post subject: |
|
|
Hi everyone,
I have the same problem:
modprobe: Can't locate module ip_tables
But I have compiled the kernel as you all have said above. Is it becouse I have compiled the Network packet filtering (replaces ipchains) directly in the kernel?
Thanks in advance
Atze |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Zarathustra[H] Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/79354631457878a5a5ced.jpg)
Joined: 30 Dec 2002 Posts: 389 Location: Cambridge, MA, USA
|
Posted: Sun Apr 06, 2003 10:30 pm Post subject: |
|
|
iangoldby wrote: | The dreaded Kernel Build errors...
The usual solution is to copy your .config file to a safe place, then copy .config back, then Code: | # make menuconfig
# make dep
# make clean && make bzImage modules modules_install |
If that doesn't work, post a bit more of the error message and I hope someone will be able to help. |
Thanks for your help, but unfortunately the make mrproper solution didnt work.
Could this be a bug in the kernel, or has anyone successfully compiled all the IP:Netfilter configuration sucessfully with gentoo-2.4.20-r2? Maybe I should jsut use gentoo-2.4.19-r10, since it has been way more stable..
One possibility is that it is a module I wont need anyway that is failing. Any suggestions of exactly which modules to include for a standard personaly firewall application?
Thanks,
Matt _________________ ----
Athlon 64 3000+ / 1Gb Kingston Hyperx PC3500 / MSI K8N Neo / Geforce 6800GT
---- |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
LornKnight n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/20174705123e8db31b6dda5.gif)
Joined: 04 Apr 2003 Posts: 31 Location: St. Louis, Missouri - USA
|
Posted: Tue Apr 08, 2003 3:37 pm Post subject: |
|
|
I have had virtually the same problems with the 2.4.20_rc1 and & rc2 kernels. I would revert to the 2.4.19_rc10 or rc9 kernel. That is what I did to get iptables working.
In my 2.4.19_rc9 kernel, I have 'Network Packet Filtering (replaces ipchains)' (CONFIG_NETFILTER) compiled directly into the kernel, and the other options under 'IP Netfilter Configuration --->' are compiled as modules.
Only the necessary modules for your firewall rules will be inserted, at least as far as I can tell. _________________ What the hell, he thought, you're only young once, and threw himself out of the window.
That would at least keep the element of surprise on his side. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
GentooOpus n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Southpark/South_Park_-_Mr_Mackey.jpg)
Joined: 31 Mar 2003 Posts: 25 Location: Asheboro, NC
|
Posted: Wed Apr 09, 2003 2:04 am Post subject: |
|
|
I think its strictly related to the gentoo-sources kernel series.
I've got identically configured kernels (were possible) one is a non-gentoo vanilla source from kernel.org (2.4.20) and the other is the the gentoo-2.4.20-rc2 series.
I had trouble immediately with nat/masq on my home network. I at first thought it might have been firestarter but I switch to shorewall and experienced the same problems.
From the limited information that I can get out of the iptables/firewall debug all of the modules associated with Masquerade, TOS, and ECN are completely hosed!!! I say limited because the information is sparce, I can't even seem to get iptables debug to function properly. I've even mrpropered the kernel and rebuilt but no result.
Fortunately, the only thing that I needed/wanted from the gentoo kernel is the scheduler and preempt kernel options. So switching back causes no major loss of function.
Opus
-----------------------------
Anyone notice that MSN's mascot is a bug? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Zarathustra[H] Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/79354631457878a5a5ced.jpg)
Joined: 30 Dec 2002 Posts: 389 Location: Cambridge, MA, USA
|
Posted: Wed Apr 09, 2003 4:51 pm Post subject: |
|
|
GentooOpus wrote: | I think its strictly related to the gentoo-sources kernel series. |
I guess we can just add that to the problems associated with the patched 2.4.20 kernels in the portage tree...
I mean the realtek network card problems
ACPI problems
and netfilter issues...
Funnily enough these issues seem to be present in ALL patched 2.4.20 portage tree kernels, but not in the vanilla kernel. 2.4.19 patched kernels didnt have these problems.
Could it just be that someone patched the 2.4.20 kernels really poorly?
/Matt _________________ ----
Athlon 64 3000+ / 1Gb Kingston Hyperx PC3500 / MSI K8N Neo / Geforce 6800GT
---- |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pashvin n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 26 Apr 2003 Posts: 2 Location: Newcastle, UK
|
Posted: Sat Apr 26, 2003 5:33 pm Post subject: |
|
|
tmo318 wrote: | I have the same problem as the original poster. I tried the
# make mrproper
# make menuconfig
# make dep
# make clean && make bzImage modules modules_install
Here is the error message that I get.
KBUILD_BASENAME=ip_conntrack_ftp -c -o ip_conntrack_ftp.o ip_conntrack_ftp.c
ip_conntrack_ftp.c:439: parse error before "this_object_must_be_defined_as_export_objs_in_the_Makefile"
ip_conntrack_ftp.c:439: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile'
ip_conntrack_ftp.c:439: warning: data definition has no type or storage class
make[3]: *** [ip_conntrack_ftp.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r2/net/ipv4/netfilter'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r2/net/ipv4/netfilter'
make[1]: *** [_subdir_ipv4/netfilter] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r2/net'
make: *** [_dir_net] Error 2
|
I'm getting the same errors trying to compile Gentoo 2.4.20 r2, did anybody resolve this? I used these netfilter options first,
Quote: | CONFIG_IP_NF_CONNTRACK=m
CONFIG_IP_NF_FTP=m
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_LIMIT=m
CONFIG_IP_NF_MATCH_MAC=m
CONFIG_IP_NF_MATCH_PKTTYPE=m
CONFIG_IP_NF_MATCH_MULTIPORT=m
CONFIG_IP_NF_MATCH_MPORT=m
CONFIG_IP_NF_MATCH_TOS=m
CONFIG_IP_NF_MATCH_PSD=m
CONFIG_IP_NF_MATCH_CONDITION=m
CONFIG_IP_NF_MATCH_STEALTH=m
CONFIG_IP_NF_MATCH_HELPER=m
CONFIG_IP_NF_MATCH_STATE=m
CONFIG_IP_NF_MATCH_UNCLEAN=m
CONFIG_IP_NF_MATCH_OWNER=m
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_LOG=y |
then I stripped it down leaving those below, trying what's left both as modules and compiled directly in (and using mrproper), but still get the same errors.
Quote: | CONFIG_IP_NF_CONNTRACK=y
CONFIG_IP_NF_FTP=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_LIMIT=y
CONFIG_IP_NF_MATCH_MULTIPORT=y
CONFIG_IP_NF_MATCH_STATE=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_LOG=y |
Could some non-iptables compile options be interfering? Oh well, back to 2.4.19 r10 for now, and patching my own kernel on the burgeoning 'suss it out' list. ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Genone Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/21004157514287ab2b29021.jpg)
Joined: 14 Mar 2003 Posts: 9625 Location: beyond the rim
|
Posted: Sat Apr 26, 2003 6:16 pm Post subject: |
|
|
The "realm" option in netfilter seems to be broken, but I have all other netfilter options successfully compiled as modules or in the kernel on my router which is running gentoo-sources-2.4.20-r2, even the ipv6 ones. But I agree that the patches for gentoo-sources-2.4.20 were not really tested, I have several other problems with these were vanilla-sources-2.4.20 and gentoo-sources-2.4.19 don't make any problems (vesafb and ipsec come to my mind). |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pashvin n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 26 Apr 2003 Posts: 2 Location: Newcastle, UK
|
Posted: Sun Apr 27, 2003 10:02 am Post subject: |
|
|
If anyone still has that compile error with ftp conntrack, I emerged gentoo-sources 2.4.20-r3 and it's compiled ok with the same modules. Early days but everything seems to be working fine, including iptables. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
nightfr3ak n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 07 Aug 2003 Posts: 8
|
Posted: Fri Aug 08, 2003 1:29 am Post subject: |
|
|
i'm having the same problem with make modules as well...so what's the final solution? simply remove realm option?
thanks |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
funkmankey Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/140919111244b5313979cec.jpg)
Joined: 06 Mar 2003 Posts: 304 Location: CH
|
Posted: Fri Aug 08, 2003 1:48 am Post subject: |
|
|
also ran into the realm error a while ago.
after searching either here or in gooja, I read something about realm having a dependency that was not automatically flagged.
I never ended up having a use for it anyway, just unselected it. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
uzik Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 17 Apr 2003 Posts: 257
|
Posted: Fri Aug 08, 2003 10:36 pm Post subject: |
|
|
I had a tough time getting iptables to work too. I put it in as built into the kernel. It took a bit to find all the options that were necessary since many of them are NOT obvious. Good luck with it! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|