Ruby + iptables

M

Michael T. Richter

--=-NeXf+Pn3mmhLGqD9j2Hg
Content-Type: multipart/alternative; boundary="=-myGJ41lw8QnuIU1G89fx"


--=-myGJ41lw8QnuIU1G89fx
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

I've been poking around on Rubyforge and Sourceforge and getting nowhere
on this. I've even tried to see if there was a Python lib I could crib
off of and roll my own. No dice.

What I'm looking for is a good high-level interface to iptables (as in,
basically, an iptables DSL) that would allow someone to easily read the
iptables configuration and write a new one. I found a half-finished
wrapper around libiptc with no high-level interface worth mentioning and
a whole bunch of dead links to something called ruby-iptables (but not
the actual library). I've tried my hand at wrapping libiptc myself
using SWIG and got some success, but hit the usual barrier of libiptc,
being specifically listed as not intended for general API consumption
(and strongly deprecated), not having any useful documentation worth
mentioning.

Right now I'm looking at the possibility of wrapping the iptables-save
and iptables-restore tools, providing a decent OO interface to the
experience, but if someone has already done this (and ruby-iptables
looks like it was supposed to have) I'd rather not reinvent the wheel.

So, does anybody know of any Ruby + iptables implementations already
done or in the works beyond vague statements of intent? And if I'm
going to be doing this on my own, would there be anybody experienced
with iptables/libiptc willing to collaborate on it so I don't screw it
up too badly?

--=20
Michael T. Richter <[email protected]> (GoogleTalk:
(e-mail address removed))
When debugging, novices insert corrective code; experts remove defective
code. (Richard Pattis)

--=-myGJ41lw8QnuIU1G89fx
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; CHARSET=3DUTF-8">
<META NAME=3D"GENERATOR" CONTENT=3D"GtkHTML/3.12.1">
</HEAD>
<BODY>
I've been poking around on Rubyforge and Sourceforge and getting nowhere on=
this.&nbsp; I've even tried to see if there was a Python lib I could crib =
off of and roll my own.&nbsp; No dice.<BR>
<BR>
What I'm looking for is a good high-level interface to iptables (as in, bas=
ically, an iptables DSL) that would allow someone to easily read the iptabl=
es configuration and write a new one.&nbsp; I found a half-finished wrapper=
around libiptc with no high-level interface worth mentioning and a whole b=
unch of dead links to something called ruby-iptables (but not the actual li=
brary).&nbsp; I've tried my hand at wrapping libiptc myself using SWIG and =
got some success, but hit the usual barrier of libiptc, being specifically =
listed as <B>not</B> intended for general API consumption (and strongly dep=
recated), not having any useful documentation worth mentioning.<BR>
<BR>
Right now I'm looking at the possibility of wrapping the iptables-save and =
iptables-restore tools, providing a decent OO interface to the experience, =
but if someone has already done this (and ruby-iptables looks like it was s=
upposed to have) I'd rather not reinvent the wheel.<BR>
<BR>
So, does anybody know of any Ruby + iptables implementations already done o=
r in the works beyond vague statements of intent?&nbsp; And if I'm going to=
be doing this on my own, would there be anybody experienced with iptables/=
libiptc willing to collaborate on it so I don't screw it up too badly?<BR>
<BR>
<TABLE CELLSPACING=3D"0" CELLPADDING=3D"0" WIDTH=3D"100%">
<TR>
<TD>
-- <BR>
<B>Michael T. Richter</B> &lt;<A HREF=3D"mailto:[email protected]">ttmri=
(e-mail address removed)</A>&gt; (<B>GoogleTalk:</B> (e-mail address removed))<BR>
<I>When debugging, novices insert corrective code; experts remove defective=
code. (Richard Pattis)</I>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>

--=-myGJ41lw8QnuIU1G89fx--

