Adding rules programmatically

I would like to use Comodo for simulating that some system went down (database for example). I need this for unit testing my software. I plan to do this by putting rules for outgoing traffic for some IP and port. Can I put these rules somehow programmatically (JUnit)?

Hi zarko, welcome to the forums.

If I understand you correctly (using CFP to deny an application resources to test it… error handling, etc…), that is… erm… genius. I’d bet that Egemen didn’t consider someone using it like that. ;D

I not sure about “programmatically”, but you could create predefined policy’s for both Firewall & Defense+… which you could then apply, on-the-fly, to the relevant application entry in Firewall and/or Defense+.

Brilliant idea zarko. I just tried it and it works. You can deny access to all sort of things with Defense+. In fact, the more I think about it (for testing purposes), the better it seems to get. Well done. A purpose built product for Developers would be sweet. :slight_smile:

Maybe AutoHotkey could be of help?

Kail, thanks for your answer. I’ll try it. API would be the best option for developers. This is standard functionality needed for integration tests with backends.

Or AutoIT - I’d look at both, though I’m partial to AutoIT.