How to to detect user agent on SSL in IpTables?
I use nginx and i was able to detect and block browser agents through iptables on normal HTTP site not HTTPS but that trick isn't working for SSL sites any idea how to do it?
iptables -N Wordpress-PingBacks iptables -I INPUT -p tcp --dport 80 -m string --to 70 --algo bm --string 'GET /' -j Wordpress-PingBacks
iptables -A Wordpress-PingBacks -p tcp --dport 80 -m string --to 80 --algo bm ! --string 'User-Agent: WordPress/' -j RETURN
iptables -A Wordpress-PingBacks -p tcp --dport 80 -j DROP
iptables -A Wordpress-PingBacks -j RETURN
This code was working fine for HTTP sites but replacing port 80 simply with 443 isn't working because the data is encrypted so any idea how to achieve this in SSL sites?