Linux ports.deny 設定を適用しないでください。

Linux ports.deny 設定を適用しないでください。

私のコンピュータからアクセスできないようにしたいウェブサイトがたくさんあります。

私のhosts.allowファイル:

sendmail: all
# /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.

私のhosts.denyファイル:

# /etc/hosts.deny: list of hosts that are 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

ALL: .vk.com
ALL: .ria.ru
ALL: facebook.com

私のhostsファイル:

127.0.0.1   localhost
127.0.0.1:82 testsecond
127.0.1.1   shc
127.0.2.2:81  someth.com
127.0.2.2:83 test

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
fe00::0 ip6-mcastprefix
fe02::1 ip6-allnodes
fe02::2 ip6-allrouters

ホスト*ファイルの設定に関するすべてのアドバイスに従い、依然としてそのファイルにアクセスできます。私は本当に愚かなことや間違ったことをしたようです。

私にとって、彼らは無視されたようです。

ベストアンサー1

hosts.denyサーバー用、いいえコンピュータで実行されているクライアントなので、それを使用してウェブサイトをブロックすることはできません。hosts_access(5)システムマニュアルページ(ダーバンバージョン、FreeBSDバージョン)。

ところで、Lennart Poetteringが提案をしました。tcpwrappers/tcpdを削除FedoraではSSHを開く同じことをします。

おすすめ記事