--=-NeXf+Pn3mmhLGqD9j2Hg
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQBGzpzzLqyWkKVQ54QRArcRAJ9tsErBqGHs3OG4C2/gVWriV+OHbACfbanW
3yN8boHG1ITDZ9mog/qHCUg=
=BcRg
-----END PGP SIGNATURE-----

--=-NeXf+Pn3mmhLGqD9j2Hg--
 
M

Michael T. Richter

--=-s0EgVfbufaPiM8QnTSYG
Content-Type: multipart/alternative; boundary="=-QFV3OMPHF0RWS/9rZbBG"


--=-QFV3OMPHF0RWS/9rZbBG
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

I have written such a beast, and I use it for production, it has lots of
rough edges though and I feel that the code is overly complicated, doc i= s
almost not existant, ---> not released to Rubyforge, but if you are
intersted I can mail you the software as is and it might be a good occasi= on
to write some basic doc, and who knows, maybe you would like to help out
with it?


I'd be happy to look it over, document what's there and collaborate on
future expansion. Thanks.

--=20
Michael T. Richter <[email protected]> (GoogleTalk:
(e-mail address removed))
I'm not schooled in the science of human factors, but I suspect surprise
is not an element of a robust user interface. (Chip Rosenthal)

--=-QFV3OMPHF0RWS/9rZbBG
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; CHARSET=3DUTF-8">
<META NAME=3D"GENERATOR" CONTENT=3D"GtkHTML/3.12.1">
</HEAD>
<BODY>
On Fri, 2007-24-08 at 18:40 +0900, Robert Dober wrote:
<BLOCKQUOTE TYPE=3DCITE>
<PRE>
<FONT COLOR=3D"#000000">I have written such a beast, and I use it for produ=
ction, it has lots of</FONT>
<FONT COLOR=3D"#000000">rough edges though and I feel that the code is over=
ly complicated, doc is</FONT>
<FONT COLOR=3D"#000000">almost not existant, ---&gt; not released to Rubyfo=
rge, but if you are</FONT>
<FONT COLOR=3D"#000000">intersted I can mail you the software as is and it =
might be a good occasion</FONT>
<FONT COLOR=3D"#000000">to write some basic doc, and who knows, maybe you w=
ould like to help out</FONT>
<FONT COLOR=3D"#000000">with it?</FONT>
</PRE>
</BLOCKQUOTE>
<BR>
I'd be happy to look it over, document what's there and collaborate on futu=
re expansion.&nbsp; Thanks.<BR>
<BR>
<TABLE CELLSPACING=3D"0" CELLPADDING=3D"0" WIDTH=3D"100%">
<TR>
<TD>
-- <BR>
<B>Michael T. Richter</B> &lt;<A HREF=3D"mailto:[email protected]">ttmri=
(e-mail address removed)</A>&gt; (<B>GoogleTalk:</B> (e-mail address removed))<BR>
<I>I'm not schooled in the science of human factors, but I suspect surprise=
is not an element of a robust user interface. (Chip Rosenthal)</I>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>

--=-QFV3OMPHF0RWS/9rZbBG--

--=-s0EgVfbufaPiM8QnTSYG
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQBGzrIqLqyWkKVQ54QRAhucAKC3lXsM73AdTcn4/PG+b/tLNLPGlACgv0lw
dt7LQxtrOn4oZbNJlKVa8WY=
=LjJq
-----END PGP SIGNATURE-----

--=-s0EgVfbufaPiM8QnTSYG--
 
A

Ari Brown

Hey!

I have written such a beast, and I use it for production, it has
lots of
rough edges though and I feel that the code is overly complicated,
doc is
almost not existant, ---> not released to Rubyforge, but if you are
intersted I can mail you the software as is and it might be a good
occasion
to write some basic doc, and who knows, maybe you would like to
help out
with it?

Do you think I might be able to catch a glimpse of your beast here?
I'm hoping to write a nice iptables DSL, if Michael doesn't have one
out.

I'll send you a copy of my final product, too!

Thanks,
Ari
-------------------------------------------|
Nietzsche is my copilot
 

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,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top