Required allow rules are already in /etc/hosts.allow.
Deny all other clients for TCP Wrappers-aware daemons in /etc/hosts.deny.
Which line is appropriate?
ALL : ALL in hosts.deny provides a default deny for requests not already permitted by hosts.allow.
Detailed explanation
ALL : ALLCorrect. It matches every daemon and client as the fallback deny rule.
ALLOW : ALLIncorrect. ALLOW is not the token for all daemons.
ALL = DENYIncorrect. It does not use daemon:client syntax.
DENY ALL FROM ALLIncorrect. This is not the standard hosts.deny rule format.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' 'ALL : ALL'Expected result
ALL : ALLKey points
- ALL daemons
- ALL clients
- Design allow rules first
Notes
- Environment: hosts_access rule構文の表示のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.