# Iptables ULOG obsolete, how to do userspace logging?

## alexeen

Hi,

I'm wondering if anyone know how to set up logging for iptables with NETLINK stuff as the ULOG option is now obsolete.  :Very Happy: 

Thanx.

----------

## limn

Try enabling Netfilter netlink interface and Netfilter LOG over NFNETLINK interface and disable ULOG target support.

```
Networking options  ---> 

  [*] Network packet filtering (replaces ipchains)  ---> 

     <*>   Netfilter netlink interface                                

     < >      Netfilter NFQUEUE over NFNETLINK interface (NEW)

     <M>         Netfilter LOG over NFNETLINK interface                 

                IP: Netfilter Configuration  ---> 

                     < >   ULOG target support (OBSOLETE) 
```

It doesn't appear that any changes are needed for iptables rules  or ulogd.

----------

## alexeen

Thanx for the reply, but say if I have a line like:

iptables .... --ulog-prefix "REJECT: " --ulog-qthreshold 10

What args do I use now to control prefix and qthreshold?  :Embarassed: 

Thank you.

----------

## limn

The iptables arguments shouldn't change. The kernel configuration would.

I made the kernel config changes on a box yesterday and -j ULOG worked.

I just tried to replicate that on another box today and it is failing.

I rebooted the first box and it is failing there now.

Not sure yet what is going on.

----------

## alexeen

The thing is, if we do not include the ULOG kernel option, iptables will not be able to send the packets to the ULOG chain. I am unable to find a single documentation regarding the obsolescence of ULOG and how to setup user space logging over NETLINK interface.

The most relevant info I've been able to locate are as follows:

http://www.netfilter.org/documentation/HOWTO//netfilter-extensions-HOWTO-4.html#ss4.3

http://www.franken.de/de/veranstaltungen/kongress/2002/netfilter.pdf

Maybe this requires iptables2 with ulog2 or something.    :Confused: 

----------

## limn

I was confused when I thought I had it working....

Looks like these are needed:

libnfnetlink

libnetfilter_log

etc

You may want to fill out a bug report requesting ebuild(s).

----------

## MrUlterior

Perhaps this (http://www.nufw.org) is what you're looking for?

----------

## alexeen

Eh? that has nothing to do with it.

What we need is what limn said:

libnfnetlink: https://svn.netfilter.org/netfilter/trunk/libnfnetlink/

libnetfilter_log: https://svn.netfilter.org/netfilter/trunk/libnetfilter_log/

ulogd2: http://svn.gnumonks.org/branches/ulog/ulogd2/

Linux Kernel: 2.6.14+ with proper options set

----------

## MrUlterior

 *alexeen wrote:*   

> Eh? that has nothing to do with it.
> 
> What we need is what limn said:
> 
> libnfnetlink: https://svn.netfilter.org/netfilter/trunk/libnfnetlink/
> ...

 

Sorry, I thought that you wanted logging, whcih this seems to do

http://www.nufw.org/docs/references.html#id2452482

----------

