Skip to contentSkip to conversation

MAX_PORTS for ftp modules

DISCUSSION Nick Pasich 3 participants 3 messages Jan 26, 2004 – Jan 27, 2004 netfilter

lore
Share & tools
lore
#0 lore raw

Hi,

I've exhausted the MAX_PORTS limit of 8 for ftp using my own port id.

I'm wondering if there are any repercussions in upping the limit to say, 16 in the following modules.

ip_conntrack_ftp.c: #define MAX_PORTS 8
ip_conntrack_irc.c: #define MAX_PORTS 8
ip_conntrack_tftp.c: #define MAX_PORTS 8

 ip_nat_ftp.c:        #define MAX_PORTS 8
 ip_nat_irc.c:        #define MAX_PORTS 8
 ip_nat_tftp.c:       #define MAX_PORTS 8

I noticed that ipfwadm_core.c has "IP_FW_MAX_PORTS" which is defined in ipfwadm_core.h as 10.

*********************************************************************************************************
linux/include/linux/netfilter_ipv4/ipfwadm_core.h:#define IP_FW_MAX_PORTS 10 /* A reasonable maximum */
*********************************************************************************************************

So what modules need to be changed and what kind of trouble am I going to get into????

I'm not subscribed to the newsletter, so please respond to me directly.

             Thanks,
 
             ---( Nick Pasich )---
#1 lore raw
Quoted 4 lines · Nick Pasich

I've exhausted the MAX_PORTS limit of 8 for ftp using my own port id.

I'm wondering if there are any repercussions in upping the limit to say, 16 in the following modules.

None I know of. But you should be careful to not register any ports wich is ever used for non-FTP traffic.

Note: TFTP is not the same as FTP, and ipfwadm is only relevant if your are using ipfwadm and is not related to your question.

Regards
Henrik

#2 lore raw
In reply to Nick Pasich
Quoted 6 lines · Nick Pasich

Hi,

I've exhausted the MAX_PORTS limit of 8 for ftp using my own port id.

I'm wondering if there are any repercussions in upping the limit to say, 16 in the following modules.

No, as has been discussed before (and I believe is also on the FAQ or some HOWTO).

Quoted 10 lines

ip_conntrack_ftp.c: #define MAX_PORTS 8
ip_conntrack_irc.c: #define MAX_PORTS 8
ip_conntrack_tftp.c: #define MAX_PORTS 8

 ip_nat_ftp.c:        #define MAX_PORTS 8
 ip_nat_irc.c:        #define MAX_PORTS 8
 ip_nat_tftp.c:       #define MAX_PORTS 8

I noticed that ipfwadm_core.c has "IP_FW_MAX_PORTS" which is defined in ipfwadm_core.h as 10.

ipfwadm is 2.0.x kernel backwards compatibility. please don't look at that code ever again ;)

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie