Re: Creating rules without the /sbin/iptables command?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 17 Mar 2004, Cedric Blancher wrote:

> Le mer 17/03/2004 à 19:46, Victor Julien a écrit :
> > My program (written in c) creates rules by opening a pipe to 
> > /sbin/iptables. However this is quite slow with large rulessets and on 
> > slow hardware. Is there another way, like an iptables librarycall or 
> > something?
> 
> You could use iptables libs that stand in /usr/lib/iptables, just like
> iptables does.

Or actually the preferred interface for this type of operations is to use 
iptables-restore, the batch version of iptables. The speed difference from 
using iptables-restore and direct calls is pretty minimal by any means.

libiptc is an internal interface of the iptables source tree and is
subject to change at any time. This should not be used directly unless you 
have very good reasons.

Regards
Henrik




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux