Skip to contentSkip to conversation

Connecttrack Access

DISCUSSION Jeremy Fowler 3 participants 4 messages Nov 22, 2002 – Dec 16, 2002 netfilter

lore
Share & tools
lore
#0 lore raw

New to the list, so sorry if this has been asked before. I was wondering if there is a library interface to access the connecttrack module's MASQUERADE feature to get a list of what port/ipaddr assignments. Basically looking for a way to let a user-space program track SNAT connections and port usage.

#1 lore raw
Quoted 4 lines · Jeremy Fowler

New to the list, so sorry if this has been asked before. I was wondering if there is a library interface to access the connecttrack module's MASQUERADE feature to get a list of what port/ipaddr assignments. Basically looking for a way to let a user-space program track SNAT connections and port usage.

read and parse /proc/net/ip_conntrack.

Signature · 5 lines
Live long and prosper
- Harald Welte / [email protected]               http://www.gnumonks.org/
============================================================================
GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M- 
V-- PS+ PE-- Y+ PGP++ t++ 5-- !X !R tv-- b+++ DI? !D G+ e* h+ r% y+(*)
#2 lore raw

Thanks, I found that out. Do you know of a reference somewhere that tells me what each column represents for each protocol. Do you know of any libraries that parses that file into a linked list of C structures?

Quoted 24 lines

-----Original Message-----
From: Harald Welte [mailto:[email protected]]
Sent: Thursday, December 05, 2002 2:40 PM
To: Jeremy Fowler
Cc: [email protected]
Subject: Re: Connecttrack Access

Quoted 3 lines · Jeremy Fowler

New to the list, so sorry if this has been asked before. I was wondering if there is a library interface to access the connecttrack module's MASQUERADE feature to get a list of what port/ipaddr assignments. Basically

looking for a

Quoted 1 line

way to let a user-space program track SNAT connections and port usage.

read and parse /proc/net/ip_conntrack.

--
Live long and prosper
- Harald Welte / [email protected] http://www.gnumonks.org/
============================================================================
GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M- V-- PS+ PE-- Y+ PGP++ t++ 5-- !X !R tv-- b+++ DI? !D G+ e* h+ r% y+(*)

#3 lore raw

Hi Jeremy,

I haven't seen any reply to this so far so... There is one such reference put together that you will find at
http://iptables-tutorial.frozentux.net/chunkyhtml/statemachine.html. It is unfortunately not perfect, but I have not received any huge complaints about the text so far.

Quoted 31 lines · Jeremy Fowler

Thanks, I found that out. Do you know of a reference somewhere that tells me what each column represents for each protocol. Do you know of any libraries that parses that file into a linked list of C structures?

Quoted 24 lines

-----Original Message-----
From: Harald Welte [mailto:[email protected]]
Sent: Thursday, December 05, 2002 2:40 PM
To: Jeremy Fowler
Cc: [email protected]
Subject: Re: Connecttrack Access

Quoted 3 lines · Jeremy Fowler

New to the list, so sorry if this has been asked before. I was wondering if there is a library interface to access the connecttrack module's MASQUERADE feature to get a list of what port/ipaddr assignments. Basically

looking for a

Quoted 1 line

way to let a user-space program track SNAT connections and port usage.

read and parse /proc/net/ip_conntrack.

--
Live long and prosper
- Harald Welte / [email protected] http://www.gnumonks.org/
============================================================================
GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M- V-- PS+ PE-- Y+ PGP++ t++ 5-- !X !R tv-- b+++ DI? !D G+ e* h+ r% y+(*)

Signature · 6 lines
----
Oskar Andreasson
http://www.frozentux.net
http://iptables-tutorial.frozentux.net
http://ipsysctl-tutorial.frozentux.net
mailto:[email protected]