Date: Wed, 21 Mar 2001 05:11:40 From: "Aaron Hill" <hillaa@hotmail.com> To: wumba_man@yahoo.ca Cc: freebsd-questions@freebsd.org Subject: Re: ftpd on another port Message-ID: <F5199ir3wSimD3JkUwW000026c5@hotmail.com>
next in thread | raw e-mail | index | archive | help
>My cable provider nicely filters out the common ports (21, 80, etc) so >you can't run servers. How nasty. >How do I get ftpd to listen on another port for connections?? Take a look in the file /etc/inetd.conf and you'll notice there's a ling near the top that looks like this... ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l The first field "ftp" is defining what port the ftp daemon is started from. The "ftp" definition cross references to the following line in the file /etc/services ... ftp 21/tcp #File Transfer [Control] So to do it neatly you have a two step process. Firstly add a line into /etc/services like this... ftpcustom 2121/tcp #File Transfer [Control] Then change the first field of the ftp line in /etc/inetd.conf to something like this... ftpcustom stream tcp nowait root /usr/libexec/ftpd ftpd -l and reload inetd with this command... killall -HUP inetd and you've done it! Well at least you've changed the port that ftp starts from. Now you've got a problem where ftp servers make connections back to clients over port 20 to transfer files. Depending on if your ISP bans port 20 and depending which way you're transfering files (to FreeBSD or from FreeBSD) you may find that it won't work. The symptons will be that you can log into the FTP server correctly but when you try to do a ls or transfer a file the client will simply sit there and never get a response from a server. I don't know how you can fix the port 20 problem. You could change it on your server but then you'd have a problem at the client side... Good luck Aaron Hill _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F5199ir3wSimD3JkUwW000026c5>