I have built an Intrusion Detection System in JAVA. I have a web interface which shows a black listed IP. IP's are categorized as Web attcks, SIP attacks, SSH attacks, Probing and Malware. Now I am required to block this IP which falls in any of these categories. Is there a way to do it in java , by interacting with firewall? All wincap lib or wrappers dont work in inline mode so any way to do it ?
If it's a windows firewall you can use java to send powershell firewall configuration commands to it.
Example: permit ICMP both internally and externally:
You save the code as a .ps1 and call it from within java just like trying to run any .exe.