# How to find a kernel option in menuconfig? [SOLVED]

## SweepingOar

I'm trying to install xmail, but it gives me this error at the end of the emerge:

 *Quote:*   

>  * Recompile your kernel with CONFIG_NETFILTER and CONFIG_IP_NF_TARGET_REDIRECT
> 
>  * support enabled and reboot. Then try to emerge xmail-1.22 again.

 

I ran make menuconfig and found CONFIG_NETFILTER and enabled it, but I can't find CONFIG_IP_NF_TARGET_REDIRECT. Any ideas? Thanks.

----------

## tgR10

just find it in kernel config and edit from 

# CONFIG_NETFILTER is not set 

to

CONFIG_NETFILTER=y

```
echo CONFIG_NETFILTER=y >> /usr/src/linux/.config
```

should work if not do it manualy

----------

## SweepingOar

Thanks. I thought about doing that, but I'm a little wary of editing the .config file. Will my system crash and burn if that's not a valid option (for the kernel I'm using)?

If it's ok and the .config is ready to go, all I do is:

```

$ make && make modules_install

$ cp ./arch/i386/boot/bzImage /boot/kernel-2.6.18-gentoo-r5
```

Do I have to reboot?

----------

## tgR10

 *SweepingOar wrote:*   

> Thanks. I thought about doing that, but I'm a little wary of editing the .config file. Will my system crash and burn if that's not a valid option (for the kernel I'm using)?

 

no

 *SweepingOar wrote:*   

> 
> 
> If it's ok and the .config is ready to go, all I do is:
> 
> ```
> ...

 

yes

----------

## ok

make menuconfig (2.6.24):

```
   Location:                                                                                                                                                                                                   

│ Symbol: IP_NF_TARGET_REDIRECT [=n]                                                                                                                                                                            

│ Prompt: REDIRECT target support                                                                                                                                                                               

│   Defined at net/ipv4/netfilter/Kconfig:210                                                                                                                                                                   

│   Depends on: NET && INET && NETFILTER && NF_NAT                                                                                                                                                              

│   Location:                                                                                                                                                                                                   

│     -> Networking                                                                                                                                                                                             

│       -> Networking support (NET [=y])                                                                                                                                                                        

│         -> Networking options                                                                                                                                                                                 

│           -> Network packet filtering framework (Netfilter) (NETFILTER [=y])                                                                                                                                  

│             -> IP: Netfilter Configuration                                                                                                                                                                    

│               -> IP tables support (required for filtering/masq/NAT) (IP_NF_IPTABLES [=m])                                                                                                                    

│                 -> Full NAT (NF_NAT [=m])

```

While running 'make menuconfig' you can search for items by typing '/'.

----------

## SweepingOar

Thanks ok. The option isn't showing up in my menuconfig:

```
<*> IP tables support (required for filtering/masq/NAT)

< >   IP range match support

< >   TOS match support

< >   recent match support

< >   ECN match support

< >   AH match support

< >   TTL match support

< >   Owner match support

< >   address type match support

<*>   Packet filtering

<*>     REJECT target support

<*>   LOG target support

< >   ULOG target support
```

When I search for it, I get this output:

```
Symbol: IP_NF_TARGET_REDIRECT [=n]                                                                       x

Prompt: REDIRECT target support

 Defined at net/ipv4/netfilter/Kconfig:408

 Depends on: NET && INET && NETFILTER && (NF_NAT || IP_NF_NAT)

 Location:

   -> Networking

     -> Networking support (NET [=y])

       -> Networking options

         -> Network packet filtering framework (Netfilter) (NETFILTER [=y])

           -> IP: Netfilter Configuration
```

NET, INET and NETFILTER all seem to be set, but the word "redirect" doesn't appear in the file at all (even commented out), nor does "NF_NAT" or "IP_NF_NAT".

What I had to do was keep searching in menuconfig for the required "depends on" options, then finding and selecting them and then finally I was able to find the Redirect target support option and select it. Now hopefully I won't kill my system recompiling the kernel (and, and, and...).

----------

## Balancer

 *SweepingOar wrote:*   

> The option isn't showing up in my menuconfig:

 

Same in 2.6.24-r4 :-/Last edited by Balancer on Wed Apr 09, 2008 2:57 pm; edited 1 time in total

----------

## Balancer

If I append this option in .config manually, after genkernel they disappear.

----------

## Balancer

2.6.23-r9 - same:

[img]http://balancer.ru/cache/img/forums/0804/468x468/kernel-no-nf_nat.png[/img]

----------

## Balancer

Shown after adding all this:

```

CONFIG_INET=y 

CONFIG_IP_ADVANCED_ROUTER=y 

CONFIG_ASK_IP_FIB_HASH=y 

CONFIG_IP_FIB_HASH=y 

CONFIG_INET_XFRM_MODE_TRANSPORT=y 

CONFIG_INET_XFRM_MODE_TUNNEL=y 

CONFIG_INET_XFRM_MODE_BEET=y 

CONFIG_TCP_CONG_CUBIC=y 

CONFIG_DEFAULT_TCP_CONG="cubic" 

CONFIG_NETFILTER=y 

CONFIG_BRIDGE_NETFILTER=y 

CONFIG_NF_CONNTRACK_ENABLED=y 

CONFIG_NF_CONNTRACK=y 

CONFIG_NETFILTER_XTABLES=y 

CONFIG_NETFILTER_XT_MATCH_LIMIT=y 

CONFIG_NETFILTER_XT_MATCH_MAC=y 

CONFIG_NETFILTER_XT_MATCH_MARK=m 

CONFIG_NETFILTER_XT_MATCH_POLICY=m 

CONFIG_NETFILTER_XT_MATCH_STATE=m 

CONFIG_NF_CONNTRACK_IPV4=y 

CONFIG_NF_CONNTRACK_PROC_COMPAT=y 

CONFIG_IP_NF_IPTABLES=y 

CONFIG_IP_NF_FILTER=y 

CONFIG_IP_NF_TARGET_LOG=y 

CONFIG_IP_NF_MANGLE=y 

CONFIG_BRIDGE=m

```

----------

