FirewallBuddy

Tejas Dinkar tejasdinkar at gmail.com
Sun Feb 15 04:19:47 GMT 2009


Hey All,

I've added an item to the Feature Plan about help for firewalls (under
the KDESu module).

The 'bug' I want to address is that when applications open a port (such
as a file sharing app), the application thinks that everything is good,
while IPTables is secretly blocking everything in an out of the system.
Oops.

Of course, on non-Linux, it may be ipfw or any other related firewall.

I've written a class called FirewallBuddy which basically allows you to
open ports via the following syntax:

<code>
KDESu::FirewallBuddy buddy("kopete-bonjour");
buddy.addPort(5298, KDESu::FirewallBuddy::FB_TCP, "Allows Users to Contact You Via Bonjour");
buddy.addPort(5353, KDESu::FirewallBuddy::FB_UDP, "Allows Apps to talk via MDNS", hash);
buddy.exec();	// Class asks for the root/sudo password if needed. Else, you can pass char * password as an argument
</code>

So far I've gotten it to work with IPTables. If this seems principle in
principle, I'll commit the code (into the KDESu sub-module). I didn't
want to spam this mailing list with the implementation code, but if
there is a standard place to put code like this, please let me know.

PS: I would appreciate if you leave me in the CC (as I subscribe to the
digest)
-- 
Tejas Dinkar
http://gja.in




More information about the kde-core-devel mailing list