3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

TCPラッパー とは

Posted at

勉強前イメージ

聞いたことあるようなないような・・・・

調査

TCPラッパー とは

TCP wrapperと書き、linux系向けのセキュリティソフトになります。
デーモン、tcpdとして常駐して外部からのTCP/IPのアクセス制御や通信履歴の保存を行います。
TCPラッパーの通り、TCPはもちろんUDPやICMPも対応しています。
接続元IPなどを元に接続の許可・拒否の指定ができます。

デフォルトでは、許可は /etc/hosts.allow
拒否は /etc/hosts.deny のファイルに接続元のIPアドレスやホスト名などを記載して設定を行います。

何も設定していない2つのファイルのデフォルトはこちらになります。
manコマンドへの誘導など書いています。

  • cat /etc/hosts.allow
#
# hosts.allow   This file contains access rules which are used to
#               allow or deny connections to network services that
#               either use the tcp_wrappers library or that have been
#               started through a tcp_wrappers-enabled xinetd.
#
#               See 'man 5 hosts_options' and 'man 5 hosts_access'
#               for information on rule syntax.
#               See 'man tcpd' for information on tcp_wrappers
  • cat /etc/hosts.deny
#
# hosts.deny    This file contains access rules which are used to
#               deny connections to network services that either use
#               the tcp_wrappers library or that have been
#               started through a tcp_wrappers-enabled xinetd.
#
#               The rules in this file can also be set up in
#               /etc/hosts.allow with a 'deny' option instead.
#
#               See 'man 5 hosts_options' and 'man 5 hosts_access'
#               for information on rule syntax.
#               See 'man tcpd' for information on tcp_wrappers
#

TCPラッパーがファイルを読むのは
/etc/hosts.allow/etc/hosts.deny の順で
どちらもファイルの上から読まれます。
2つ同じことが記載されていても、最初に読み取った設定でマッチングされるので
順番は重要になります。

勉強後イメージ

大体わかったけどiptablesと何が違うんやろ・・・
似たようなもんな気がするけど

参考

3
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?