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