Skip to contentSkip to conversation

Help: how to track two way connection?

DISCUSSION Peter 2 participants 2 messages Apr 9, 2004 netfilter

lore
Share & tools
lore

Peter

author
#0 lore raw

冰河Dear Sir,

I want to develop a NAT router that can track the destination ports at each interface respectively. Please help!

There are two Ethernet interfaces in the NAT router and surely this router splits the network into two network segments, say segment A (WAN side) and segment B (LAN side). There is a well known port (say P1) need to be tracked at segment A and another well known port (say P2) need to be tracked at segment B after port A has been tracked. I can register the tracking port P1 at segment A in init() functions of both ip_conntrack and ip_nat modules and the router works as expected. But I can NOT register P2 at segment B, nor P1, P2 simultaneously.

I need your help urgently. It is highly appreciated if any advices or comments.

Best Regards,

Peter L. J. Pan
Edimax Technology Co., Ltd.
mailto:[email protected]
Web site: http://www.edimax.com.tw
Tel: 886-2-7739-6689
Fax: 886-2-7739-6887

#1 lore raw
Quoted 8 lines · Peter

There are two Ethernet interfaces in the NAT router and surely this router splits the network into two network segments, say segment A (WAN side) and segment B (LAN side). There is a well known port (say P1) need to be tracked at segment A and another well known port (say P2) need to be tracked at segment B after port A has been tracked. I can register the tracking port P1 at segment A in init() functions of both ip_conntrack and ip_nat modules and the router works as expected. But I can NOT register P2 at segment B, nor P1, P2 simultaneously.

Sounds like the job of a NAT helper module. See the netfilter hacking howto and the existing NAT helpers for detail.

Regards
Henrik