1 '\" te
   2 .\" Copyright (C) 2002, Sun Microsystems, Inc. All Rights Reserved
   3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6 .TH FTPHOSTS 4 "May 1, 2003"
   7 .SH NAME
   8 ftphosts \- FTP Server individual user host access file
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 \fB/etc/ftpd/ftphosts\fR
  13 .fi
  14 
  15 .SH DESCRIPTION
  16 .sp
  17 .LP
  18 The \fBftphosts\fR file is used to allow or deny access to accounts from
  19 specified hosts. The following access capabilities are supported:
  20 .sp
  21 .ne 2
  22 .na
  23 \fB\fBallow \fIusername\fR \fIaddrglob\fR [\fIaddrglob\fR...]\fR\fR
  24 .ad
  25 .sp .6
  26 .RS 4n
  27 Only allow users to login as \fIusername\fR from host(s) that match
  28 \fIaddrglob\fR.
  29 .RE
  30 
  31 .sp
  32 .ne 2
  33 .na
  34 \fB\fBdeny \fIusername\fR \fIaddrglob\fR [\fIaddrglob\fR...]\fR\fR
  35 .ad
  36 .sp .6
  37 .RS 4n
  38 Do not allow users to login as \fIusername\fR from host(s) that match
  39 \fIaddrglob\fR.
  40 .RE
  41 
  42 .sp
  43 .LP
  44 A \fIusername\fR of \fB*\fR matches all users. A \fIusername\fR of
  45 \fBanonymous\fR or \fBftp\fR specifies the anonymous user.
  46 .sp
  47 .LP
  48 \fIaddrglob\fR is a regular expression that is matched against hostnames or IP
  49 addresses. \fIaddrglob\fR may also be in the form \fBaddress:netmask\fR or
  50 \fBaddress/CIDR\fR, or be the name of a file that starts with a slash
  51 ('\fB/\fR') and contains additional address globs. An exclamation mark
  52 (`\fB!\fR') placed before the \fBaddrglob\fR negates the test.
  53 .sp
  54 .LP
  55 The first \fBallow\fR or \fBdeny\fR entry in the \fBftphosts\fR file that
  56 matches a \fIusername\fR and host is used. If no entry exists for a
  57 \fIusername\fR, then access is allowed. Otherwise, a matching allow entry is
  58 required to permit access.
  59 .SH EXAMPLES
  60 .sp
  61 .LP
  62 You can use the following \fBftphosts\fR file to allow anonymous access from
  63 any host except those on the class A network 10, with the exception of
  64 \fB10.0.0.*\fR IP addresses, which are allowed access:
  65 .sp
  66 .in +2
  67 .nf
  68 allow   ftp   10.0.0.*
  69 deny    ftp   10.*.*.*
  70 allow   ftp   *
  71 .fi
  72 .in -2
  73 
  74 .sp
  75 .LP
  76 \fB10.0.0.*\fR can be written as \fB10.0.0.0:255.255.255.0\fR or
  77 \fB10.0.0.0/24\fR.
  78 .SH FILES
  79 .sp
  80 .ne 2
  81 .na
  82 \fB\fB/etc/ftpd/ftphosts\fR\fR
  83 .ad
  84 .RS 22n
  85 
  86 .RE
  87 
  88 .SH ATTRIBUTES
  89 .sp
  90 .LP
  91 See \fBattributes\fR(5)  for descriptions of the following attributes:
  92 .sp
  93 
  94 .sp
  95 .TS
  96 box;
  97 c | c
  98 l | l .
  99 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 100 _
 101 Interface Stability     External
 102 .TE
 103 
 104 .SH SEE ALSO
 105 .sp
 106 .LP
 107  \fBin.ftpd\fR(1M), \fBftpaccess\fR(4), \fBattributes\fR(5)