Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

203
Views
Alternatives for iptables?

I'm developing an application in which i rely heavily on iptables for routing traffic. I'm setting the tables just by calling iptables as an external process from my application.

I would like to know if there is a way to directly talk to the kernel modules (Netfilter) on which iptables relies and avoid the overhead of running a new process just for that?

Recommendations for other routing solutions are welcome.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

If my understanding is correct, you are asking for a programatic interface for the configuration of iptables. Unfortunately iptables (libiptc) doesn't give an API interface for configuring or querying them, its way too low in the stack.

One alternative I can suggest is kernel IP sets. ipset is actually an extension to iptables that allows to create rules that match entire set of addresses at once. IPtables are traversed linearly where as ip set are stored in indexed data structures. This makes it very efficient.

https://packages.debian.org/sid/net/ipset

This may not be a direct answer to your question but hope it helps.

over 4 years ago · Santiago Trujillo Report

0

I don't see any problem with netfilter. You are able to bind your callback on any netfilter hooks and kernel will invoke your callback on hook event. You are doing this via nf_register_hook. You can even track connections with conntrack

Example for this is here.

More info about hacking netfilter on official documentation

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!