Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.system > #560

Question using libiptc

Newsgroups comp.os.linux.development.system
Date 2013-10-24 13:32 -0700
Message-ID <1c6b1c19-53c5-4659-97d9-47daaded9532@googlegroups.com> (permalink)
Subject Question using libiptc
From Jeremy Brown <bjeremy32@gmail.com>

Show all headers | View raw


Greetings,

I have a little c program that will use the libiptc api that will dynamically add rules to iptables. To try and circumvent responses asking me why I want to do this instead of using system(), the reason is I wish to dynamically update the iptables from an external program and the entries will only be known at runtime. I also wish to have feedback as to the success or failure of these aditions/deletions.

In any event, the test program works for standard targets (i.e. Accept, Drop, etc), however I can not find a way to use -j TEE. I always seem to get the same error on iptc_commit: "No chain/target/match by that name". However I did verify that the xt_TEE module is loaded, and that I could add entries using -j TEE by hand on the command line.

I'm sure it is a matter of filling out the struct xt_standard_target incorrectly (or using a different target struct entirely).  I'm not sure how to do that for tee or the xt_tee_tginfo (--gateway) that will also be needed.

I was wondering if someone may have sample code for provisioning that target that could help me do this.

Jeremy

Back to comp.os.linux.development.system | Previous | NextNext in thread | Find similar


Thread

Question using libiptc Jeremy Brown <bjeremy32@gmail.com> - 2013-10-24 13:32 -0700
  Re: Question using libiptc Richard Kettlewell <rjk@greenend.org.uk> - 2013-10-24 21:39 +0100
    Re: Question using libiptc Jeremy Brown <bjeremy32@gmail.com> - 2013-10-24 13:56 -0700
      Re: Question using libiptc Rainer Weikusat <rweikusat@mobileactivedefense.com> - 2013-10-24 22:37 +0100
        Re: Question using libiptc Jeremy Brown <bjeremy32@gmail.com> - 2013-10-24 15:19 -0700
          Re: Question using libiptc Jeremy Brown <bjeremy32@gmail.com> - 2013-10-24 15:25 -0700
          Re: Question using libiptc Rainer Weikusat <rweikusat@mobileactivedefense.com> - 2013-10-25 15:38 +0100
            Re: Question using libiptc Jeremy Brown <bjeremy32@gmail.com> - 2013-10-25 11:04 -0700
              Re: Question using libiptc Jeremy Brown <bjeremy32@gmail.com> - 2013-10-25 12:04 -0700
  Re: Question using libiptc Jorgen Grahn <grahn+nntp@snipabacken.se> - 2013-10-25 13:34 +0000
    Re: Question using libiptc Jeremy Brown <bjeremy32@gmail.com> - 2013-10-25 07:26 -0700
      Re: Question using libiptc Rainer Weikusat <rweikusat@mobileactivedefense.com> - 2013-10-25 21:20 +0100
        Re: Question using libiptc Jeremy Brown <bjeremy32@gmail.com> - 2013-10-25 14:23 -0700
        Re: Question using libiptc Richard Kettlewell <rjk@greenend.org.uk> - 2013-10-25 22:27 +0100
          Re: Question using libiptc Richard Kettlewell <rjk@greenend.org.uk> - 2013-10-25 22:29 +0100
            Re: Question using libiptc Rainer Weikusat <rweikusat@mobileactivedefense.com> - 2013-10-25 22:43 +0100

csiph-web