I am struggling with the TPROXY rule on mangle table, I configured this rules:
iptables -t mangle -I PREROUTING 1 -m layer7 --l7dir /etc/l7-protocols --l7proto http -p tcp --dport 80 -j TPROXY --on-port 1035 --tproxy-mark 0xffff ip rule add fwmark 0xffff lookup 100 ip route add local 0.0.0.0/0 dev lo table 100
The http pattern reg expr contains this really simple gerexp:
In this way all should match with that.
I wrote a program which open a sock_raw and print all received packets, I tested it and it's works, I am sure about that. What I see is that I cannot see the redirection caused by the TPROXY rule and in fact it redirect nothing, I think.
Have you any suggestion ?Maybe I misunderstand some iptable or l7filter rule and my problem is really simple.
Thanks a lot in advance! Pietro.