O'Reilly logo

Ubuntu Unleashed 2013 Edition: Covering 12.10 and 13.04, Eighth Edition by Matthew Helmke

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 24.2 shows a sample configuration of this file.

Listing 24.2. ftphosts Configuration File for Allowing or Denying Users

# 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.net allow ahmed 192.168.101.*allow ahmed ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required