kazulog@sv1:~$ cat /etc/os-release | head -2 PRETTY_NAME="Ubuntu 26.04 LTS" NAME="Ubuntu" kazulog@sv1:~$ cat /etc/hosts.allow # /etc/hosts.allow: list of hosts that are allowed to access the system. # See the manual pages hosts_access(5) and hosts_options(5). # # Example: ALL: LOCAL @some_netgroup # ALL: .foobar.edu EXCEPT terminalserver.foobar.edu # # If you're going to protect the portmapper use the name "rpcbind" for the # daemon name. See rpcbind(8) and rpc.mountd(8) for further information. # # SSH は必ず許可する(締め出し防止) sshd: ALL kazulog@sv1:~$ cat /etc/hosts.deny # /etc/hosts.deny: list of hosts that are _not_ allowed to access the system. # See the manual pages hosts_access(5) and hosts_options(5). # # Example: ALL: some.host.name, .some.domain # ALL EXCEPT in.fingerd: other.host.name, .other.domain # # If you're going to protect the portmapper use the name "rpcbind" for the # daemon name. See rpcbind(8) and rpc.mountd(8) for further information. # # The PARANOID wildcard matches any host whose name does not match its # address. # # You may wish to enable this to ensure any programs that don't # validate looked up hostnames still leave understandable logs. In past # versions of Debian this has been the default. # ALL: PARANOID # 自作サービスは 192.168.100.20 からの接続を拒否する hello.sh: 192.168.100.20 kazulog@sv1:~$ tcpdmatch hello.sh 192.168.100.20 client: address 192.168.100.20 server: process hello.sh access: denied