All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] iptables -m layer7 - doesn't work
@ 2005-08-02 13:32 ddaasd
  0 siblings, 0 replies; only message in thread
From: ddaasd @ 2005-08-02 13:32 UTC (permalink / raw)
  To: lartc

I've compiled my kernel (2.6.12.3) and iptables (1.3.3) and now -m
layer7 option from iptables works (i don't get any error when run the
iptables command with -m layer7).
The problem is that no packet is matched. For example iptables -A INPUT
-p tcp -m layer7 --l7proto http -j ACCEPT doesn't match http packets.
The same for dns and ssh.
So, what am I doing wrong? Is this extension for iptables really working??
I’ve tried on 2 systems (fc3 and slack 10.1)

Here is my iptables test script:
#!/bin/bash
iptables -F


iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT

iptables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
iptables -A OUTPUT -o eth0 -p tcp --sport 22 -j ACCEPT

iptables -A INPUT -i eth0 -p tcp -m layer7 --l7dir /home/dda/l7dir
--l7proto http -j ACCEPT
iptables -A OUTPUT -o eth0 -p tcp -m layer7 --l7dir /home/dda/l7dir
--l7proto http -j ACCEPT


iptables -A INPUT -i eth0 -p udp -m layer7 --l7dir /home/dda/l7dir
--l7proto dns -j ACCEPT
iptables -A OUTPUT -o eth0 -p udp -m layer7 --l7dir /home/dda/l7dir
--l7proto dns -j ACCEPT

iptables -P INPUT DROP
iptables -P OUTPUT DROP

and now: iptables -vnL after generating some http and dns traffic


Chain INPUT (policy DROP 56 packets, 8892 bytes)
pkts bytes target prot opt in out source destination
3340 134K ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
129 9208 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 LAYER7 l7proto http
0 0 ACCEPT udp -- eth0 * 0.0.0.0/0 0.0.0.0/0 LAYER7 l7proto dns

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
3340 134K ACCEPT all -- * lo 0.0.0.0/0 0.0.0.0/0
90 12254 ACCEPT tcp -- * eth0 0.0.0.0/0 0.0.0.0/0 tcp spt:22
0 0 ACCEPT tcp -- * eth0 0.0.0.0/0 0.0.0.0/0 LAYER7 l7proto http
0 0 ACCEPT udp -- * eth0 0.0.0.0/0 0.0.0.0/0 LAYER7 l7proto dns

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-08-02 13:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-02 13:32 [LARTC] iptables -m layer7 - doesn't work ddaasd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.