LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 04-05-2008, 12:51 PM   #1
manoj.linux
Member
 
Registered: Aug 2007
Posts: 284

Rep: Reputation: 17
Question Ftp Query


Hi,

I want to disable ftp, I have disabled the ftp service,

But whenever I am trying from dos using telnet [Ip Address] 21,

It is showing as port open, I want disable the port also,

How to disable port ?


Regards,

Manoj
 
Old 04-05-2008, 01:49 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well that would suggest it's still running. note that disabling something on the boot options isn't the same as stopping it at that time. the output of "netstat -pant" will show all processes using tcp sockets.
 
Old 04-05-2008, 01:49 PM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You don't say what distro of Linux and which version of the distro.

Typically ftpd (the ftp daemon) can be started by itself, by inetd or by xinetd.

Type "lsof -i :21" to find out what process is LISTENING on port 21. If it shows inetd or xinetd then it is configured in one of those. If it shows ftpd then it is running on its own.

If it is running in inetd you can disable it by modifying /etc/inetd.conf. Just comment out (put a pound sign in front of) the line for ftp/ftpd. Then run "kill -1 <pid>" where <pid> is the process ID for inetd.

If it running in xinetd you need to cd /etc/xinetd.d and look for the file that starts ftpd (this may not be named ftpd itself - e.g. on my FC4 box it is a file named gssftp). In that file change the line that says "disable = no" to "disable = yes" then do "kill -1 <pid>" where <pid> is the process ID for xinetd.

If it is running as ftpd that means you're starting it as an independent daemon. You need to look for the startup script that starts it. Typically these are in /etc/rc.d - just grep for ftpd out of the files there. Note that the files in /etc/rc.d are base files - the actual start is done via links in /etc/rc?.d where the question mark is one of the run levels (2,3,4 or 5). You can stop it from starting automatically simply by removing the links you find to the /etc/rc.d file from the /etc/rc?.d files.
 
  


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
One another FTP query sachinh Linux - Security 7 12-06-2004 02:16 AM
New FTP Query sachinh Linux - Networking 3 12-03-2004 07:27 AM
FTP Query sachinh Linux - Security 2 11-30-2004 11:32 PM
Linux FTP query sachinh Linux - General 1 09-02-2004 03:23 AM
ftp query fuelinjection Linux - General 8 12-03-2003 09:48 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

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