The
hosts
deny
option (also
deny
hosts
) specifies machines that do not have permission to access a share, written as a comma- or space-separated list of machine names or their IP addresses. Use the same format as specifying clients as the
hosts
allow
option above. For example, to restrict access to the server from everywhere but
example.com, you could write:
hosts deny = ALL EXCEPT .example.com
Like
hosts
allow
, there is no default value for the
hosts
deny
configuration option, although the default course of action in the event that neither option is specified is to allow access from all sources. Also, if you specify this option in the
[global]
section of the configuration file, it will override any
hosts
deny
options defined in shares. If you wish to deny
hosts access to specific shares, omit both the
hosts
allow
and
hosts
deny
options in the
[global]
section of the configuration file.