From: Jordan H. <jo...@mj...> - 2004-05-18 11:01:05
|
Hi, We use IPTables::IPv4 but I doubt that a generic perl script will help you setting up your particular rules. I combined this module with Config::General for a particular application, so there is not much to see anymore how it really works. Try this: 1. set up your iptables rules using iptables, dump/show/recover with iptables-save and iptables-restore 2. enter the perl debugger and dump the rules you just set up (eg. stating "x \%IPTables::IPv4" on the command line) 3. try the methods from the man page (which is pretty comprehensive) in the perl debugger and look at the resulting kernel rules (eg. using iptables or uiptables-save). Using these methods it should be easy to set up your rules script. jordan On Tue, 2004-05-18 at 12:25, d h a h n wrote: > Looking for some sample IPTables::IPv4 code to help me get through a few > problems. Does anyone have anything that they are willing to post or > send directly to me? > > Mostly I'm trying to get accurate information about current in memory > rules out through my perl script. At this point, I'm getting basic rule > information but, information such as to-destination on DNAT rules is not > getting through - I'm guessing it's user/programmer error. > [snip] |