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