To prevent access by anonymous users, add the entry
"defaultserver private" to /etc/ftpd/ftpaccess:
Adding guestserver to the ftpaccess file:
# echo "guestserver" >> /etc/ftpd/ftpaccess
# cat /etc/ftpd/ftpaccess
# ident "@(#)ftpaccess 1.2 03/05/14 SMI"
#
# FTP server configuration file, see ftpaccess(4).
#
# ident "@(#)ftpaccess 1.2 03/05/14 SMI"
#
# FTP server configuration file, see ftpaccess(4).
#
class anonusers anonymous *
class guestusers guest *
class realusers real *
class guestusers guest *
class realusers real *
loginfails 3
passwd-check trivial warn
private no
shutdown /etc/ftpd/shutdown.msg
# email user@hostname
# guestuser username
# rhostlookup no
passwd-check trivial warn
private no
shutdown /etc/ftpd/shutdown.msg
# email user@hostname
# guestuser username
# rhostlookup no
#To prevent access by anonymous users#
defaultserver private
.
.
.
.
guestserver
.
.
defaultserver private
.
.
.
.
guestserver
.
.
Next restart the FTP service :
Veryfy the status now -> blocked FTP access for anonymous user :
C:\Users\U Computers>ftp 172.16.0.1
Connected to 172.16.0.1.
220-_________________________________
220-
220- welcome to SLT HQ server!
220- Authorised access only!
220-
220-**********************************
220-
220-
220 NTU-HQ-EMS FTP server ready.
User (172.16.0.1:(none)): anonymous
530 Guest login not allowed on this machine.
Connection closed by remote host.
Connected to 172.16.0.1.
220-_________________________________
220-
220- welcome to SLT HQ server!
220- Authorised access only!
220-
220-**********************************
220-
220-
220 NTU-HQ-EMS FTP server ready.
User (172.16.0.1:(none)): anonymous
530 Guest login not allowed on this machine.
Connection closed by remote host.