Search This Blog

Wednesday, September 8, 2010

Disable FTP Service.

Disable FTP Service.

This can be done by loging into the server or any other machine connected to server.All you need to do is type a command called.

ftp

Example:
If 10.180.18.222 is my server's ip address.

# ftp 10.180.18.222
Connected to 10.180.18.222.
220 TomcatServer FTP server (Version 5.60) ready.
334 Using authentication type GSSAPI; ADAT must follow
GSSAPI accepted as authentication type
GSSAPI error major: Unspecified GSS failure. Minor code may provide more information
GSSAPI error minor: No credentials cache found
GSSAPI error: initializing context
GSSAPI authentication failed
334 Using authentication type KERBEROS_V4; ADAT must follow
KERBEROS_V4 accepted as authentication type
Kerberos V4 krb_mk_req failed: You have no tickets cached
Name (10.180.18.222:root):


Above output shows that ftp is running on 10.180.18.222 .

To Disable the ftp you need to edit gssftp file under
/etc/xinetd.d directory.

You should modify disable parameter to yes.

# cat gssftp
# default: off
# description: The kerberized FTP server accepts FTP connections \
# that can be authenticated with Kerberos 5.
service ftp
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/kerberos/sbin/ftpd
server_args = -l -a
log_on_failure += USERID
disable = yes
}

Once you have modified the file you should restart xinetd
#/etc/rc.d/init.d/xinetd restart


To check FTP is running or not:

# ftp 10.180.18.222
ftp: connect: Connection refused
ftp>

Above output shows that ftp is disabled on my server.

No comments:

Post a Comment