1 <samba:parameter xmlns:samba="http://samba.org/common">
2 <term><anchor id="HOSTSALLOW"/>hosts allow (S)</term>
3 <listitem><para>A synonym for this parameter is <parameter moreinfo="none">allow
4 hosts</parameter>.</para>
6 <para>This parameter is a comma, space, or tab delimited
7 set of hosts which are permitted to access a service.</para>
9 <para>If specified in the [global] section then it will
10 apply to all services, regardless of whether the individual
11 service has a different setting.</para>
13 <para>You can specify the hosts by name or IP number. For
14 example, you could restrict access to only the hosts on a
15 Class C subnet with something like <command moreinfo="none">allow hosts = 150.203.5.
16 </command>. The full syntax of the list is described in the man
17 page <filename moreinfo="none">hosts_access(5)</filename>. Note that this man
18 page may not be present on your system, so a brief description will
19 be given here also.</para>
21 <para>Note that the localhost address 127.0.0.1 will always
22 be allowed access unless specifically denied by a <link linkend="HOSTSDENY"><parameter moreinfo="none">hosts deny</parameter></link> option.</para>
24 <para>You can also specify hosts by network/netmask pairs and
25 by netgroup names if your system supports netgroups. The
26 <emphasis>EXCEPT</emphasis> keyword can also be used to limit a
27 wildcard list. The following examples may provide some help:</para>
29 <para>Example 1: allow all IPs in 150.203.*.*; except one</para>
31 <para><command moreinfo="none">hosts allow = 150.203. EXCEPT 150.203.6.66</command></para>
33 <para>Example 2: allow hosts that match the given network/netmask</para>
35 <para><command moreinfo="none">hosts allow = 150.203.15.0/255.255.255.0</command></para>
37 <para>Example 3: allow a couple of hosts</para>
39 <para><command moreinfo="none">hosts allow = lapland, arvidsjaur</command></para>
41 <para>Example 4: allow only hosts in NIS netgroup "foonet", but
42 deny access from one particular host</para>
44 <para><command moreinfo="none">hosts allow = @foonet</command></para>
46 <para><command moreinfo="none">hosts deny = pirate</command></para>
48 <para>Note that access still requires suitable user-level passwords.</para>
50 <para>See <citerefentry><refentrytitle>testparm</refentrytitle>
51 <manvolnum>1</manvolnum></citerefentry> for a way of testing your host access
52 to see if it does what you expect.</para>
54 <para>Default: <emphasis>none (i.e., all hosts permitted access)
57 <para>Example: <command moreinfo="none">allow hosts = 150.203.5. myhost.mynet.edu.au