# iptables doesn't recognize LOG chain

## VentureQc

Until recently I was running a Gentoo machine that was extremely outdated.  Since I was unable to updated it, I did a fresh install.  Everything went smoothly until I started configuring iptables.  My old rule sets throw errors they never used to.  I was able to narrow it down to the LOG chain.

Running the following script:

```

/sbin/iptables -N LOG_DROP

/sbin/iptables -A LOG_DROP -j LOG --log-prefix "iptables drop: " --log-level 7

/sbin/iptables -A LOG_DROP -j DROP

```

Results in the following:

 *Quote:*   

> 
> 
> iptables: No chain/target/match by that name.
> 
> 

 

I've tried researching the problem but I've come up dry.  Any suggestions?

----------

## dataking

Make sure you have the LOG target enabled in the kernel.  Since you did a fresh install, you likely have a new kernel, and it may not have that option enabled.  I've stubbed my toe on this multiple times.  

Do a kernel config/build with your method of choice (i prefer genkernel, but there are arguments both for and against); reboot into the new kernel and you should be good to go.

----------

## VentureQc

You were right.  I compiled the relevant module and it works perfectly.  Thanks!

----------

## dataking

 *VentureQc wrote:*   

> You were right.  I compiled the relevant module and it works perfectly.  Thanks!

 

Great!  Glad to help.  

If you could add a "Solved" to the original post's subject, maybe others will find it useful, as well.

----------

