Hi, I can send packets from the mangle chain to l7-filter, but
analyzing packets in output on the filter chain you can see packets
had not been marked.
l7-filter loads all the patterns flawlessly and does not give any error.
### POLICY ###
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP
iptables -t mangle -A FORWARD -i ppp0 -o eth1 -j NFQUEUE --queue-num 1
iptables -t mangle -A FORWARD -i eth1 -o ppp0 -j NFQUEUE --queue-num 1
# CHAIN #
iptables -N INtoOUT
iptables -N OUTtoIN
iptables -N INTERNETWORK
# FORWARD to CHAIN #
iptables -A FORWARD -i ppp0 -j OUTtoIN
iptables -A FORWARD -o ppp0 -j INtoOUT
iptables -A FORWARD -j DROP
iptables -A OUTtoIN -o eth1 -m mark --mark 4 -j ACCEPT
iptables -A OUTtoIN -o eth1 -p udp --dport 5060 -m mark --mark 7 -j ACCEPT
iptables -A OUTtoIN -o eth1 -p udp --dport 1:2 -m mark --mark
8 -j ACCEPT
iptables -A OUTtoIN -o eth1 -m mark --mark 5 -j ACCEPT
iptables -A OUTtoIN -j DROP
iptables -A INtoOUT -i eth1 -m mark --mark 3 -j ACCEPT
iptables -A INtoOUT -i eth1 -m mark --mark 4 -j ACCEPT
iptables -A INtoOUT -i eth1 -m mark --mark 5 -j ACCEPT
iptables -A INtoOUT -i eth1 -m mark --mark 6 -j ACCEPT
iptables -A INtoOUT -i eth1 -m mark --mark 7 -j ACCEPT
iptables -A INtoOUT -i eth1 -m mark --mark 8 -j ACCEPT
iptables -A INtoOUT -i eth1 -j LOG --log-prefix "DROP!!! "
iptables -A INtoOUT -j DROP
# l7-filter -f /etc/l7-protocols/l7filter.conf -q 1 -vv -p
/etc/l7-protocols/protocols/
Attempting to read configuration from /etc/l7-protocols/l7filter.conf.metano
Attempting to load pattern from /etc/l7-protocols/protocols///imap.pat
pattern='^(\* ok|a[0-9]+ noop)'
eflags=0 cflags=11
Added: imap mark=3
Attempting to load pattern from /etc/l7-protocols/protocols///pop3.pat
pattern='^(\+ok |-err )'
eflags=0 cflags=11
Added: pop3 mark=3
Attempting to load pattern from /etc/l7-protocols/protocols///smtp.pat
pattern='^220[\x09-\x0d -~]* (E?SMTP|[Ss]imple [Mm]ail)'
eflags=0 cflags=9
Added: smtp mark=3
Attempting to load pattern from /etc/l7-protocols/protocols///http.pat
pattern='http/(0\.9|1\.0|1\.1) [1-5][0-9][0-9] [\x09-\x0d
-~]*(connection:|content-type:|content-length:|date:)|post [\x09-\x0d
-~]* http/[01]\.[019]'
eflags=0 cflags=11
Added: http mark=4
Attempting to load pattern from /etc/l7-protocols/protocols///ftp.pat
pattern='^220[\x09-\x0d -~]*ftp'
eflags=0 cflags=11
Added: ftp mark=4
Attempting to load pattern from /etc/l7-protocols/protocols///dns.pat
pattern='^.?.?.?.?[\x01\x02].?.?.?.?.?.?[\x01-?][a-z0-9][\x01-?a-z]*[\x02-\x06][a-z][a-z][fglmoprstuvz]?[aeop]?(um)?[\x01-\x10\x1c][\x01\x03\x04\xFF]'
eflags=0 cflags=11
Added: dns mark=5
Attempting to load pattern from /etc/l7-protocols/protocols///vnc.pat
pattern='^rfb 00[1-9]\.00[0-9]\x0a$'
eflags=0 cflags=11
Added: vnc mark=6
Attempting to load pattern from /etc/l7-protocols/protocols///sip.pat
pattern='^(invite|register|cancel|message|subscribe|notify)
sip[\x09-\x0d -~]*sip/[0-2]\.[0-9]'
eflags=0 cflags=11
Added: sip mark=7
Attempting to load pattern from /etc/l7-protocols/protocols///rtp.pat
pattern='^\x80[\x01-"`-\x7f\x80-\xa2\xe0-\xff]?..*\x80'
eflags=0 cflags=11
Added: rtp mark=8
Made key from ct: udp 17 src=192.168.2.3 dst=151.99.125.2
sport=33765 dport=53
Made key from ct: udp 17 src=192.168.2.3 dst=151.99.125.2
sport=45219 dport=53
Got packet, had no ct: udp 17 src=62.10.112.29 dst=192.168.1.159
sport=5061 dport=5060
Got packet, had no ct: udp 17 src=192.168.1.159 dst=151.99.250.2
sport=53310 dport=53
Got packet, had no ct: udp 17 src=192.168.1.233 dst=8.8.8.8
sport=58489 dport=53
Got packet, had no ct: udp 17 src=192.168.1.233 dst=8.8.8.8
sport=39654 dport=53
Got packet, had no ct: udp 17 src=62.10.112.29 dst=192.168.1.159
sport=5061 dport=5060
Got packet, had no ct: udp 17 src=192.168.1.233 dst=8.8.8.8
sport=46075 dport=53
Got packet, had no ct: udp 17 src=192.168.1.233 dst=8.8.8.8
sport=56026 dport=53
Got packet, had no ct: udp 17 src=192.168.1.233 dst=8.8.8.8
sport=34057 dport=53
Got packet, had no ct: udp 17 src=192.168.1.233 dst=8.8.8.8
sport=52035 dport=53
Got packet, had no ct: udp 17 src=192.168.1.233 dst=8.8.8.8
sport=56459 dport=53
Got packet, had no ct: udp 17 src=192.168.1.233 dst=8.8.8.8
sport=34241 dport=53
Got packet, had no ct: udp 17 src=192.168.1.233 dst=8.8.8.8
sport=45604 dport=53
Got packet, had no ct: udp 17 src=62.10.112.29 dst=192.168.1.159
sport=5061 dport=5060
Got packet, had no ct: udp 17 src=192.168.1.159 dst=151.99.125.2
sport=57961 dport=53
Got packet, had no ct: udp 17 src=192.168.1.233 dst=8.8.8.8
sport=58489 dport=53
Got packet, had no ct: udp 17 src=192.168.1.233 dst=8.8.8.8
sport=39654 dport=53
Got packet, had no ct: udp 17 src=62.10.112.29 dst=192.168.1.159
sport=5061 dport=5060
Got packet, had no ct: udp 17 src=62.10.112.29 dst=192.168.1.159
sport=5061 dport=5060
Got packet