I log and drop packets send to specific IP/domain name. I would like to be able to log url parameters for these dropped packet.
This is an example url:
http://somedomain.com/test.php?param1=test1¶m2=test2
This is what i'm doing e.g:
iptables -A OUTPUT -p tcp -d somedomain.com --dport 80 -m string --string 'param1=' --algo bm -j LOGGING
In LOGGING chain:
iptables -A LOGGING -j LOG --log-prefix "somedomain.com Packet Dropped: " --log-level 7
I tried these options without any success:
--log-ip-options
--log-tcp-options
Basically, i'd like to be able to get same relevant info as from tcpdump
but because i drop packets, you know the story, i cannot use tcpdump here (as i understand it)...
Is it possible using iptables log (to a text file?!) to get URL query string of dropped packet? In this example, it would be:
param1=test1¶m2=test2
My knwoledge about all of this is near the zero so excuse me if it's a silly question.
Thx