Using the ftphosts File to Allow or Deny FTP Server Connection
You can create a file in /etc
called ftphosts
to allow or deny specific users or addresses from connecting to the FTP server. The format of the file is the word allow
or deny
, optionally followed by a username, followed by an IP or a DNS address:
allow username addressdeny username address
Listing 26.2 shows a sample configuration of this file.
# Example host access file## Everything after a '#' is treated as comment,# empty lines are ignoredallow fatima 208.164.186.1 208.164.186.2 208.164.186.4deny richard 208.164.186.5allow jane ubuntuforums.orgdeny john naughtysite.netallow ahmed ...
Get Ubuntu Unleashed 2015 Edition: Covering 14.10 and 15.04, Tenth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.