From owner-freebsd-stable Fri Jun 19 10:09:46 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA22610 for freebsd-stable-outgoing; Fri, 19 Jun 1998 10:09:46 -0700 (PDT) (envelope-from owner-freebsd-stable@FreeBSD.ORG) Received: from ns1.yes.no (ns1.yes.no [195.119.24.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA22543 for ; Fri, 19 Jun 1998 10:09:09 -0700 (PDT) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.8.7/8.8.7) with ESMTP id RAA16081; Fri, 19 Jun 1998 17:08:53 GMT Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id TAA05731; Fri, 19 Jun 1998 19:08:53 +0200 (MET DST) Message-ID: <19980619190853.57863@follo.net> Date: Fri, 19 Jun 1998 19:08:53 +0200 From: Eivind Eklund To: Carroll Kong , freebsd-stable@FreeBSD.ORG Subject: Re: NATD Problems and War-FTPD References: <199806092041.NAA00690@hub.freebsd.org> <199806182117.OAA16211@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1i In-Reply-To: <199806182117.OAA16211@hub.freebsd.org>; from Carroll Kong on Thu, Jun 18, 1998 at 05:18:58PM -0500 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Jun 18, 1998 at 05:18:58PM -0500, Carroll Kong wrote: > Hi guys. I am using NATD with a 2.2.6 FreeBSD stable box. So far, natd > has been working great, and through the use of the "Permanent Link" > arguments and options, I was able to get onto services like "battle.net" > which used udp packets on a high port. > Now, I am experiencing some problems with connecting to the warftpd of > Microsoft systems. I am using a client end machine off of the natd box, > trying to ftp into a war-ftp daemon server which is not using the default > 21 port. They are using some insane port like 10500. I figured, a mere > "redirect_port 192.168.1.2:21 10500" should work, or "Permanent_link > 192.168.1.2:10500 0.0.0.0:10500 10500" would work (while adding an entry on > /etc/services), or "redirect_address 192.168.0.1.2 0.0.0.0" would work. > But none of them did. My Microsoft System that is behind the natd freebsd > box cannot ftp into these sites using clients such as cute ftp or bullet > ftp. > Does anyone know what could be wrong? Or what I am doing wrong? I am > pretty sure those command shoud have worked, but none have. I can login, > but when it send me the "ASCII ls -l", it fails. I heard that linux needed > an "ftp module" for their ip masquerading, but I am pretty sure that natd > can do this on it's own. > Does anyone know of a solution? Or what I am doing wrong? You're assuming you can run FTP control sessions on a different port. libalias (which NATD is built on) does not support this. If you want to change that, you can do it - source is available. The following patch will allow you to set a single extra port: Index: alias.c =================================================================== RCS file: /home/ncvs/src/lib/libalias/alias.c,v retrieving revision 1.5 diff -u -r1.5 alias.c --- alias.c 1998/04/19 21:42:04 1.5 +++ alias.c 1998/06/19 16:51:01 @@ -93,7 +93,8 @@ #include "alias_local.h" #include "alias.h" -#define FTP_CONTROL_PORT_NUMBER 21 +#define FTP_CONTROL_PORT_NUMBER_1 21 +#define FTP_CONTROL_PORT_NUMBER_2 10500 #define IRC_CONTROL_PORT_NUMBER_1 6667 #define IRC_CONTROL_PORT_NUMBER_2 6668 @@ -780,8 +781,10 @@ TcpMonitorOut(pip, link); /* Special processing for ftp connection */ - if (ntohs(tc->th_dport) == FTP_CONTROL_PORT_NUMBER - || ntohs(tc->th_sport) == FTP_CONTROL_PORT_NUMBER) + if (ntohs(tc->th_dport) == FTP_CONTROL_PORT_NUMBER_1 + || ntohs(tc->th_sport) == FTP_CONTROL_PORT_NUMBER_1 + || ntohs(tc->th_dport) == FTP_CONTROL_PORT_NUMBER_2 + || ntohs(tc->th_sport) == FTP_CONTROL_PORT_NUMBER_2) AliasHandleFtpOut(pip, link, maxpacketsize); if (ntohs(tc->th_dport) == IRC_CONTROL_PORT_NUMBER_1 || ntohs(tc->th_dport) == IRC_CONTROL_PORT_NUMBER_2) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message