Skip to contentSkip to conversation

iptables wishes

DISCUSSION Joel Newkirk 3 participants 4 messages Apr 1, 2003 – Apr 6, 2003

lore
Share & tools
lore
#0 lore raw

I haven't started a new thread here in ages, and this is something I've been toying with for a while. With the recent announcement of a feature-freeze on iptables 1.2.8, this seemed a reasonable time to start this thread. (targeting later releases, obviously, and hoping to spark some constructive discussion :^)

I was curious to hear what people might have as a 'wishlist' for iptables/netfilter capabilities. Every once in a while something comes up here that simply doesn't seem to have a good solution.

My hope is that many of our personal wishes may already be possible, and by voicing them someone who has a solution may post it. And for any that don't presently have an answer, perhaps someone will be inspired to create one.

Personally I have four:

1 - revamped LOG entry format, especially cleaning up MAC.

2 - completely separate netfilter logging from kernel log streams. (not just redirecting infrequently-used kernel streams, but actual dedicated netfilter streams)

3 - Ability to match "original DestinationIP" of a DNATted packet in subsequent chains. Useful with a single physical interface but multiple IPs bound to it.

4 - addition of support for a REM field in rules. Would do nothing whatsoever except print the specified REMark text at the end of the rule in -L listings. Something like:
iptables -A INPUT -p tcp --dport 22 -s a.b.c.d -j ACCEPT -REM JoelSSH So that a -L listing could be easier & quicker to decipher sometimes. It would also allow "iptables -L -v -n | grep Joel" to list only rules, in all chains, with "Joel" in the comment.

j

#1 lore raw
Quoted 3 lines · Joel Newkirk

Personally I have four:

1 - revamped LOG entry format, especially cleaning up MAC.

see the next remark.

Quoted 3 lines

2 - completely separate netfilter logging from kernel log streams. (not just redirecting infrequently-used kernel streams, but actual dedicated netfilter streams)

use ULOG
you can easily modify the format it uses for the logfile. that part of the source isn't complicated at all.

Quoted 3 lines

3 - Ability to match "original DestinationIP" of a DNATted packet in subsequent chains. Useful with a single physical interface but multiple IPs bound to it.

Already there, look at the conntrack match (ipt_conntrack)

iptables -A FORWARD -m conntrack --ctorigdst 1.1.1.1 -j ACCEPT

Quoted 7 lines

4 - addition of support for a REM field in rules. Would do nothing whatsoever except print the specified REMark text at the end of the rule in -L listings. Something like:
iptables -A INPUT -p tcp --dport 22 -s a.b.c.d -j ACCEPT -REM JoelSSH So that a -L listing could be easier & quicker to decipher sometimes. It would also allow "iptables -L -v -n | grep Joel" to list only rules, in all chains, with "Joel" in the comment.

Has been debated frequently, you can probably find some of the discussions by using google.

Signature · 1 line
/Martin
#2 lore raw
Quoted 7 lines · Martin Josefsson
Quoted 3 lines · Joel Newkirk

Personally I have four:

1 - revamped LOG entry format, especially cleaning up MAC.

see the next remark.

Quoted 7 lines
Quoted 3 lines

2 - completely separate netfilter logging from kernel log streams. (not just redirecting infrequently-used kernel streams, but actual dedicated netfilter streams)

use ULOG
you can easily modify the format it uses for the logfile. that part of the source isn't complicated at all.

Thanks. Digging further into ULOG is something that's been on my to-do list for a while now. I'm interested in setting up remote logging such as is possible with syslog. If necessity doesn't drive me to it sooner, I'll probably attack this in a few months.

Quoted 5 lines
Quoted 3 lines

3 - Ability to match "original DestinationIP" of a DNATted packet in subsequent chains. Useful with a single physical interface but multiple IPs bound to it.

Already there, look at the conntrack match (ipt_conntrack)

Wow. Never found this before, but I see it in the source for the CVS version I just downloaded, and after looking again I found it in the Netfilter Extensions HowTo. Thanks!

Quoted 1 line

iptables -A FORWARD -m conntrack --ctorigdst 1.1.1.1 -j ACCEPT

j

#3 lore raw
In reply to Joel Newkirk

Hi Joel,

Quoted 1 line

2 - completely separate netfilter logging from kernel log streams.

(not

Quoted 1 line

just redirecting infrequently-used kernel streams, but actual

dedicated

Quoted 1 line

netfilter streams)

What about including the ability to do a full datastream logging within a fixed [rrd-database] size, e.g. the last 50 Kbyte sent through the netfilter stack, at best also available as an per-connection stream?

Or statistics not only about the amount of connections within the netfilter at a certain time, but also to build some averages.

Are there already any solutions?

Sincerely

.\\ichael