LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-23-2003, 11:59 AM   #1
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Forcing Secure FTP


Hello all. I currently have a few friends using my Apache Server to run there web sites. Of course they need to upload files to the server. Rather then using the standard FTP they have all downloaded a copy of SFTP, the encyrpted version of FTP, provided by the PUTTY download page. Although they are all using this to upload files I have noticed that it is still possible to connect via the standard FTP. Is there a way to allow ONLY SFTP and disable the standard FTP? Thanks in advance.
 
Old 01-23-2003, 05:26 PM   #2
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
sftp will be using port 115..

You can block the regular ftp port 21 in the firewall...
or tune your ftp server, depending on which software it is...
Some are standalone server daemons, and some are controlled via the xinetd daemon.
Type 'chkconfig --list' in a terminal and look for ftp servers, or
'netstat -tanp' to see which is running.
 
Old 01-23-2003, 06:00 PM   #3
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Original Poster
Rep: Reputation: 57
I am currently running VSFTP. When I run a nmap it shows port 115 closed. When I run chkconfig --list it shows VSFTP as an XINETD based service. Can you configure VSFTP to only allow SFTP?
 
Old 01-23-2003, 06:05 PM   #4
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
I don't use it myself...
try
'man vsftp' in a terminal and see what it's documents say...
 
Old 01-23-2003, 06:09 PM   #5
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Original Poster
Rep: Reputation: 57
The documents say nothing and there is no entry in the vsftpd.conf file that deals with this issue. Should this be done through xinetd?
 
Old 01-23-2003, 06:11 PM   #6
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
You can alter the port xinetd listens on for vsftp by changing the '/etc/xinetd.d/vsftp' file
 
Old 01-23-2003, 06:13 PM   #7
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Original Poster
Rep: Reputation: 57
When I try to connect via port 115 it does not allow me. For example:

ftp www.mydomain.com:115
gives
unknown host
error
 
Old 01-23-2003, 06:15 PM   #8
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
Question is,
how does vsftp handle the SSL connection?

Make a sftp connection, then type
'ps -e' and 'netstat -tanp'
to see which programme is running as the server for sftp...
 
Old 01-23-2003, 06:22 PM   #9
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Original Poster
Rep: Reputation: 57
From the output of netstat -tanp | more it looks like SFTP causes two connections.

SSH and SSHD but no FTP connection. I wonder if the FTP connection is not used until I actually try and upload or download something. Maybe a good test would be to shutdown FTP and see if I can upload or download. What do you think?
 
Old 01-23-2003, 06:28 PM   #10
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
That's the built in sftp server with the ssh package...

Not full of features, but uses local user priveleges & is very secure.

You can safely shutdown vsftp..
'chkconfig --list' to get vsftp's correct title, then
'chkconfig vsftp off' will do it.
& 'service xinetd restart'
 
Old 01-23-2003, 06:29 PM   #11
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Original Poster
Rep: Reputation: 57
Thanks for all your help. You are the man! Finally a moderator who does not treat people like idiots. Thanks again.
 
Old 01-23-2003, 06:32 PM   #12
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
I'm not that far from being an idiot, so sympathy runs deep!!

ENJOY!
 
  


Reply



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
Secure FTP jake_reginato Linux - Newbie 3 05-02-2005 02:51 PM
Secure FTP sachinh Linux - Security 2 12-02-2004 05:34 AM
secure ftp? ziggie216 Linux - Software 5 12-13-2003 06:55 AM
Secure FTP Sathe Linux - Security 6 06-03-2003 06:53 PM
Secure FTP? WeNdeL Linux - Software 1 05-07-2003 10:44 AM

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

All times are GMT -5. The time now is 06:56 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