Skip to contentSkip to conversation

UDP connection tracking problem

DISCUSSION [email protected] 4 participants 6 messages Nov 10, 2003 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi, I've a very simple rule set as follows, and in summary it looks to me like udp connection tracking info is only being updated for traffic comming into the box?

Chain INPUT (policy DROP)

target     prot opt source               destination
ACCEPT     all  --  127.0.0.1            anywhere
ACCEPT     all  --  anywhere             anywhere           state RELATED,ESTABLISHED
ACCEPT     all  --  172.18.1.170         anywhere

Chain OUTPUT (policy ACCEPT)

target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere           state NEW,RELATED,ESTABLISHED

The problem is that I can't initiate udp from this box. If I allow udp in, I can do tftp fine.
Then removing the udp rule I can tftp fine for variable amount of time 0s, 30s, 180s.

I'm using linux 2.4.20 and iptables v1.2.7a

cheers,
Pádraig.

#1 lore raw
Quoted 14 lines · [email protected] wrote:

Hi, I've a very simple rule set as follows, and in summary it looks to me like udp connection tracking info is only being updated for traffic comming into the box?

Chain INPUT (policy DROP)

target     prot opt source               destination
ACCEPT     all  --  127.0.0.1            anywhere
ACCEPT     all  --  anywhere             anywhere           state RELATED,ESTABLISHED
ACCEPT     all  --  172.18.1.170         anywhere

Chain OUTPUT (policy ACCEPT)

target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere           state NEW,RELATED,ESTABLISHED
Quoted 6 lines

The problem is that I can't initiate udp from this box. If I allow udp in, I can do tftp fine.
Then removing the udp rule I can tftp fine for variable amount of time 0s, 30s, 180s.

I'm using linux 2.4.20 and iptables v1.2.7a

Ah hang on, when the UDP is sent out, the following is added to /proc/net/ip_conntrack as expected:
udp 17 22 src=172.18.1.55 dst=172.18.1.14 sport=32769 dport=69 [UNREPLIED] src=172.18.1.14 dst=172.18.1.55 sport=69 dport=32769 use=1

However the response packet doesn't use 69 as the sport. It seems to use an ephemeral one (33118) :-(

FYI the tftpd is "tftp-hpa 0.34, with remap, with tcpwrappers"

Hmm: http://www.zytor.com/pipermail/syslinux/2003-April/001851.html

Pádraig.

#2 lore raw
In reply to [email protected]
Quoted 14 lines · [email protected] wrote:

Hi, I've a very simple rule set as follows, and in summary it looks to me like udp connection tracking info is only being updated for traffic comming into the box?

Chain INPUT (policy DROP)

target     prot opt source               destination
ACCEPT     all  --  127.0.0.1            anywhere
ACCEPT     all  --  anywhere             anywhere           state RELATED,ESTABLISHED
ACCEPT     all  --  172.18.1.170         anywhere

Chain OUTPUT (policy ACCEPT)

target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere           state NEW,RELATED,ESTABLISHED
Quoted 6 lines

The problem is that I can't initiate udp from this box. If I allow udp in, I can do tftp fine.
Then removing the udp rule I can tftp fine for variable amount of time 0s, 30s, 180s.

I'm using linux 2.4.20 and iptables v1.2.7a

Ah hang on, when the UDP is sent out, the following is added to /proc/net/ip_conntrack as expected:
udp 17 22 src=172.18.1.55 dst=172.18.1.14 sport=32769 dport=69 [UNREPLIED] src=172.18.1.14 dst=172.18.1.55 sport=69 dport=32769 use=1

However the response packet doesn't use 69 as the sport. It seems to use an ephemeral one (33118)

FYI the tftpd is "tftp-hpa 0.34, with remap, with tcpwrappers"

Hmm: http://www.zytor.com/pipermail/syslinux/2003-April/001851.html

Should udp connection tracking only use the sport for outgoind packets and dport for incomming packets?

Pádraig.

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

#6 lore raw

Re: TFTP connection tracking problem

Quoted 4 lines · Ramin Dousti
Quoted 2 lines
Quoted 1 line

You need ip_conntrack_tftp and ip_nat_tftp helper modules.

Great. So how do I download it?

Well, good question. A quick scan through the latest pom didn't show anything.

http://www.<your_mirror>.kernel.org/pub/linux/kernel/v2.4/linux-2.4.22.tar.bz2
e.g. part of stock 2.4.22

Signature · 4 lines
/"\ Goetz Bock at blacknet dot de  --  secure mobile Linux everNETting
\ /                     (c) 2003 as GNU FDL 1.1
 X   [ 1. Use descriptive subjects - 2. Edit a reply for brevity -  ]
/ \  [ 3. Reply to the list - 4. Read the archive *before* you post ]