Skip to contentSkip to conversation

please help me.......

DISCUSSION Vijay Angelo 2 participants 2 messages Sep 19, 2003

lore
Share & tools
lore
#0 lore raw

hi
I m one among the member of this list ,i have a problem with
libiptc...please look after if u can do it.
I want to insert one rule using the iptc_insert_entry function in
libiptc....
As i m new to netfilter ,libiptc ..i m struggling a lot..i hope u can help
me .

Just give me an information about how to fill the target information in the
ip_entry structure ...and the i target_offset field ...

I want insert a rule like..
-t nat -A PREROUTING -s 192.45.23..1 -p icmp -j DROP

please help me on how to fill the structure and invoke the function. I m eagerly expecting your reply...

thanking you
vijay

#1 lore raw
Quoted 10 lines · Vijay Angelo

hi
I m one among the member of this list ,i have a problem with
libiptc...please look after if u can do it.
I want to insert one rule using the iptc_insert_entry function in
libiptc....
As i m new to netfilter ,libiptc ..i m struggling a lot..i hope u
can help me .

Just give me an information about how to fill the target information
in the ip_entry structure ...and the i target_offset field ...

Well, using the library is complicated. The functions themselves are easy to understand how to call, but the format of a rule is very complicated.

It is something like generic data applicable to all rules, then data for specific match extensions and then data for any target extension.

However is all allocated and used through structs placed inside opaque memory chunks, so it is very difficult to explain in an email.

Your best bet is looking through the code for iptables (iptables.c) and the various extensions.

Signature · 2 lines
A: No. See http://www.netmeister.org/news/learn2quote.html
Q: Should I include quotations after my reply ?