From owner-freebsd-questions Sat Feb 19 17:30:55 2000 Delivered-To: freebsd-questions@freebsd.org Received: from cc942873-a.ewndsr1.nj.home.com (cc942873-a.ewndsr1.nj.home.com [24.2.89.207]) by hub.freebsd.org (Postfix) with ESMTP id 7FB8237BD7D for ; Sat, 19 Feb 2000 17:30:48 -0800 (PST) (envelope-from cjc@cc942873-a.ewndsr1.nj.home.com) Received: (from cjc@localhost) by cc942873-a.ewndsr1.nj.home.com (8.9.3/8.9.3) id UAA62040; Sat, 19 Feb 2000 20:32:05 -0500 (EST) (envelope-from cjc) Date: Sat, 19 Feb 2000 20:32:04 -0500 From: "Crist J. Clark" To: Ivan Fetch Cc: cjclark@home.com, dc , questions@FreeBSD.ORG Subject: Re: Redirecting/mapping ports to a local machine... help! Message-ID: <20000219203204.G60348@cc942873-a.ewndsr1.nj.home.com> Reply-To: cjclark@home.com References: <20000219180014.B60348@cc942873-a.ewndsr1.nj.home.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from ivanfetch@technologist.com on Sat, Feb 19, 2000 at 04:56:20PM -0700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, Feb 19, 2000 at 04:56:20PM -0700, Ivan Fetch wrote: > On Sat, 19 Feb 2000, Crist J. Clark wrote: > > > On Sat, Feb 19, 2000 at 11:15:32AM -0700, Ivan Fetch wrote: > > > On Sat, 19 Feb 2000, dc wrote: > > > > Hi, > > > > > > > > i've got 2 computers, 1 on freebsd, the other on windows. They are > > > > sharing the net using natd. But i got a ftp server on port 42 of my > > > > windows box, and i want to make it available from the outside... i tried > > > > to do it with "redirect_port", here goes my natd.conf file: > > > > > > > > > > > > ### Configuration file for Natd > > > > > > > > alias_address 24.226.185.143 > > > > redirect_port tcp 192.168.0.2:42 42 > > > > redirect_port udp 192.168.0.2:42 42 > > > > > > > > ### End > > > > > > > > > > > > then i launched "natd -conf /etc/natd.conf", both computers were sharing > > > > the net as before, though i couldn't access the ftp server from the > > > > outside. > > > > > > > > I can connect to the ftp server from the bsd box using the local ip > > > > (19.168.0.2).... > > > > > > Hello, > > > Your Windows FTP server does work on port 42: > > > ftp your_Internet_IP 42 > > > > > > Connected to u-serv FTP... > > > > > > I am not sure if this is why things were not working when you tedted them, > > > but testing your ftp connection from inside your LAN (192.168.X.X) will > > > not work. Maybe telnet to another machine on the Internet and then try > > > FTPing back to your FreeBSD box for testing purposes. > > > > Doing FTP over a NAT box is problematic due to the two-channel nature > > of FTP. As far as I know, NAT cannot fully support the FTP protocol. > > Although I have not had extensive use over a redirected FTP port, I have > transfered a file or two and it has workked. I think the use of port 20 > (which is what I assume you are refering to below) is only used in > certain kinds of transfers; certain FTP clients . ^^^^^^^ This is a server issue not a client issue. An ftp client can do passive ftp from behind a NAT box. However, active ftp would not work. Use of a control channel and a data channel is a basic part of the ftp protocol. See RFC 959. Unimplemented RFC 2428 might be interesting too. -- Crist J. Clark cjclark@home.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message