Skip to contentSkip to conversation

How to fill a ipt_entry structure to add a rule using iptc_append_entry()

DISCUSSION Harald Welte 2 participants 2 messages Jun 22, 2004 1 message not in the archive netfilter

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 7 lines · babula allu

Hi,

I am trying to add a simple rule to INPUT chain using iptc_append_entry but it fails.It says invalid argument.

Quoted 7 lines

I also tried sending the same ipt_entry structure
which was returned by the iptc_first_rule API.In this case iptc_append _entry doesn't return an error but iptables -L doesn't display the rule in the list also.

If somebody knows about the cause and solution please help me.

1) please read http://www.netfilter.org/contact.html

2) libiptc is not a public interface, we do not encourage neither support anybody using it.

Quoted 1 line

Babula

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie
#2 lore raw
Quoted 13 lines · Harald Welte
Quoted 12 lines · babula allu

Hi,

I am trying to add a simple rule to INPUT chain using iptc_append_entry but it fails.It says invalid argument.

I also tried sending the same ipt_entry structure
which was returned by the iptc_first_rule API.In this case iptc_append _entry doesn't return an error but iptables -L doesn't display the rule in the list also.

Quoted 7 lines
Quoted 2 lines

If somebody knows about the cause and solution please help me.

1) please read http://www.netfilter.org/contact.html

2) libiptc is not a public interface, we do not encourage neither support anybody using it.

Instead use the iptables / iptables-restore command interfaces.

For large modifications iptables-restore is recommended. Accepts the same commands as iptables, plus some more for the "transaction support" (see output of iptables-save)

Regards
Henrik