Question

I am trying to find the way to block all web-pages that I browse that use plaintext password for their logins with iptables.

Here is the command I tried, something it wrong with it. How do I enter this command? This is for educational purpose only. Say, if I use "password" for all my logins.

Thanks.

nata@nata-VirtualBox:~$ iptables -A OUTPUT -s match --string "password" --dport 80 -p tcp -j DROP iptables v1.4.12: unknown option "--string" Try `iptables -h' or 'iptables --help' for more information.

nata@nata-VirtualBox:~$ iptables -A OUTPUT -m string --string "password" --dport 80 -p tcp -j DROP string: Could not determine whether revision 1 is supported, assuming it is. iptables v1.4.12: unknown option "--dport" Try `iptables -h' or 'iptables --help' for more information.

Was it helpful?

Solution

Try with this:

iptables -A OUTPUT -p tcp --dport 80 -m string --string password --algo bm -j DROP

To get help on a specific match, you can do:

iptables -m Match-Name --help
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top