Gentoo - Emerging IPTables - kernel identification error

I am trying to set up an iptables firewall. I am emerging the IPTables package, and, I guess it wants to know about what kernel I am running. It is looking at /usr/src/linux for this info. I guess I don't have the source their from which my linnode kernel is built, so I get the following error.

Can anyone help me get past this?

bongo root # emerge iptables
Calculating dependencies ...done!
>>> emerge (1 of 1) net-firewall/iptables-1.2.9 to /
>>> Downloading http://gentoo.oregonstate.edu/distfiles/iptables-1.2.9.tar.bz2
--23:43:54--  http://gentoo.oregonstate.edu/distfiles/iptables-1.2.9.tar.bz2
           => `/usr/portage/distfiles/iptables-1.2.9.tar.bz2'
Resolving gentoo.oregonstate.edu... 128.193.0.3
Connecting to gentoo.oregonstate.edu[128.193.0.3]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 186,808 [application/x-tar]

100%[================================================>] 186,808        1.12M/s

23:43:55 (1.12 MB/s) - `/usr/portage/distfiles/iptables-1.2.9.tar.bz2' saved [186808/186808]

>>> md5 src_uri ;-) iptables-1.2.9.tar.bz2
>>> Unpacking source...
>>> Unpacking iptables-1.2.9.tar.bz2 to /var/tmp/portage/iptables-1.2.9/work
 * Applying various patches (bugfixes/updates)...
 *   01_all_grsecurity.patch.bz2...                                                   [ ok ]
 *   02_all_imq.patch.bz2...                                                          [ ok ]
 *   04_all_install_ipv6_apps.patch.bz2...                                            [ ok ]
 *   05_all_install_all_dev_files.patch.bz2...                                        [ ok ]
 *   06_all_l7.patch.bz2...                                                           [ ok ]
 * Done with patching
>>> Source unpacked.
 *
 * Could not determine your kernel version.
 * Make sure that you have /usr/src/linux symlink.
 * And that said kernel has been configured.
 * You can also simply run the following command
 * in the kernel referenced by /usr/src/linux:
 *  make include/linux/version.h
 *

!!! ERROR: net-firewall/iptables-1.2.9 failed.
!!! Function check_KV, Line 256, Exitcode 0
!!! (no error message)

2 Replies

Sorry I can't give you specific files to edit, but from another Linode user:

"One work-around is to comment out the check_KV function in the iptables build."

I believe this has already been logged as a bug with the Gentoo folks. /proc/version would be a lot easier, but since it's Gentoo I suspect they figure the kernel sources will always be there…

-Chris

Or just emerge a similar kernel source, like vanilla-sources. It's close enough for iptables. Works for me.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct