LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   SQLi (https://www.linuxquestions.org/questions/linux-security-4/sqli-4175506802/)

madunix 06-02-2014 02:30 PM

SQLi
 
Is it possible to block sql injection string accessing the web server http/https by using iptables?

-mad

Ser Olmy 06-02-2014 04:05 PM

Not really. iptables work at the network and transport layer, but what you want to do is inspect application level traffic and look for SQL commands. A reverse proxy would be a better approach.

(IMHO, the best way to prevent SQL injection is to make sure the web application doesn't have that vulnerability in the first place. That's pretty easy to do with stored procedures. You really don't want the application to build SQL query strings manually, and certainly not using client-supplied data.)

unSpawn 06-03-2014 06:20 PM

...additionally also see mod_security (and maybe products like GreenSQL, Guardium and alternatives).


All times are GMT -5. The time now is 08:25 AM.