Java bindings for IPTABLES

K

Krashan

Hello!

I guess this is more javish than linuxish question... I'm looking for
(preferably JNI) bindings to linux' IPTABLES. I need to
create/review/update/delete firewall rules from Java.

One thing I can do now is to call 'iptables' command and parse
results, but this is painfully slow.

Is there any project available over there or must I sit on my a** and
write one myself? I guess this would be a great experience to do that -
but might be a bit beyond my reach (read - knowledge)... :( Google
unfortunately gave nothing...

Best regards,
Pawel Kraszewski
 
K

Krashan

Hello!

I guess this is more javish than linuxish question... I'm looking for
(preferably JNI) bindings to linux' NetFilter. I need to
create/review/update/delete firewall rules from Java.

One thing I can do now is to call 'iptables' command and parse
results, but this is painfully slow.

As I understand, 'NetFilter' is the kernel part I want to talk to,
'iptables' is an example of userspace program to do that from command
line.

Is there any project available over there or must I sit on my a** and
write one myself? I guess this would be a great experience to do that -
but might be a bit beyond my reach (read - knowledge)... :( Google
unfortunately gave nothing...

Best regards,
Pawel Kraszewski
 
J

Juri Kuehn

Krashan said:
Hello!

I guess this is more javish than linuxish question... I'm looking for
(preferably JNI) bindings to linux' NetFilter. I need to
create/review/update/delete firewall rules from Java.

One thing I can do now is to call 'iptables' command and parse
results, but this is painfully slow.

As I understand, 'NetFilter' is the kernel part I want to talk to,
'iptables' is an example of userspace program to do that from command
line.

Is there any project available over there or must I sit on my a** and
write one myself? I guess this would be a great experience to do that -
but might be a bit beyond my reach (read - knowledge)... :( Google
unfortunately gave nothing...

Best regards,
Pawel Kraszewski

Hi,
maybe try working with rulesets for iptables. They're also easy to parse
and aren't "painfully slow".
http://www.faqs.org/docs/iptables/saveandrestore.html

Greetings,
Juri
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top