LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-11-2004, 06:54 PM   #1
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Rep: Reputation: 50
Open port for FTP


I am using the FTP-server vsftpd and the client gFTP.

Now, the ftp-server is running on port 738 and that port is open. So I can connect to my own ftp, other can connect to it and there is no problem for me to connect to others ftps.

But when try to list the content in a dir there are two ways of doing this (afaik): either in passive mode or not.

If I or other people use passive when connecting to my ftp I need to open up a port in the firewall for the ftpd, right?
And if I don't use passive mode then I have to open a port when *I* connect to another ftp?

It seems to me that one port is not enough for FTPs. I have it running on one and only one: 738? But how can I control the "other" port that is being used?

I want to configure the firewall (and ftpd) so I can have my ftp-server running for other to use and so I can connect with my own client to other ftp-servers. But I still want to have a pretty closed firewall.

I am getting confused about what ports ftp-servers and ftp-clients are using. Can anyone help me out here?
 
Old 12-11-2004, 11:49 PM   #2
linux_terror
Member
 
Registered: Aug 2004
Location: Northbrook, Illinois
Distribution: CentOS-5
Posts: 311

Rep: Reputation: 30
FTPs? you mean sftp? SFTP is controlled by SSH and runs on whatever port ssh is running on, as far as PASV and vsftpd there are statements for the config file to specify what PASV ports will be used for data transmission.

pasv_max_port
The maximum port to allocate for PASV style data connections. Can be used to specify a narrow port range to assist firewalling.

Default: 0 (use any port)
pasv_min_port
The minimum port to allocate for PASV style data connections. Can be used to specify a narrow port range to assist firewalling.

Default: 0 (use any port)

take a look at http://vsftpd.beasts.org/vsftpd_conf.html

Hope this helps,
linux_terror
 
Old 12-12-2004, 12:55 AM   #3
Butt-Ugly
Member
 
Registered: Nov 2004
Location: Brisbane, Australia
Distribution: Fedora Core 5
Posts: 89

Rep: Reputation: 15
FTPs is an implementation of the FTP Security Extensions as defined in RFC2228

vsftpd now supports TLS/SSL encryption as of version 2.

As long as your client supports TLS/SSL (gFTP does) you can now authenticate and transfer files with your FTP server in a confidential manner.

Here are some setup details: http://www.brennan.id.au/14-FTP_Server.html

You may also need "modprobe -v ip_conntrack_ftp" to assist with your firewall, depending how its set up.

Regards,

BU.
 
Old 12-12-2004, 06:12 AM   #4
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Original Poster
Rep: Reputation: 50
Thanks. The pasv_min/max_port did it. No I can sleep tight. :P

Sorry about the "FTPs", maby I should have said FTP:s or FTP-servers, or something like that. :P It was just plural.

Thanks anyway, everything is working now. I am thinking of using SSL but then I have to recompile vsftp to support that.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I start ftp service and check if port open? quintan Linux - Software 2 01-15-2018 02:02 AM
nmap reports port 21 (ftp) open - how to close it? shazam75 Linux - Security 3 09-23-2005 07:13 PM
SuSE 9.2 - FTP Port open with no FTP service?!?! don_wombat Linux - Security 12 12-01-2004 03:14 PM
nmap shows port 21 open, but no ftp service running ? epoo Linux - Networking 3 12-21-2003 08:16 PM
how to open the ftp port??? stonegold84 Linux - General 6 08-22-2003 12:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration