JP6382244B2 - Packet filtering device - Google Patents

Packet filtering device Download PDF

Info

Publication number
JP6382244B2
JP6382244B2 JP2016015168A JP2016015168A JP6382244B2 JP 6382244 B2 JP6382244 B2 JP 6382244B2 JP 2016015168 A JP2016015168 A JP 2016015168A JP 2016015168 A JP2016015168 A JP 2016015168A JP 6382244 B2 JP6382244 B2 JP 6382244B2
Authority
JP
Japan
Prior art keywords
address
packet
information
condition
external device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2016015168A
Other languages
Japanese (ja)
Other versions
JP2017135622A (en
Inventor
将 細田
将 細田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Secom Co Ltd
Original Assignee
Secom Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Secom Co Ltd filed Critical Secom Co Ltd
Priority to JP2016015168A priority Critical patent/JP6382244B2/en
Publication of JP2017135622A publication Critical patent/JP2017135622A/en
Application granted granted Critical
Publication of JP6382244B2 publication Critical patent/JP6382244B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、内部ネットワークに接続された端末装置と外部ネットワークに接続された外部装置との間における通信パケットの通過の可否を制御するパケットフィルタリング装置に関する。   The present invention relates to a packet filtering device that controls whether or not a communication packet can pass between a terminal device connected to an internal network and an external device connected to an external network.

従来から、ネットワークに接続されたコンピュータ相互間におけるパケット通信を制限するパケットフィルタリング装置(レイヤ3のファイアウォール)が知られている(特許文献1参照)。従来のパケットフィルタリング装置は、例えば、通過を許可(または不許可)するパケットのIPアドレス、プロトコル、ポート番号などの条件(フィルタリング条件)を予め記憶しておき、パケットフィルタリング装置を通過するパケットのヘッダ部に含まれるIPアドレス、プロトコル、ポート番号などがこの条件に合致しているか否かによって、パケットの通過の可否を制御する。このようなレイヤ3のファイアウォールは、それ以上のレイヤの情報を参照するファイアウォールに比べて、処理がシンプルであるため高速処理が可能である。   Conventionally, a packet filtering device (layer 3 firewall) that restricts packet communication between computers connected to a network is known (see Patent Document 1). A conventional packet filtering device, for example, stores in advance conditions (filtering conditions) such as an IP address, a protocol, and a port number of a packet that is permitted (or not permitted) to pass, and a header of a packet that passes through the packet filtering device. Whether or not a packet can pass is controlled based on whether or not an IP address, a protocol, a port number, and the like included in the packet match this condition. Such a layer 3 firewall has a simpler process than a firewall that refers to information of layers higher than that, and thus can perform high-speed processing.

特開2002−261788号公報JP 2002-261788 A

しかしながら、従来のパケットフィルタリング装置では、パケットの通過の可否を定める条件(フィルタリング条件)がIPアドレス、ポート番号、プロトコルなどで記述されており、管理者が条件を見ただけでは、フィルタリング条件の内容を把握することが困難であった。特に、フィルタリング条件に含まれるIPアドレスが、管理者の管理下にないグローバルIPアドレスで記述される場合、そのグローバルIPアドレスを見ただけでは、誰の管理下にある外部装置(サーバなど)であるのかを管理者が認識することが困難であった。そのため、フィルタリング条件を管理するのに手間がかかり、管理上の負担が大きくなるという問題があった。   However, in the conventional packet filtering device, the conditions (filtering conditions) for determining whether or not packets can pass are described in terms of IP address, port number, protocol, and the like. It was difficult to figure out. In particular, when the IP address included in the filtering condition is described with a global IP address that is not under the management of the administrator, the external device (such as a server) under the management of anyone simply looks at the global IP address. It was difficult for the administrator to recognize whether there was any. For this reason, there is a problem that it takes time and effort to manage the filtering conditions, which increases the management burden.

本発明は、上記の課題に鑑みてなされたもので、フィルタリング条件を容易に管理することができ、管理上の負担を軽減することのできるパケットフィルタリング装置を提供することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a packet filtering device that can easily manage filtering conditions and reduce the administrative burden.

本発明のパケットフィルタリング装置は、内部ネットワークに接続された端末装置と外部ネットワークに接続された外部装置との間における通信パケットの通過可否を制御するパケットフィルタリング装置であって、前記制御の対象となる外部装置のホスト名を識別できる条件を含む条件情報と、当該外部装置のIPアドレスを含むIPアドレス情報とを記憶する記憶部と、前記端末装置から前記外部装置へ送信された通信パケットが、電子証明書を利用したセキュア通信プロトコルによる接続パケットであるか否かを判定する接続パケット判定部と、前記接続パケットであると判定された場合に、前記外部装置に対して、前記端末装置を代理して前記セキュア通信プロトコルによる接続要求を送信する接続要求送信部と、前記接続要求に対する応答として前記外部装置から電子証明書を取得する電子証明書取得部と、取得した前記電子証明書から抽出したホスト名が前記条件情報の条件を満たしている場合に、前記接続パケットの宛先IPアドレスを用いて前記IPアドレス情報を更新するIPアドレス更新部と、前記端末装置と前記外部装置との間で送受される通信パケットのIPアドレスが前記IPアドレス情報に含まれるか否かに基づいて、当該通信パケットの通過可否を制御する通信制御部と、を備えている。   The packet filtering device of the present invention is a packet filtering device that controls whether or not a communication packet can pass between a terminal device connected to an internal network and an external device connected to an external network, and is a target of the control. A storage unit for storing condition information including a condition for identifying the host name of the external device and IP address information including the IP address of the external device, and a communication packet transmitted from the terminal device to the external device are electronic A connection packet determination unit that determines whether or not the connection packet is based on a secure communication protocol using a certificate, and if the connection packet is determined, the terminal device is represented to the external device. A connection request transmission unit for transmitting a connection request based on the secure communication protocol; An electronic certificate acquisition unit that acquires an electronic certificate from the external device as a response, and a destination IP of the connection packet when a host name extracted from the acquired electronic certificate satisfies the condition of the condition information An IP address update unit that updates the IP address information using an address, and whether or not an IP address of a communication packet transmitted / received between the terminal device and the external device is included in the IP address information A communication control unit that controls whether or not the communication packet can pass.

この構成により、外部装置から取得した電子証明書から抽出したホスト名が、予め記憶したフィルタリング条件情報に含まれるか否かに基づいて、そのホスト名の外部装置に対して送信された通信パケットの通過の可否が制御される。ここで「通信パケットの通過の可否を制御」とは、端末装置と外部装置との間における通信パケットの通過を許可したり、通過を禁止したりする制御をいう。また、条件情報は、ホスト名を識別できる条件が記された情報である。例えば、条件情報は、ホスト名そのものやFQDN(Fully Qualified Domain Name)、あるいは、正規表現・ワイルドカードなどのホスト名を識別できるパターン条件を記した情報である。したがって、管理者はIPアドレスといった数値列からなるフィルタリング条件ではなく、人が内容を容易に認識することができる条件情報を用いて管理できるため、管理上の負担を軽減することが可能になる。   With this configuration, based on whether or not the host name extracted from the electronic certificate acquired from the external device is included in the filtering condition information stored in advance, the communication packet transmitted to the external device of that host name Passability is controlled. Here, “controlling whether or not communication packets can pass” refers to control that permits or prohibits passage of communication packets between a terminal device and an external device. The condition information is information that describes a condition for identifying the host name. For example, the condition information is information describing a pattern condition that can identify a host name such as a host name itself, FQDN (Fully Qualified Domain Name), or regular expression / wild card. Therefore, the administrator can manage using condition information that allows a person to easily recognize the content, not the filtering condition including a numeric string such as an IP address, and thus the management burden can be reduced.

また、本発明のパケットフィルタリング装置では、前記条件情報は、前記端末装置との通信が許可された前記外部装置のホスト名を識別できる条件を含み、前記IPアドレス更新部は、取得した前記電子証明書から抽出したホスト名が前記条件情報の条件を満たしている場合に、前記接続パケットの宛先IPアドレスを前記IPアドレス情報に追加するよう更新し、前記通信制御部は、前記端末装置と前記外部装置との間で送受される通信パケットのIPアドレスが前記IPアドレス情報に含まれる場合に、当該通信パケットの通過を許可してもよい。   In the packet filtering device of the present invention, the condition information includes a condition for identifying a host name of the external device permitted to communicate with the terminal device, and the IP address updating unit acquires the acquired electronic certificate. When the host name extracted from the certificate satisfies the condition information, the connection control unit updates the destination IP address of the connection packet to be added to the IP address information, and the communication control unit updates the terminal device and the external device. When the IP address of the communication packet transmitted / received to / from the device is included in the IP address information, the communication packet may be permitted to pass.

この構成により、信頼できる外部装置であるとして通信が許可された外部装置のホスト名がフィルタリング条件情報に含まれており、取得した電子証明書から抽出したホスト名がフィルタリング条件情報に含まれていると、その電子証明書に基づいてIPアドレス情報が更新される。そして、このIPアドレス情報に基づいて、通信パケットの通過許可が制御される。これにより、信頼できる外部装置への通信パケットの通過を適切に許可することができる。   With this configuration, the host name of the external device that is allowed to communicate as being a trusted external device is included in the filtering condition information, and the host name extracted from the acquired electronic certificate is included in the filtering condition information. Then, the IP address information is updated based on the electronic certificate. Based on this IP address information, permission to pass communication packets is controlled. Thereby, the passage of the communication packet to the reliable external device can be appropriately permitted.

また、本発明のパケットフィルタリング装置では、前記記憶部は、前記端末装置との通信が禁止された前記外部装置のホスト名を識別できる条件を含む禁止条件情報を更に記憶し、前記IPアドレス更新部は、取得した前記電子証明書から抽出したホスト名が前記禁止条件情報の条件を満たしている場合に、前記接続パケットの宛先IPアドレスを前記IPアドレス情報から削除してもよい。   In the packet filtering device of the present invention, the storage unit further stores prohibition condition information including a condition for identifying a host name of the external device that is prohibited from communicating with the terminal device, and the IP address update unit May delete the destination IP address of the connection packet from the IP address information when the host name extracted from the acquired electronic certificate satisfies the condition of the prohibition condition information.

この構成により、信頼できない外部装置(例えば悪意ある処理を行うサーバ)であるとして、管理者などによって禁止条件情報が設定された場合、取得した電子証明書から抽出したホスト名が禁止条件情報に含まれていると、その電子証明書に基づいてIPアドレス情報から削除される。そして、このIPアドレス情報に基づいて通信パケットの通過可否が制御される。これにより、たとえ過去に信頼できる外部装置としてそのホスト名が条件情報に登録され、そしてIPアドレス情報に当該外部装置のIPアドレスが登録されていたとしても、禁止条件情報に基づいてIPアドレス情報を適切に更新できる。したがって、信頼できない外部装置への通信パケットの通過を適切に禁止することができる。   With this configuration, when prohibition condition information is set by an administrator or the like as an untrusted external device (for example, a server that performs malicious processing), the host name extracted from the acquired electronic certificate is included in the prohibition condition information. If it is registered, it is deleted from the IP address information based on the electronic certificate. Based on the IP address information, whether or not the communication packet can pass is controlled. As a result, even if the host name is registered in the condition information as an external device that can be trusted in the past, and the IP address of the external device is registered in the IP address information, the IP address information is changed based on the prohibition condition information. Can be updated appropriately. Therefore, the communication packet can be appropriately prohibited from passing to an unreliable external device.

また、本発明のパケットフィルタリング装置では、前記記憶部は、前記IPアドレス情報と前記条件情報とを対応付けて記憶し、前記IPアドレス更新部は、取得した前記電子証明書から抽出したホスト名が前記条件情報の条件を満たしている場合に、当該ホスト名に対応付けられている前記IPアドレス情報の宛先IPアドレスを更新してもよい。   In the packet filtering device of the present invention, the storage unit stores the IP address information and the condition information in association with each other, and the IP address update unit stores the host name extracted from the acquired electronic certificate. When the condition of the condition information is satisfied, the destination IP address of the IP address information associated with the host name may be updated.

この構成により、外部装置のホスト名とIPアドレスとの対応付けがダイナミックDNS(Domain Name System)などによって動的に変更されるような場合であっても、変更後の最新の対応付けに基づいてIPアドレス情報も更新されるため、最新の対応付けに基づいてパケットの通過可否の判定を行うことができる。したがって、外部装置のホスト名と対応づいた変更前の古いIPアドレスに基づいて誤ってパケットを通過(あるいは非通過)させるのを適切に防ぐことができる。   With this configuration, even if the association between the host name of the external device and the IP address is dynamically changed by dynamic DNS (Domain Name System) or the like, it is based on the latest association after the change. Since the IP address information is also updated, it is possible to determine whether or not a packet can pass based on the latest association. Therefore, it is possible to appropriately prevent the packet from being erroneously passed (or not passed) based on the old IP address before the change corresponding to the host name of the external device.

また、本発明のパケットフィルタリング装置では、前記記憶部は、前記端末装置のIPアドレスである端末IPアドレスと前記IPアドレス情報とを対応付けて記憶し、前記IPアドレス更新部は、取得した前記電子証明書から抽出したホスト名が前記条件情報の条件を満たしている場合に、前記接続パケットの送信元のIPアドレスと等しい前記端末IPアドレスに対応付けられている前記IPアドレス情報を更新してもよい。   In the packet filtering device of the present invention, the storage unit stores a terminal IP address, which is an IP address of the terminal device, and the IP address information in association with each other, and the IP address update unit stores the acquired electronic When the host name extracted from the certificate satisfies the condition of the condition information, the IP address information associated with the terminal IP address equal to the source IP address of the connection packet is updated. Good.

この構成により、パケットフィルタリング装置は、端末装置を代理してトランスポート層の通信プロトコルによる暗号化通信接続を行うことにより外部装置から電子証明書を取得し、取得した電子証明書に基づいて、端末装置ごとにIPアドレス情報を更新する。したがって、外部装置のホスト名とIPアドレスとの対応付けを、端末装置ごとに管理することができる。   With this configuration, the packet filtering device obtains an electronic certificate from an external device by performing encrypted communication connection using the transport layer communication protocol on behalf of the terminal device, and based on the acquired electronic certificate, the terminal The IP address information is updated for each device. Therefore, the association between the host name of the external device and the IP address can be managed for each terminal device.

また、本発明のパケットフィルタリング装置では、前記IPアドレス更新部は、前記電子証明書の検証結果に基づいて前記IPアドレス情報を更新してもよい。   In the packet filtering device of the present invention, the IP address update unit may update the IP address information based on a verification result of the electronic certificate.

この構成によれば、外部装置から取得した電子証明書の検証結果が適切である場合(例えば、電子証明書の秘密鍵を外部装置が所持している場合、証明書検証できる場合、電子証明書がEVSSL証明書などの信頼できる証明書である場合など)に、接続パケットの宛先IPアドレスに基づいてIPアドレス情報を更新する。したがって、外部装置の適切なホスト名を把握することができる。これにより、例えば、DNSポイズニングなどといったDNSサーバに対する攻撃の悪影響を低減することができる。   According to this configuration, when the verification result of the electronic certificate acquired from the external device is appropriate (for example, when the external device possesses the private key of the electronic certificate, the certificate can be verified, the electronic certificate The IP address information is updated based on the destination IP address of the connection packet. Therefore, an appropriate host name of the external device can be grasped. Thereby, the bad influence of the attack with respect to a DNS server, such as DNS poisoning, can be reduced, for example.

本発明によれば、フィルタリング条件を容易に管理することができ、管理上の負担を軽減することができる。   According to the present invention, filtering conditions can be easily managed, and the administrative burden can be reduced.

本発明の実施の形態におけるネットワークシステムの概略構成図である。1 is a schematic configuration diagram of a network system in an embodiment of the present invention. 本発明の実施の形態におけるパケットフィルタリング装置のブロック図である。It is a block diagram of the packet filtering apparatus in the embodiment of the present invention. 本発明の実施の形態における条件情報、IPアドレス情報、禁止条件情報、禁止IPアドレス情報の一例を示す図である。It is a figure which shows an example of the condition information in the embodiment of this invention, IP address information, prohibition condition information, and prohibition IP address information. 本発明の実施の形態における条件情報とIPアドレス情報の対応付けの一例を示す図である。It is a figure which shows an example of matching with condition information and IP address information in embodiment of this invention. 本発明の実施の形態における端末IPアドレスとIPアドレス情報の対応付けの一例を示す図である。It is a figure which shows an example of matching with the terminal IP address and IP address information in embodiment of this invention. 本発明の実施の形態におけるパケットフィルタリング装置の動作を示すフロー図である。It is a flowchart which shows operation | movement of the packet filtering apparatus in embodiment of this invention. 本発明の実施の形態におけるIPアドレス情報更新処理の流れを示すフロー図である。It is a flowchart which shows the flow of the IP address information update process in embodiment of this invention. 本発明の実施の形態におけるパケットフィルタリング装置のDNS応答に基づいてIPアドレス情報を更新しフィルタリング制御する時の処理の流れを説明するシーケンス図である。It is a sequence diagram explaining the flow of a process at the time of updating IP address information based on the DNS response of the packet filtering apparatus in embodiment of this invention, and filtering-controlling. 本発明の実施の形態におけるパケットフィルタリング装置のSSL(Secure Socket Layer)/TLS(Transport Layer Security)通信に基づいてIPアドレス情報を更新しフィルタリング制御する時の処理の流れを説明するシーケンス図である。It is a sequence diagram explaining the flow of a process at the time of updating IP address information based on SSL (Secure Socket Layer) / TLS (Transport Layer Security) communication of the packet filtering apparatus in embodiment of this invention, and filtering-controlling.

以下、本発明の実施の形態のパケットフィルタリング装置について、図面を用いて説明する。本実施の形態では、ネットワークに接続されたコンピュータ相互間におけるパケット通信を制限するファイアウォール等に用いられるパケットフィルタリング装置の場合を例示する。   Hereinafter, a packet filtering apparatus according to an embodiment of the present invention will be described with reference to the drawings. In the present embodiment, a case of a packet filtering device used for a firewall or the like that restricts packet communication between computers connected to a network will be exemplified.

本発明の実施の形態のパケットフィルタリング装置の構成を、図面を参照して説明する。図1は、本実施の形態のパケットフィルタリング装置が適用されるネットワークシステムの概略構成を示す図である。図1に示すように、ネットワークシステム1は、内部ネットワーク2に接続されている端末装置3(例えば端末装置X、Y、Z)、パケットフィルタリング装置4(ファイアウォール)、DNSサーバ5と、外部ネットワーク6に接続されている外部装置7(例えば外部装置A、B、C)を備えている。なお、パケットフィルタリング装置4は、DNSサーバ5から端末装置3へのDNS応答を傍受可能な内部ネットワーク上の位置に接続されているものとする。端末装置3や外部装置7は、例えばパーソナルコンピュータなどであり、パケットフィルタリング装置4は、端末装置3と外部装置7との間における通信パケットの通過をフィルタリングする機能を備えている。   The configuration of the packet filtering apparatus according to the embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a diagram showing a schematic configuration of a network system to which the packet filtering apparatus of the present embodiment is applied. As shown in FIG. 1, the network system 1 includes a terminal device 3 (for example, terminal devices X, Y, and Z), a packet filtering device 4 (firewall), a DNS server 5, and an external network 6 connected to an internal network 2. The external device 7 (for example, external devices A, B, and C) connected to is provided. It is assumed that the packet filtering device 4 is connected to a location on the internal network where a DNS response from the DNS server 5 to the terminal device 3 can be intercepted. The terminal device 3 and the external device 7 are personal computers, for example, and the packet filtering device 4 has a function of filtering the passage of communication packets between the terminal device 3 and the external device 7.

図2は、パケットフィルタリング装置4の構成を示すブロック図である。図2に示すように、パケットフィルタリング装置4は、通信部40、入力部41、出力部42、記憶部43、制御部44を備えている。   FIG. 2 is a block diagram showing a configuration of the packet filtering device 4. As shown in FIG. 2, the packet filtering device 4 includes a communication unit 40, an input unit 41, an output unit 42, a storage unit 43, and a control unit 44.

通信部40は、内部ネットワーク2を介して端末装置3やDNSサーバ5と通信する機能を備えている。また、通信部40は、外部ネットワーク6を介して外部装置7と通信する機能を備えている。入力部41は、各種のデータ等を入力するためのインターフェースであり、例えば、キーボードやマウス、タッチパネル、可搬記憶媒体の読み取り装置等の情報入力デバイスが相当する。出力部42は、各種のデータ等を出力するためのインターフェースであり、ディスプレイや可搬記憶媒体の記憶装置等の情報出力デバイスが相当する。   The communication unit 40 has a function of communicating with the terminal device 3 and the DNS server 5 via the internal network 2. Further, the communication unit 40 has a function of communicating with the external device 7 via the external network 6. The input unit 41 is an interface for inputting various data and the like, and corresponds to, for example, an information input device such as a keyboard, a mouse, a touch panel, and a portable storage medium reader. The output unit 42 is an interface for outputting various data, and corresponds to an information output device such as a display or a storage device of a portable storage medium.

記憶部43には、条件情報430、IPアドレス情報431、禁止条件情報432、禁止IPアドレス情報433などが記憶される。   The storage unit 43 stores condition information 430, IP address information 431, prohibited condition information 432, prohibited IP address information 433, and the like.

図3には、条件情報430、IPアドレス情報431、禁止条件情報432、禁止IPアドレス情報433の一例が示される。図3に示すように、条件情報430は、フィルタリング制御の対象(通信の制御対象)となる外部装置7のホスト名(例えば、ホストA、ホストB、ホストCなど)を含んでいる。また、条件情報430は、外部装置7のホスト名やFQDNが直接的に記述されてもよく、ワイルドカードや正規表現などのマッチングパターンで記述されてもよい。このように条件情報430は、外部装置7のホスト名を識別できる条件が記述されていればよい。条件情報430は、管理者によって予め設定される。本実施の形態では、条件情報430は、端末装置3との通信が許可された外部装置7のホスト名が記述されるホワイトリスト方式とする。しかし、ホワイトリスト方式に限らず、端末装置3との通信を許可しない外部装置7のホスト名が記述されるブラックリスト方式でもよい。   FIG. 3 shows an example of condition information 430, IP address information 431, prohibited condition information 432, and prohibited IP address information 433. As shown in FIG. 3, the condition information 430 includes the host name (for example, host A, host B, host C, etc.) of the external device 7 that is a filtering control target (communication control target). In the condition information 430, the host name and FQDN of the external device 7 may be directly described, or may be described by a matching pattern such as a wild card or a regular expression. As described above, the condition information 430 only needs to describe a condition for identifying the host name of the external device 7. The condition information 430 is preset by the administrator. In the present embodiment, the condition information 430 is a white list method in which the host name of the external device 7 permitted to communicate with the terminal device 3 is described. However, not only the white list method but also a black list method in which the host name of the external device 7 that does not permit communication with the terminal device 3 is described.

IPアドレス情報431は、フィルタリング制御の対象(通信の制御対象)となる通信パケットの宛先IPアドレス(例えば、グローバルIPアドレスA、グローバルIPアドレスB、グローバルIPアドレスC)を含んでいる。IPアドレス情報431には、条件情報430に合致する外部装置7のIPアドレス(グローバルIPアドレス)が記述される。IPアドレス情報431は、後述するようにIPアドレス更新部441によって更新され、このIPアドレス情報431に基づいて、通信パケットの通過可否が判定される。なお、IPアドレス情報431は、初期状態ではヌルデータ(情報なし)でもよく、また、予め管理者によって設定されたIPアドレスが登録されていてもよい。また、端末装置3からDNSサーバ5への通信パケットはフィルタリング制御の対象外とされる。すなわち、IPアドレス情報431にDNSサーバ5のIPアドレスは含まれないとしても、端末装置3とDNSサーバ5との間で制限なく通信できるものとする。   The IP address information 431 includes destination IP addresses (for example, global IP address A, global IP address B, and global IP address C) of communication packets that are filtering control targets (communication control targets). The IP address information 431 describes the IP address (global IP address) of the external device 7 that matches the condition information 430. The IP address information 431 is updated by the IP address updating unit 441 as will be described later, and it is determined whether or not the communication packet can pass based on the IP address information 431. The IP address information 431 may be null data (no information) in the initial state, or an IP address set in advance by an administrator may be registered. Further, communication packets from the terminal device 3 to the DNS server 5 are not subject to filtering control. That is, even if the IP address information 431 does not include the IP address of the DNS server 5, it is assumed that communication can be performed between the terminal device 3 and the DNS server 5 without restriction.

禁止条件情報432は、端末装置3との通信が禁止される外部装置7のホスト名を識別できる条件を含んでいる。例えば、端末装置3との通信が禁止される外部装置7のホスト名(例えば、ホストH、ホストI、ホストJなど)やFQDNが直接的に記述されてもよく、ワイルドカードや正規表現などのマッチングパターンで記述されてもよい。禁止条件情報432は、管理者によって予め設定される。なお、本実施の形態では、禁止条件情報432は、ブラックリスト方式で記述されるが、条件情報430がブラックリスト方式で記述されている他の実施の形態では、ホワイトリスト方式で記述されてもよい(許可条件情報でもよい)。   The prohibition condition information 432 includes a condition for identifying the host name of the external device 7 that is prohibited from communicating with the terminal device 3. For example, the host name (eg, host H, host I, host J, etc.) or FQDN of the external device 7 that is prohibited from communicating with the terminal device 3 may be described directly, such as a wild card or a regular expression. It may be described by a matching pattern. The prohibition condition information 432 is set in advance by the administrator. In the present embodiment, the prohibition condition information 432 is described in a black list method. However, in other embodiments in which the condition information 430 is described in a black list method, the prohibition condition information 432 may be described in a white list method. Good (may be permission condition information).

禁止IPアドレス情報433は、端末装置3との通信が禁止される外部装置7のIPアドレス(例えば、グローバルIPアドレスH、グローバルIPアドレスI、グローバルIPアドレスJなど)を含んでいる。禁止IPアドレス情報433は、管理者によって予め設定される。なお、本実施の形態では、禁止IPアドレス情報433は、ブラックリスト方式で記述されるが、IPアドレス情報431がブラックリスト方式で記述されている他の実施の形態の場合には、ホワイトリスト方式で記述されてもよい(許可IPアドレス情報でもよい)。   The prohibited IP address information 433 includes the IP address (for example, global IP address H, global IP address I, global IP address J, etc.) of the external device 7 whose communication with the terminal device 3 is prohibited. The prohibited IP address information 433 is preset by the administrator. In the present embodiment, the prohibited IP address information 433 is described in a blacklist format, but in other embodiments in which the IP address information 431 is described in a blacklist format, the whitelist format is used. (Allowed IP address information may also be used).

制御部44は、DNS応答に基づいてIPアドレス情報431を更新しフィルタリング制御を行うための構成として、DNS応答傍受部440、IPアドレス更新部441、通信制御部442を備えている。   The control unit 44 includes a DNS response interception unit 440, an IP address update unit 441, and a communication control unit 442 as a configuration for updating the IP address information 431 based on the DNS response and performing filtering control.

DNS応答傍受部440は、内部ネットワーク2に接続されたDNSサーバ5から端末装置3への通信パケットを傍受(例えばスニッフィング)し、傍受した通信パケットの中からDNS応答を抽出する機能を備えている。すなわち、端末装置3が外部装置7に接続する場合に、パケットフィルタリング装置4を介してDNSサーバ5にDNS要求を送信する。DNSサーバ5は、このDNS要求に対する応答としてDNS応答をパケットフィルタリング装置4を介して端末装置3に送信する。DNS要求には、接続先の外部装置7のホスト名が含まれており、DNS応答には、そのホスト名と共にホスト名に対応するIPアドレス(回答IPアドレス)が含まれる。DNS応答傍受部440は、このような回答IPアドレスを含んだDNS応答を傍受する。   The DNS response interception unit 440 has a function of intercepting (for example, sniffing) a communication packet from the DNS server 5 connected to the internal network 2 to the terminal device 3, and extracting a DNS response from the intercepted communication packet. . That is, when the terminal device 3 connects to the external device 7, a DNS request is transmitted to the DNS server 5 via the packet filtering device 4. The DNS server 5 transmits a DNS response as a response to this DNS request to the terminal device 3 via the packet filtering device 4. The DNS request includes the host name of the external device 7 that is the connection destination, and the DNS response includes the IP address (answer IP address) corresponding to the host name together with the host name. The DNS response interception unit 440 intercepts a DNS response including such an answer IP address.

IPアドレス更新部441は、DNS応答傍受部440で傍受したDNS応答からホスト名や回答IPアドレスを抽出することができ、DNS応答から抽出したホスト名が条件情報430の条件に合致している場合に、そのDNS応答に含まれる回答IPアドレス(グローバルIPアドレス)を用いてIPアドレス情報431を更新する。例えば、DNS応答から抽出したホスト名「ホストA」が条件情報430に含まれている場合には、そのDNS応答に含まれる回答IPアドレス「(ホストAの)グローバルIPアドレスA」がIPアドレス情報431に追加される。   The IP address updating unit 441 can extract the host name and the reply IP address from the DNS response intercepted by the DNS response intercepting unit 440, and the host name extracted from the DNS response matches the condition of the condition information 430 The IP address information 431 is updated using the reply IP address (global IP address) included in the DNS response. For example, when the host name “host A” extracted from the DNS response is included in the condition information 430, the reply IP address “global IP address A (of host A)” included in the DNS response is the IP address information. 431 is added.

なお、DNS応答には、CNAME(Canonical Name)タイプのDNS応答も含まれる。この場合、ホストAのIPアドレスを要求するDNS要求に対して、ホストBを参照(ホストBと同じ)というDNS応答が返される。このタイプのDNS応答を受けた端末装置3は、次にホストBのIPアドレスを要求するDNS要求を送り、その応答として、ホストBのIPアドレス(すなわち、ホストAのIPアドレス)を回答IPアドレスとして受け取る。IPアドレス更新部441は、このような一連のDNS応答(複数のDNS応答)からホスト名や回答IPアドレスを抽出することができる。   The DNS response includes a CNAME (Canonical Name) type DNS response. In this case, in response to the DNS request for requesting the IP address of host A, a DNS response that refers to host B (same as host B) is returned. The terminal device 3 that has received this type of DNS response next sends a DNS request for requesting the IP address of the host B, and returns the IP address of the host B (that is, the IP address of the host A) as the response IP address. Receive as. The IP address updating unit 441 can extract the host name and the reply IP address from such a series of DNS responses (a plurality of DNS responses).

また、IPアドレス更新部441は、DNS応答傍受部440で傍受したDNS応答から抽出したホスト名が禁止条件情報432に含まれている場合には、そのDNS応答に含まれる回答IPアドレスをIPアドレス情報431から削除する。例えば、DNS応答から抽出したホスト名「ホストH」が禁止条件情報432に含まれている場合には、そのDNS応答に含まれる回答IPアドレス「(ホストHの)グローバルIPアドレスH」がIPアドレス情報431から削除される。   In addition, when the host name extracted from the DNS response intercepted by the DNS response interception unit 440 is included in the prohibition condition information 432, the IP address update unit 441 uses the reply IP address included in the DNS response as the IP address. Delete from the information 431. For example, when the host name “host H” extracted from the DNS response is included in the prohibition condition information 432, the reply IP address “global IP address H (of host H)” included in the DNS response is the IP address. It is deleted from the information 431.

通信制御部442は、端末装置3から送信された通信パケットの宛先IPアドレスがIPアドレス情報431に含まれるか否かに基づいて、通信パケットの通過可否を制御するフィルタリング制御を行う。本実施の形態では、通信制御部442は、端末装置3から送信された通信パケットの宛先IPアドレスがIPアドレス情報431に含まれていれば、通信パケットの通過を許可する。一方、端末装置3から送信された通信パケットの宛先IPアドレスがIPアドレス情報431に含まれていなければ、通信パケットの通過を禁止する。   The communication control unit 442 performs filtering control for controlling whether or not the communication packet can pass based on whether or not the IP address information 431 includes the destination IP address of the communication packet transmitted from the terminal device 3. In the present embodiment, the communication control unit 442 allows the communication packet to pass if the destination IP address of the communication packet transmitted from the terminal device 3 is included in the IP address information 431. On the other hand, if the destination IP address of the communication packet transmitted from the terminal device 3 is not included in the IP address information 431, passage of the communication packet is prohibited.

また、制御部44は、SSL/TLS通信に基づいてIPアドレス情報431を更新しフィルタリング制御するための構成として、接続パケット判定部443、接続要求送信部444、証明書情報取得部445を備えている。   The control unit 44 includes a connection packet determination unit 443, a connection request transmission unit 444, and a certificate information acquisition unit 445 as a configuration for updating the IP address information 431 and performing filtering control based on SSL / TLS communication. Yes.

接続パケット判定部443は、端末装置3から外部装置7へ送信された通信パケットが、電子証明書を用いたセキュア通信プロトコル(例えば、SSL/TLS接続)の接続パケットであるか否かを判定する。例えば、その通信パケットのポート番号が「443」などの標準的にTLS接続に割り当てられるポート番号である場合には、TLS接続用の接続パケットであると判定する。しかし、これに限らず、少しでも電子証明書を用いたセキュア通信プロトコルの接続用の接続パケットである可能性があるならば、その通信パケットを当該セキュア通信プロトコルの接続パケットと判定してもよい。例えば、TCP接続の接続パケットであるならば、SSL/TLS接続用パケットの可能性があるため、セキュア通信プロトコルの接続パケットと判定してもよい。   The connection packet determination unit 443 determines whether or not the communication packet transmitted from the terminal device 3 to the external device 7 is a connection packet of a secure communication protocol (for example, SSL / TLS connection) using an electronic certificate. . For example, when the port number of the communication packet is a port number that is normally assigned to the TLS connection such as “443”, the communication packet is determined to be a connection packet for TLS connection. However, the present invention is not limited to this, and if there is a possibility that the packet is a connection packet for secure communication protocol connection using an electronic certificate, the communication packet may be determined as a connection packet of the secure communication protocol. . For example, if it is a TCP connection packet, it may be determined as a secure communication protocol connection packet because there is a possibility of an SSL / TLS connection packet.

接続要求送信部444は、接続パケット判定部443で電子証明書を用いたセキュア通信プロトコル(TLS接続)の接続パケットであると判定された場合に、外部装置7に対して、端末装置3を代理して同じセキュア通信プロトコル(TLS接続)を行う接続要求(TLS接続要求)を送信する。   The connection request transmission unit 444 substitutes the terminal device 3 for the external device 7 when the connection packet determination unit 443 determines that the connection packet is a secure communication protocol (TLS connection) using an electronic certificate. Then, a connection request (TLS connection request) for performing the same secure communication protocol (TLS connection) is transmitted.

証明書情報取得部445は、TLS接続要求に対する応答として外部装置7から電子証明書を取得する。また、証明書情報取得部445は、外部装置7から取得した電子証明書を検証する機能を備えている。例えば、電子証明書の秘密鍵を外部装置7が所持していることが検証できた場合、証明書の有効性が検証できた場合、電子証明書がEVSSL証明書などの信頼できる証明書である場合には、検証結果が適切である(検証条件を満たす)と判定される。   The certificate information acquisition unit 445 acquires an electronic certificate from the external device 7 as a response to the TLS connection request. In addition, the certificate information acquisition unit 445 has a function of verifying an electronic certificate acquired from the external device 7. For example, when it is possible to verify that the external device 7 has the private key of the electronic certificate, or when the validity of the certificate can be verified, the electronic certificate is a trusted certificate such as an EVSSL certificate. In this case, it is determined that the verification result is appropriate (the verification condition is satisfied).

証明書情報取得部445が端末装置3を代理して外部装置7から電子証明書を取得した場合、IPアドレス更新部441は、取得した電子証明書から抽出したホスト名が条件情報430に含まれる条件を満たしていれば、端末装置3が送信したTLS接続パケットの宛先IPアドレス(すなわち、端末装置3が接続しようとしている外部装置7のグローバルIPアドレス)を用いてIPアドレス情報431を更新する。また、IPアドレス更新部441は、証明書情報取得部445で取得した電子証明書から抽出したホスト名が禁止条件情報432に含まれていれば、端末装置3が送信したTLS接続パケットの宛先IPアドレスをIPアドレス情報431から削除する。   When the certificate information acquisition unit 445 acquires an electronic certificate from the external device 7 on behalf of the terminal device 3, the IP address update unit 441 includes the host name extracted from the acquired electronic certificate in the condition information 430. If the condition is satisfied, the IP address information 431 is updated using the destination IP address of the TLS connection packet transmitted by the terminal device 3 (that is, the global IP address of the external device 7 to which the terminal device 3 is to connect). Further, the IP address update unit 441, if the host name extracted from the electronic certificate acquired by the certificate information acquisition unit 445 is included in the prohibition condition information 432, the destination IP of the TLS connection packet transmitted by the terminal device 3 The address is deleted from the IP address information 431.

なお、IPアドレス更新部441は、証明書情報取得部445による電子証明書の検証結果に基づいてIPアドレス情報431を更新してもよい。すなわち、外部装置7から取得した電子証明書の検証結果が適切である場合には、TLS接続パケットの宛先IPアドレスを用いてIPアドレス情報431を更新する。一方、外部装置7から取得した電子証明書の検証結果が適切でない場合には、TLS接続パケットの宛先IPアドレスを用いてIPアドレス情報431を更新しない。   Note that the IP address update unit 441 may update the IP address information 431 based on the verification result of the electronic certificate by the certificate information acquisition unit 445. That is, when the verification result of the electronic certificate acquired from the external device 7 is appropriate, the IP address information 431 is updated using the destination IP address of the TLS connection packet. On the other hand, if the verification result of the electronic certificate acquired from the external device 7 is not appropriate, the IP address information 431 is not updated using the destination IP address of the TLS connection packet.

以上のように構成されたパケットフィルタリング装置4について、図6、図7のフロー図および図8、図9のシーケンス図を参照してその動作を説明する。   The operation of the packet filtering device 4 configured as described above will be described with reference to the flowcharts of FIGS. 6 and 7 and the sequence diagrams of FIGS.

図6は、パケットフィルタリング装置4の動作を示すフロー図である。図6に示すように、端末装置3と外部装置7との間の通信パケットの通過をフィルタリング制御する場合には、まず、パケットフィルタリング装置4で初期設定処理が行われる(S1)。この初期設定処理では、禁止IPアドレス情報433に記述されているIPアドレスが読み出されて、そのIPアドレスがIPアドレス情報431から削除される。   FIG. 6 is a flowchart showing the operation of the packet filtering device 4. As shown in FIG. 6, when performing filtering control of the passage of communication packets between the terminal device 3 and the external device 7, first, initial setting processing is performed in the packet filtering device 4 (S <b> 1). In this initial setting process, the IP address described in the prohibited IP address information 433 is read, and the IP address is deleted from the IP address information 431.

その後、パケットフィルタリング装置4のDNS応答傍受部440は、通信パケットを傍受(例えばスニッフィング)する処理を行う(S2)。この場合、パケットフィルタリング装置4は、通信経路上のすべての通信パケットを傍受する。これにより、これ以降の処理で、各通信パケットのヘッダやペイロードをチェックすることが可能になる。   Thereafter, the DNS response interception unit 440 of the packet filtering device 4 performs a process of intercepting (for example, sniffing) the communication packet (S2). In this case, the packet filtering device 4 intercepts all communication packets on the communication path. This makes it possible to check the header and payload of each communication packet in the subsequent processing.

つぎに、DNS応答傍受部440は、傍受した通信パケットがDNS応答パケットであるか否かの判定を行う(S3)。例えば、傍受した通信パケットのポート番号やペイロードの書式に基づいて、通信パケットがDNS応答であるか否かを判定することができる。DNS応答傍受部440にて傍受した通信パケットがDNS応答パケットである場合には、IPアドレス更新部441によりIPアドレス情報431の更新処理が行われる(S4)。その後、傍受したDNS応答パケットは端末装置3に対して転送され、処理をS2に進めてパケットの傍受を再開する。   Next, the DNS response interception unit 440 determines whether or not the intercepted communication packet is a DNS response packet (S3). For example, based on the port number of the intercepted communication packet and the format of the payload, it can be determined whether the communication packet is a DNS response. When the communication packet intercepted by the DNS response interception unit 440 is a DNS response packet, the IP address update unit 441 performs update processing of the IP address information 431 (S4). Thereafter, the intercepted DNS response packet is transferred to the terminal device 3, and the process proceeds to S2 to resume the interception of the packet.

傍受した通信パケットがDNS応答パケットでない場合には、端末装置3から外部装置7へ送信される通信パケットであるか否かの判定が行われる(S5)。例えば、傍受した通信パケットの宛先IPアドレスに基づいて、端末装置3から外部装置7へ送信される通信パケットであるか否かを判定することができる。   If the intercepted communication packet is not a DNS response packet, it is determined whether or not it is a communication packet transmitted from the terminal device 3 to the external device 7 (S5). For example, based on the destination IP address of the intercepted communication packet, it can be determined whether or not the communication packet is transmitted from the terminal device 3 to the external device 7.

端末装置3から外部装置7へ送信される通信パケットである場合には、通信制御部442は、その宛先IPアドレスがIPアドレス情報431に含まれるか否かに基づいて、その通信パケットを通過させるか否かを判定する処理を行う(S6)。例えば、ホワイトリスト方式の場合、宛先IPアドレスがIPアドレス情報431に含まれる場合には、その通信パケットを通過させると判定される。   When the communication packet is transmitted from the terminal device 3 to the external device 7, the communication control unit 442 allows the communication packet to pass based on whether or not the destination IP address is included in the IP address information 431. The process which determines whether or not is performed (S6). For example, in the case of the white list method, when the destination IP address is included in the IP address information 431, it is determined that the communication packet is allowed to pass.

通過させると判定された場合には(S7)、その通信パケットを通過させる処理が行われる(S8)。一方、通過させないと判定された場合には、接続パケット判定部443は、その通信パケットがTLS接続用の接続パケットであるか否かを判定する(S9)。例えば、接続パケット判定部443は、傍受した通信パケットのポート番号などに基づいてその通信パケットがTLS接続用の接続パケットの可能性を有するかを判定し、可能性が高いならばTLS接続用の接続パケットであると判定する。具体的には、その通信パケットのポート番号が「443」などの標準的にTLS接続に割り当てられるポート番号である場合には、TLS接続用の接続パケットであると判定される。TLS接続用の接続パケットでなければ、その通信パケットは破棄される(S10)。   When it is determined that the communication packet is allowed to pass (S7), processing for passing the communication packet is performed (S8). On the other hand, when it is determined not to pass, the connection packet determination unit 443 determines whether or not the communication packet is a connection packet for TLS connection (S9). For example, the connection packet determination unit 443 determines whether the communication packet has the possibility of a connection packet for TLS connection based on the port number of the intercepted communication packet. It is determined that the packet is a connection packet. Specifically, when the port number of the communication packet is a port number that is normally assigned to a TLS connection such as “443”, it is determined that the communication packet is a connection packet for TLS connection. If it is not a connection packet for TLS connection, the communication packet is discarded (S10).

接続パケット判定部443によりTLS接続用の接続パケットであると判定された場合、パケットフィルタリング装置4は、当該接続パケットの転送を一旦保留(キャッシュ)するとともに、接続要求送信部444は外部装置7に対して、当該接続パケットを送信した端末装置3を代理してTLS接続用の接続パケットを送信(TLS接続要求)する(S11)。すなわち、当該TLS接続要求で代理送信する接続パケットの送信元IPアドレスにはパケットフィルタリング装置4自らのIPアドレスが設定される。なお、先に代理のTLS接続要求(S11)を送った後に、TLS接続用の接続パケットであるか否かの判断(S9)を行ってもよい。   When the connection packet determination unit 443 determines that the connection packet is for TLS connection, the packet filtering device 4 temporarily holds (caches) the transfer of the connection packet, and the connection request transmission unit 444 sends the connection request to the external device 7. On the other hand, a connection packet for TLS connection is transmitted (TLS connection request) on behalf of the terminal device 3 that has transmitted the connection packet (S11). That is, the IP address of the packet filtering device 4 itself is set as the transmission source IP address of the connection packet that is proxy-transmitted by the TLS connection request. Note that after sending the proxy TLS connection request (S11) first, it may be determined whether the packet is a connection packet for TLS connection (S9).

そして、証明書情報取得部445は、TLS接続要求に対する応答として外部装置7から電子証明書を取得し、その電子証明書の検証を行う(S12)。この検証では、当該外部装置7が電子証明書の秘密鍵を外部装置7が所持しているか否か、取得した電子証明書が有効であるか否か、取得した電子証明書がEVSSL証明書などの信頼できる証明書であるか否かなどについて検証する。そして、証明書情報取得部445は、検証の結果が所定の検証条件を満たすか否かが判定する(S13)。検証条件は予め管理者によって設定され記憶部43に記憶されているものとする。例えば、より信頼性の高い電子証明書に基づいてフィルタリング制御したいのであれば、「秘密鍵を所持」、「電子証明書が有効」、「EVSSL証明書である」などといったように複数(多重)の条件が設定される。   Then, the certificate information acquisition unit 445 acquires an electronic certificate from the external device 7 as a response to the TLS connection request, and verifies the electronic certificate (S12). In this verification, whether or not the external device 7 possesses the private key of the electronic certificate, whether or not the acquired electronic certificate is valid, the acquired electronic certificate is an EVSSL certificate, etc. Verify whether it is a trusted certificate. Then, the certificate information acquisition unit 445 determines whether or not the verification result satisfies a predetermined verification condition (S13). It is assumed that the verification condition is set in advance by the administrator and stored in the storage unit 43. For example, if filtering control is to be performed based on a more reliable electronic certificate, a plurality (multiplex) such as “having a private key”, “valid electronic certificate”, “EVSSL certificate”, etc. Is set.

IPアドレス更新部441は、検証結果が検証条件を満たすと判定した場合には、IPアドレス情報431の更新処理を行う(S14)。そして、通信制御部442は、端末装置3から受信したTLS接続用の接続パケットにおける宛先IPアドレスが更新後のIPアドレス情報431に含まれるか否かに基づいて、その通信パケットを通過させるか否かを判定する処理を行う(S6)。一方、検証条件を満たさないと判定された場合には、その通信パケットは破棄される(S10)。   If the IP address update unit 441 determines that the verification result satisfies the verification condition, the IP address update unit 441 performs an update process of the IP address information 431 (S14). Then, the communication control unit 442 determines whether or not to allow the communication packet to pass based on whether or not the destination IP address in the connection packet for TLS connection received from the terminal device 3 is included in the updated IP address information 431. Processing for determining whether or not (S6). On the other hand, when it is determined that the verification condition is not satisfied, the communication packet is discarded (S10).

図7は、IPアドレス更新部441で実行されるIPアドレス情報431の更新処理の流れを示すフロー図である。図7に示すように、IPアドレス情報431の更新処理が開始されると、まず、S2で傍受したDNS応答から抽出したホスト名またはS12で取得した電子証明書から抽出したホスト名(以下、これらの抽出したホスト名を「抽出ホスト名」という)が条件情報430に含まれるか否かが判定される(S20)。すなわち、抽出ホスト名が、条件情報430における複数の条件のうちの少なくとも一つの条件を満たしているか否かが判定される。   FIG. 7 is a flowchart showing the flow of the IP address information 431 update process executed by the IP address update unit 441. As shown in FIG. 7, when the update processing of the IP address information 431 is started, first, the host name extracted from the DNS response intercepted in S2 or the host name extracted from the electronic certificate acquired in S12 (hereinafter referred to as these It is determined whether or not the extracted host name is referred to as “extracted host name” in the condition information 430 (S20). That is, it is determined whether or not the extracted host name satisfies at least one of a plurality of conditions in the condition information 430.

抽出ホスト名が条件情報430の条件を満たしている場合には、DNS応答から抽出した回答IPアドレスまたはTLS接続用の接続パケットから抽出した宛先IPアドレス(以下、これらの抽出したIPアドレスを「抽出IPアドレス」という)が禁止IPアドレス情報433に含まれるか否かが判定される(S21)。抽出IPアドレスが禁止IPアドレス情報433に含まれなければ、その抽出IPアドレスをIPアドレス情報431に追加する(S22)。抽出IPアドレスが禁止IPアドレス情報433に含まれれば、その抽出IPアドレスをIPアドレス情報431に追加せずに、IPアドレス情報更新処理を終了する。   If the extracted host name satisfies the condition of the condition information 430, the reply IP address extracted from the DNS response or the destination IP address extracted from the connection packet for TLS connection (hereinafter, these extracted IP addresses are extracted. It is determined whether or not “prohibited IP address information 433” is included in the IP address information 433 (S21). If the extracted IP address is not included in the prohibited IP address information 433, the extracted IP address is added to the IP address information 431 (S22). If the extracted IP address is included in the prohibited IP address information 433, the IP address information update process is terminated without adding the extracted IP address to the IP address information 431.

一方、S20において抽出ホスト名が条件情報430に含まれない場合には、抽出ホスト名が禁止条件情報432に含まれるか否かが判定される(S23)。抽出ホスト名が禁止条件情報432に含まれており、抽出IPアドレスがIPアドレス情報431に含まれている場合、当該抽出IPアドレスをIPアドレス情報431から削除する(S24)。抽出ホスト名が禁止条件情報432に含まれなければ、IPアドレス情報更新処理を終了する。   On the other hand, if the extracted host name is not included in the condition information 430 in S20, it is determined whether or not the extracted host name is included in the prohibited condition information 432 (S23). When the extracted host name is included in the prohibition condition information 432 and the extracted IP address is included in the IP address information 431, the extracted IP address is deleted from the IP address information 431 (S24). If the extracted host name is not included in the prohibition condition information 432, the IP address information update process ends.

図8は、パケットフィルタリング装置4のDNS応答に基づいてIPアドレス情報431を更新しフィルタリング制御する時における処理の流れを説明するシーケンス図である。図8に示すように、まず端末装置3からDNSサーバ5にDNS要求が送信される(S100)。このDNS要求に対する応答として、DNSサーバ5からパケットフィルタリング装置4を介して端末装置3にDNS応答が送信される。すなわち、DNSサーバ5からパケットフィルタリング装置4にDNS応答が送信され(S101)、当該DNS応答をパケットフィルタリング装置4が端末装置3に対して転送する(S102)。このとき、パケットフィルタリング装置4は、DNS応答を傍受する。   FIG. 8 is a sequence diagram illustrating the flow of processing when the IP address information 431 is updated and filtering control is performed based on the DNS response of the packet filtering device 4. As shown in FIG. 8, a DNS request is first transmitted from the terminal device 3 to the DNS server 5 (S100). As a response to this DNS request, a DNS response is transmitted from the DNS server 5 to the terminal device 3 via the packet filtering device 4. That is, a DNS response is transmitted from the DNS server 5 to the packet filtering device 4 (S101), and the packet filtering device 4 transfers the DNS response to the terminal device 3 (S102). At this time, the packet filtering device 4 intercepts the DNS response.

本実施の形態では、DNS応答を傍受するにあたってDNS応答をスニッフィングする方法を用いている。しかし、これに限らず、パケットフィルタリング装置4において端末装置3とDNSサーバ5との間のDNSパケットを中継する中継プログラム(例えば、DNSサーバプログラム)を動作させ、当該中継プログラムの動作履歴を参照することによりDNS応答を傍受してもよい。ここでいうDNSパケットの中継とは、単なるトランスポート層のパケットの転送ではなく、パケットフィルタリング装置4上で稼働する中継プログラムによりDNSパケットを受付け、当該中継プログラムがそのDNSパケットへの応答を作成するために上位のDNSサーバに問い合わせることによって必要な情報を取得し、当該必要な情報に基づいてそのDNSパケットへの応答を行うような処理をいう。   In the present embodiment, a method of sniffing a DNS response is used to intercept the DNS response. However, the present invention is not limited thereto, and the packet filtering device 4 operates a relay program (for example, a DNS server program) that relays a DNS packet between the terminal device 3 and the DNS server 5 and refers to the operation history of the relay program. The DNS response may be intercepted. The DNS packet relay here is not a simple transport layer packet transfer, but a DNS program is received by a relay program operating on the packet filtering device 4, and the relay program creates a response to the DNS packet. Therefore, it refers to a process of obtaining necessary information by inquiring a higher-level DNS server and performing a response to the DNS packet based on the necessary information.

そして、パケットフィルタリング装置4は、傍受したDNS応答に基づいてIPアドレス情報431の更新処理を行う(S103)。例えば、傍受したDNS応答から抽出したホスト名(抽出ホスト名)が、条件情報430に含まれるホスト名だった場合に、そのIPアドレス(グローバルIPアドレス)をIPアドレス情報431に登録する。その後、端末装置3から外部装置7に対する通信パケットが送信されると(S104)、パケットフィルタリング装置4は、IPアドレス情報431に基づいて、その通信パケットの通過の可否を判定する(S105)。通信パケットの宛先IPアドレスがIPアドレス情報431に登録されている場合には、その通信パケットの通過を許可する。一方、通信パケットの宛先IPアドレスがIPアドレス情報431に登録されていない場合には、その通信パケットを破棄する。そして、通信許可と判定された場合には、その通信パケットが外部装置7へ送信される。   Then, the packet filtering device 4 performs the update process of the IP address information 431 based on the intercepted DNS response (S103). For example, when the host name extracted from the intercepted DNS response (extracted host name) is the host name included in the condition information 430, the IP address (global IP address) is registered in the IP address information 431. Thereafter, when a communication packet is transmitted from the terminal device 3 to the external device 7 (S104), the packet filtering device 4 determines whether or not the communication packet can pass based on the IP address information 431 (S105). When the destination IP address of the communication packet is registered in the IP address information 431, the communication packet is allowed to pass. On the other hand, when the destination IP address of the communication packet is not registered in the IP address information 431, the communication packet is discarded. If it is determined that communication is permitted, the communication packet is transmitted to the external device 7.

図9は、パケットフィルタリング装置4のSSL/TLS通信に基づいてIPアドレス情報431を更新しフィルタリング制御する時における処理の流れを説明するシーケンス図である。図9に示すように、まず、端末装置3から外部装置7に対するTLS接続要求を行うパケットが送信される(S200)。当該パケットを傍受したパケットフィルタリング装置4は、このTLS接続要求のパケットを一旦保留し、当該TLS接続要求を行った端末装置3を代理してTLS接続要求のパケットを新たに生成し、外部装置7へ送信する(S201)。そして、このTLS接続要求に対する応答として、外部装置7からパケットフィルタリング装置4に対して電子証明書が送信される(S202)。   FIG. 9 is a sequence diagram illustrating the flow of processing when the IP address information 431 is updated and filtering control is performed based on the SSL / TLS communication of the packet filtering device 4. As shown in FIG. 9, first, a packet for making a TLS connection request to the external device 7 is transmitted from the terminal device 3 (S200). Upon intercepting the packet, the packet filtering device 4 temporarily holds the TLS connection request packet, generates a new TLS connection request packet on behalf of the terminal device 3 that has made the TLS connection request, and the external device 7. (S201). Then, as a response to the TLS connection request, an electronic certificate is transmitted from the external device 7 to the packet filtering device 4 (S202).

パケットフィルタリング装置4は、外部装置7から取得した電子証明書の検証を行い(S203)、取得した電子証明書に基づいてIPアドレス情報431の更新処理を行う(S204)。例えば、取得した電子証明書から抽出したホスト名(抽出ホスト名)が条件情報430に含まれている場合には、S200におけるTLS接続要求の宛先IPアドレス(外部装置7のグローバルIPアドレス)をIPアドレス情報431に登録する。その後、S200におけるTLS接続要求の通信パケットのIPアドレスがIPアドレス情報431に登録されているか否か基づいて、その通信パケットの通過の可否を判定する(S205)。そして、通信許可と判定された場合には、S200にて一旦保留していたTLS接続要求を外部装置7へ送信し(S206)、端末装置3と外部装置7との間にTLSセッションを確立する(S207)。その後、端末装置3から外部装置7に対する通信パケットが送信されると、パケットフィルタリング装置4は、IPアドレス情報431に基づいて、その通信パケットの通過の可否を判定し、通信パケットの宛先IPアドレスがIPアドレス情報431に登録されている場合には、その通信パケットの通過を許可する。一方、通信パケットの宛先IPアドレスがIPアドレス情報431に登録されていない場合には、その通信パケットを破棄する。なお、TLS接続要求を保留せずに、端末装置3に対して「接続失敗」を通知し、再度、端末装置3にSSL/TLS接続要求を送信させてもよい。またTLS接続要求を無視し、端末装置3からの再送信を待ってもよい。   The packet filtering device 4 verifies the electronic certificate acquired from the external device 7 (S203), and updates the IP address information 431 based on the acquired electronic certificate (S204). For example, if the condition information 430 includes a host name extracted from the acquired electronic certificate (extracted host name), the destination IP address (global IP address of the external device 7) of the TLS connection request in S200 is set to IP. Register in the address information 431. Thereafter, based on whether or not the IP address of the communication packet of the TLS connection request in S200 is registered in the IP address information 431, it is determined whether or not the communication packet can pass (S205). If it is determined that communication is permitted, the TLS connection request once suspended in S200 is transmitted to the external device 7 (S206), and a TLS session is established between the terminal device 3 and the external device 7. (S207). Thereafter, when a communication packet is transmitted from the terminal device 3 to the external device 7, the packet filtering device 4 determines whether or not the communication packet can pass based on the IP address information 431, and the destination IP address of the communication packet is If registered in the IP address information 431, the communication packet is allowed to pass. On the other hand, when the destination IP address of the communication packet is not registered in the IP address information 431, the communication packet is discarded. Note that the terminal device 3 may be notified of “connection failure” without causing the TLS connection request to be suspended, and the terminal device 3 may be caused to transmit an SSL / TLS connection request again. Further, the TLS connection request may be ignored and the retransmission from the terminal device 3 may be waited.

このような本実施の形態のパケットフィルタリング装置4によれば、傍受したDNS応答や代理により取得した電子証明書から抽出したホスト名(抽出ホスト名)が、予め記憶した条件情報430を満たしているか否かに基づいて、そのホスト名の外部装置7に対して送信された通信パケットを通過させるか否かが制御される。条件情報430は、例えば、ホスト名そのもの、あるいは、FQDNや正規表現などのホスト名を識別できる情報である。したがって、管理者はフィルタリング条件(条件情報430)の内容を容易に認識することができ、管理上の負担を軽減することが可能になる。   According to the packet filtering device 4 of this embodiment, whether the host name (extracted host name) extracted from the intercepted DNS response or the electronic certificate obtained by proxy satisfies the condition information 430 stored in advance. Whether or not the communication packet transmitted to the external device 7 having the host name is allowed to pass is controlled based on whether or not it is passed. The condition information 430 is information that can identify the host name itself, or a host name such as FQDN or regular expression, for example. Therefore, the administrator can easily recognize the contents of the filtering condition (condition information 430), and the administrative burden can be reduced.

また、本実施の形態のパケットフィルタリング装置4は、傍受したDNS応答や代理により取得した電子証明書からホスト名を抽出しているため、通信パケットの宛先IPアドレスが条件情報430に合致する(満たした)ものであるか否かをDNSサーバ5に対して逆引き問い合わせを行うことなく判定することができる。   Further, since the packet filtering device 4 of the present embodiment extracts the host name from the intercepted DNS response or the electronic certificate acquired by proxy, the destination IP address of the communication packet matches the condition information 430 (satisfaction It can be determined without making a reverse inquiry to the DNS server 5.

一般に、ホスト名とIPアドレスとは必ずしも一対一の関係で対応付けられるものではなく、例えば、一つのホスト名に対して複数のIPアドレスが対応付けられたり、一つのIPアドレスに対して複数のホスト名が対応付けられたりする。そのため、DNSサーバ5に対して逆引き問合せを行って知り得たホスト名は、必ずしも端末装置3がアクセスしようとしている外部装置7のホスト名と合致するとは限らない。このような場合、条件情報430に記されたホスト名を用いてフィルタリング制御を行う際に当該ホスト名をDNSサーバに逆引き問合せを行うような装置では、本来通過させるべき通信パケットを通過させない、あるいは、逆に通過させるべきでない通信パケットを通過させてしまうという事態が生じ得る。   In general, a host name and an IP address are not necessarily associated in a one-to-one relationship. For example, a plurality of IP addresses are associated with one host name, or a plurality of IP addresses are associated with one IP address. A host name is associated. Therefore, the host name obtained by making a reverse query to the DNS server 5 does not necessarily match the host name of the external device 7 that the terminal device 3 is trying to access. In such a case, when performing filtering control using the host name described in the condition information 430, a device that makes a reverse lookup query to the DNS server for the host name does not pass a communication packet that should be allowed to pass through. Alternatively, a situation may occur in which a communication packet that should not be passed is passed.

これに対して、本実施の形態のパケットフィルタリング装置4では、IPアドレス情報431に基づいて通信パケットの通過可否が制御される。そして、このIPアドレス情報431は、端末装置3が事前にDNSサーバ5との間で送受したDNS応答を傍受することで抽出したホスト名(抽出ホスト名)と条件情報430との比較により更新された情報である。したがって、端末装置3がアクセスしようとしている外部装置7のIPアドレスとホスト名とを正確に対応付けることができ、通信パケットの通過可否の判断を適切に行うことができる。   On the other hand, in the packet filtering device 4 of the present embodiment, whether or not a communication packet can pass is controlled based on the IP address information 431. This IP address information 431 is updated by comparing the host name (extracted host name) extracted by intercepting the DNS response sent and received by the terminal device 3 with the DNS server 5 in advance and the condition information 430. Information. Therefore, the IP address of the external device 7 that the terminal device 3 is trying to access can be accurately associated with the host name, and it is possible to appropriately determine whether or not the communication packet can pass.

また、本実施の形態のパケットフィルタリング装置4では、電子証明書から求めた抽出ホスト名と条件情報430との比較によりIPアドレス情報431を更新している。そのため、DNSサーバに対して名前解決の問合せを行わない端末装置3からのアクセス(例えば、外部装置7のグローバルIPアドレスを直接入力することによるアクセス)であったとしても、IPアドレス情報431を更新することができる。また、外部装置7のより信頼性の高いホスト名を把握することができ、例えば、DNSポイゾニングなどといったDNSサーバに対する攻撃の悪影響を低減することができる。   In the packet filtering device 4 of the present embodiment, the IP address information 431 is updated by comparing the extracted host name obtained from the electronic certificate with the condition information 430. Therefore, even if the access is from the terminal device 3 that does not make a name resolution query to the DNS server (for example, access by directly inputting the global IP address of the external device 7), the IP address information 431 is updated. can do. Further, the host name with higher reliability of the external device 7 can be grasped, and for example, the adverse effect of the attack on the DNS server such as DNS poisoning can be reduced.

また、本実施の形態では、信頼できる外部装置7であるとして通信が許可された外部装置7のホスト名のホスト名を識別できる条件が条件情報430に含まれており、抽出ホスト名が条件情報430を満たしていると、IPアドレス情報431が更新される。そして、このIPアドレス情報431に基づいて、通信パケットの通過許可が制御される。これにより、信頼できる外部装置7への通信パケットのみを適切に通過させることができる。   In the present embodiment, the condition information 430 includes a condition for identifying the host name of the host name of the external apparatus 7 that is permitted to communicate as being the reliable external apparatus 7, and the extracted host name is the condition information. If 430 is satisfied, the IP address information 431 is updated. Based on this IP address information 431, permission to pass communication packets is controlled. Thereby, only the communication packet to the reliable external apparatus 7 can be appropriately passed.

また、本実施の形態では、信頼できない外部装置7(例えば悪意ある処理を行う外部装置7)であるとして、管理者などによって禁止条件情報432が設定された場合、傍受したDNS応答から抽出したホスト名が禁止条件情報432の条件を満たしていると、そのDNS応答に基づいてIPアドレス情報431から削除される。そして、このIPアドレス情報431に基づいて通信パケットの通過可否が制御される。これにより、たとえ過去に信頼できる外部装置7としてそのホスト名が条件情報430に登録され、そしてIPアドレス情報431に当該外部装置7のIPアドレスが登録されていたとしても、禁止条件情報432に基づいてIPアドレス情報431を適切に更新できる。したがって、信頼できない外部装置7への通信パケットの通過を適切に禁止することができる。   Further, in this embodiment, when the prohibition condition information 432 is set by the administrator or the like as an unreliable external device 7 (for example, an external device 7 that performs malicious processing), the host extracted from the intercepted DNS response If the name satisfies the condition of the prohibition condition information 432, the name is deleted from the IP address information 431 based on the DNS response. Based on the IP address information 431, whether or not the communication packet can pass is controlled. As a result, even if the host name is registered in the condition information 430 as the external device 7 that can be trusted in the past, and the IP address of the external device 7 is registered in the IP address information 431, it is based on the prohibition condition information 432. Thus, the IP address information 431 can be updated appropriately. Therefore, the passage of communication packets to the unreliable external device 7 can be appropriately prohibited.

また、本実施の形態では、外部装置7から取得した電子証明書の検証結果が適切である場合(例えば、電子証明書の秘密鍵を外部装置7が所持している場合、証明書検証できる場合、電子証明書がEVSSL証明書などの信頼できる証明書である場合など)に、接続パケットの宛先IPアドレスに基づいてIPアドレス情報431を更新する。したがって、外部装置7のより信頼性の高いホスト名を把握することができる。   In the present embodiment, when the verification result of the electronic certificate acquired from the external device 7 is appropriate (for example, when the external device 7 has the private key of the electronic certificate, the certificate can be verified) The IP address information 431 is updated based on the destination IP address of the connection packet in the case where the electronic certificate is a trusted certificate such as an EVSSL certificate. Therefore, a more reliable host name of the external device 7 can be grasped.

以上、本発明の実施の形態を例示により説明したが、本発明の範囲はこれらに限定されるものではなく、請求項に記載された範囲内において目的に応じて変更・変形することが可能である。   The embodiments of the present invention have been described above by way of example, but the scope of the present invention is not limited to these embodiments, and can be changed or modified according to the purpose within the scope of the claims. is there.

上記実施の形態では、記憶部43は、IPアドレス情報431と条件情報430とを別個のテーブルで記憶している。しかし、これに限らず、図4に示すように、記憶部43は、IPアドレス情報431と条件情報430とを対応付けて記憶してもよい。図4の例では、ホストAとグローバルIPアドレスAが対応付けられており、ホストBとグローバルIPアドレスBが対応付けられており、ホストCとグローバルIPアドレスCが対応付けられている。なお、条件情報430とIPアドレス情報431とに共通するID情報を付与し、ID情報を介して条件情報430とIPアドレス情報431を対応付けてもよい。また、一つのホスト名(条件)に対して複数のIPアドレスを対応付けることもできる。   In the above embodiment, the storage unit 43 stores the IP address information 431 and the condition information 430 in separate tables. However, the present invention is not limited to this, and the storage unit 43 may store the IP address information 431 and the condition information 430 in association with each other as shown in FIG. In the example of FIG. 4, host A and global IP address A are associated, host B and global IP address B are associated, and host C and global IP address C are associated. Note that common ID information may be given to the condition information 430 and the IP address information 431, and the condition information 430 and the IP address information 431 may be associated with each other via the ID information. A plurality of IP addresses can be associated with one host name (condition).

この場合、IPアドレス更新部441は、IPアドレス情報更新処理において、抽出ホスト名が条件情報430の条件を満たしていれば(S20でYes)、当該抽出ホスト名に対応付けられているIPアドレス情報431のIPアドレスを更新する。例えば、抽出ホスト名「ホストA」が条件情報430に含まれており(S20でYes)、その「ホストA」とIPアドレス情報431の「グローバルIPアドレスX」が既に対応付けられている場合には、S22において抽出IPアドレス「グローバルIPアドレスA」を用いて「グローバルIPアドレスX」を更新する。   In this case, if the extracted host name satisfies the condition of the condition information 430 in the IP address information update process (Yes in S20), the IP address update unit 441 associates the IP address information associated with the extracted host name. The IP address of 431 is updated. For example, when the extracted host name “host A” is included in the condition information 430 (Yes in S20), the “host A” and the “global IP address X” of the IP address information 431 are already associated with each other. Updates the “global IP address X” using the extracted IP address “global IP address A” in S22.

これにより、外部装置7のホスト名とIPアドレスとの対応付けがダイナミックDNSなどによって動的に変更されるような場合であっても、変更された対応付け(最新の対応付け)に基づいてIPアドレス情報431も更新されるため、最新の対応付けに基づいてパケットの通過可否の判定を行うことができる。したがって、外部装置7のホスト名と対応づいた古いIPアドレスに基づいて誤ってパケットを通過(あるいは非通過)させるのを適切に防ぐことができる。   As a result, even if the association between the host name and the IP address of the external device 7 is dynamically changed by dynamic DNS or the like, the IP is based on the changed association (latest association). Since the address information 431 is also updated, it is possible to determine whether or not a packet can pass based on the latest association. Therefore, it is possible to appropriately prevent the packet from being erroneously passed (or not passed) based on the old IP address associated with the host name of the external device 7.

上記実施の形態では、記憶部43は、端末装置3のIPアドレスである端末IPアドレス(ローカルIPアドレス)と、IPアドレス情報431とを対応付けることなく記憶している。しかし、これに限らず、図5に示すように、記憶部43は、端末装置3の端末IPアドレスとIPアドレス情報431とを対応付けて記憶してもよい。図5の例では、ローカルIPアドレスAとグローバルIPアドレスA及びグローバルIPアドレスBが対応付けられており、ローカルIPアドレスBとグローバルIPアドレスCが対応付けられている。   In the above embodiment, the storage unit 43 stores the terminal IP address (local IP address), which is the IP address of the terminal device 3, and the IP address information 431 without associating them. However, not limited to this, as illustrated in FIG. 5, the storage unit 43 may store the terminal IP address of the terminal device 3 and the IP address information 431 in association with each other. In the example of FIG. 5, the local IP address A, the global IP address A, and the global IP address B are associated with each other, and the local IP address B and the global IP address C are associated with each other.

この場合、IPアドレス更新部441は、抽出ホスト名が条件情報430の条件を満たしていれば(S20でYes)、S22において、DNS応答の送信先の端末装置7のIPアドレス(又はTLS接続要求を行った端末装置7のIPアドレス)と等しい端末IPアドレスに対応付けられているIPアドレス情報431を更新する。例えば、抽出ホスト名「ホストA」が条件情報430に含まれており(S20でYes)、DNS応答の送信先の端末装置7のIPアドレスと等しい端末IPアドレス「ローカルIPアドレスA」とIPアドレス「グローバルIPアドレスA」が既に対応付けられている場合には、その「ローカルIPアドレスA」に対応するよう新たな抽出IPアドレス「グローバルIPアドレスX」がIPアドレス情報431に追加される。   In this case, if the extracted host name satisfies the condition of the condition information 430 (Yes in S20), the IP address updating unit 441, in S22, the IP address (or TLS connection request) of the terminal device 7 that is the DNS response transmission destination. The IP address information 431 associated with the terminal IP address equal to the IP address of the terminal device 7 that performed the update is updated. For example, the extracted host name “host A” is included in the condition information 430 (Yes in S20), and the terminal IP address “local IP address A” and the IP address equal to the IP address of the terminal device 7 to which the DNS response is transmitted If “global IP address A” is already associated, a new extracted IP address “global IP address X” is added to the IP address information 431 so as to correspond to the “local IP address A”.

これにより、パケットフィルタリング装置4は、DNSサーバ5との間で送受したDNS応答を傍受して、傍受したDNS応答に基づいて、端末装置3ごとにIPアドレス情報431を更新する。したがって、外部装置7のホスト名とIPアドレスとの対応付けを、端末装置3ごとに管理することができ、端末装置3がDNS応答から得たIPアドレスとホスト名との対応付けを正確に管理することができる。したがって、端末装置から外部装置へのアクセスがDNS応答に基づいたアクセスなのか否かを判断することができる。すなわち、端末装置3が、その端末装置3の端末IPアドレスに対応付けられているIPアドレス情報431以外の外部装置7に通信パケットを送った場合に、その通信パケットが、DNSサーバ5との問合せを行わずに(例えば、端末装置3側でIPアドレスを直接入力して)送信したパケットであることを把握することができる。   Thereby, the packet filtering apparatus 4 intercepts the DNS response transmitted / received with the DNS server 5, and updates the IP address information 431 for every terminal device 3 based on the intercepted DNS response. Therefore, the association between the host name and the IP address of the external device 7 can be managed for each terminal device 3, and the association between the IP address and the host name obtained from the DNS response by the terminal device 3 is accurately managed. can do. Therefore, it can be determined whether or not the access from the terminal device to the external device is based on the DNS response. That is, when the terminal device 3 sends a communication packet to the external device 7 other than the IP address information 431 associated with the terminal IP address of the terminal device 3, the communication packet is inquired with the DNS server 5. (For example, the IP address is directly input on the terminal device 3 side) and the packet is transmitted.

なお、通信制御部442は、端末装置3から送信された通信パケットの宛先IPアドレスが、その通信パケットの送信元のIPアドレスと一致する端末IPアドレスに対応付けられているIPアドレス情報431に含まれるか否かに基づいて、その通信パケットの通過を制御してもよい。   The communication control unit 442 includes the destination IP address of the communication packet transmitted from the terminal device 3 in the IP address information 431 associated with the terminal IP address that matches the IP address of the transmission source of the communication packet. The passage of the communication packet may be controlled based on whether or not it is transmitted.

上記実施の形態では、通信制御部442は、端末装置3から外部装置7への通信パケットの宛先IPアドレス(すなわち外部装置7のグローバルIPアドレス)がIPアドレス情報431に含まれているか否かに基づいて当該通信パケットの通過可否を判定している。しかし、これに限らず、外部装置7から端末装置3に送信される通信パケットの送信元IPアドレスがIPアドレス情報431に含まれているか否かに基づいて当該通信パケットの通過可否を判定してもよい。例えば、端末装置3から外部装置7に送信されるSYNパケットに対する返信として外部装置7から端末装置3に送信されるSYN/ACKパケットの送信元IPアドレスがIPアドレス情報431に含まれているとき、当該SYN/ACKパケットを通過不可として破棄してもよい。また端末装置3においてDNSの名前解決がなされていない外部装置より直接UDPパケットが端末装置3に向けて送信されえた場合も当該パケットの送信元IPアドレスが、IPアドレス情報431に含まれていないため破棄するようにしてもよい。   In the above embodiment, the communication control unit 442 determines whether the IP address information 431 includes the destination IP address of the communication packet from the terminal device 3 to the external device 7 (that is, the global IP address of the external device 7). Based on this, it is determined whether or not the communication packet can pass. However, the present invention is not limited to this. Based on whether or not the IP address information 431 includes the transmission source IP address of the communication packet transmitted from the external device 7 to the terminal device 3, it is determined whether or not the communication packet can pass. Also good. For example, when the source IP address of the SYN / ACK packet transmitted from the external device 7 to the terminal device 3 as a reply to the SYN packet transmitted from the terminal device 3 to the external device 7 is included in the IP address information 431, The SYN / ACK packet may be discarded as non-passable. Further, even when a UDP packet can be transmitted directly to the terminal device 3 from an external device in which DNS name resolution has not been performed in the terminal device 3, the source IP address of the packet is not included in the IP address information 431. You may make it discard.

以上のように、本発明にかかるパケットフィルタリング装置は、フィルタリング条件を容易に管理することができ、管理上の負担を軽減することができるという効果を有し、ネットワークに接続されたコンピュータ相互間におけるパケット通信を制限するファイアウォール等として有用である。   As described above, the packet filtering apparatus according to the present invention can easily manage filtering conditions and reduce the burden on management, and can be used between computers connected to a network. This is useful as a firewall that restricts packet communication.

1 ネットワークシステム
2 内部ネットワーク
3 端末装置
4 パケットフィルタリング装置
5 DNSサーバ
6 外部ネットワーク
7 外部装置
40 通信部
41 入力部
42 出力部
43 記憶部
44 制御部
430 条件情報
431 IPアドレス情報
432 禁止条件情報
433 禁止IPアドレス情報
440 DNS応答傍受部
441 IPアドレス更新部
442 通信制御部
443 接続パケット判定部
444 接続要求送信部
445 証明書情報取得部
DESCRIPTION OF SYMBOLS 1 Network system 2 Internal network 3 Terminal apparatus 4 Packet filtering apparatus 5 DNS server 6 External network 7 External apparatus 40 Communication part 41 Input part 42 Output part 43 Memory | storage part 44 Control part 430 Condition information 431 IP address information 432 Prohibited condition information 433 Prohibited IP address information 440 DNS response interception unit 441 IP address update unit 442 communication control unit 443 connection packet determination unit 444 connection request transmission unit 445 certificate information acquisition unit

Claims (6)

内部ネットワークに接続された端末装置と外部ネットワークに接続された外部装置との間における通信パケットの通過可否を制御するパケットフィルタリング装置であって、
前記制御の対象となる外部装置のホスト名を識別できる条件を含む条件情報と、当該外部装置のIPアドレスを含むIPアドレス情報とを記憶する記憶部と、
前記端末装置から前記外部装置へ送信された通信パケットが、電子証明書を利用したセキュア通信プロトコルによる接続パケットであるか否かを判定する接続パケット判定部と、
前記接続パケットであると判定された場合に、前記外部装置に対して、前記端末装置を代理して前記セキュア通信プロトコルによる接続要求を送信する接続要求送信部と、
前記接続要求に対する応答として前記外部装置から電子証明書を取得する電子証明書取得部と、
取得した前記電子証明書から抽出したホスト名が前記条件情報の条件を満たしている場合に、前記接続パケットの宛先IPアドレスを用いて前記IPアドレス情報を更新するIPアドレス更新部と、
前記端末装置と前記外部装置との間で送受される通信パケットのIPアドレスが前記IPアドレス情報に含まれるか否かに基づいて、当該通信パケットの通過可否を制御する通信制御部と、
を備えることを特徴とするパケットフィルタリング装置。
A packet filtering device that controls whether or not a communication packet can pass between a terminal device connected to an internal network and an external device connected to an external network,
A storage unit for storing condition information including a condition for identifying a host name of the external device to be controlled, and IP address information including an IP address of the external device;
A connection packet determination unit that determines whether a communication packet transmitted from the terminal device to the external device is a connection packet based on a secure communication protocol using an electronic certificate;
A connection request transmission unit that transmits a connection request based on the secure communication protocol on behalf of the terminal device to the external device when it is determined that the packet is the connection packet;
An electronic certificate acquisition unit that acquires an electronic certificate from the external device as a response to the connection request;
An IP address update unit that updates the IP address information using a destination IP address of the connection packet when a host name extracted from the acquired electronic certificate satisfies the condition information condition;
A communication control unit that controls whether or not the communication packet can pass based on whether or not an IP address of a communication packet transmitted and received between the terminal device and the external device is included in the IP address information;
A packet filtering device comprising:
前記条件情報は、前記端末装置との通信が許可された前記外部装置のホスト名を識別できる条件を含み、
前記IPアドレス更新部は、取得した前記電子証明書から抽出したホスト名が前記条件情報の条件を満たしている場合に、前記接続パケットの宛先IPアドレスを前記IPアドレス情報に追加するよう更新し、
前記通信制御部は、前記端末装置と前記外部装置との間で送受される通信パケットのIPアドレスが前記IPアドレス情報に含まれる場合に、当該通信パケットの通過を許可する、請求項1に記載のパケットフィルタリング装置。
The condition information includes a condition capable of identifying a host name of the external device permitted to communicate with the terminal device,
The IP address update unit updates the destination IP address of the connection packet to be added to the IP address information when the host name extracted from the acquired electronic certificate satisfies the condition of the condition information;
2. The communication control unit according to claim 1, wherein when the IP address information includes an IP address of a communication packet transmitted and received between the terminal device and the external device, the communication control unit permits the communication packet to pass. Packet filtering device.
前記記憶部は、前記端末装置との通信が禁止された前記外部装置のホスト名を識別できる条件を含む禁止条件情報を更に記憶し、
前記IPアドレス更新部は、取得した前記電子証明書から抽出したホスト名が前記禁止条件情報の条件を満たしている場合に、前記接続パケットの宛先IPアドレスを前記IPアドレス情報から削除する、請求項2に記載のパケットフィルタリング装置。
The storage unit further stores prohibition condition information including a condition for identifying a host name of the external device for which communication with the terminal device is prohibited,
The IP address update unit deletes the destination IP address of the connection packet from the IP address information when a host name extracted from the acquired electronic certificate satisfies the condition of the prohibition condition information. 3. The packet filtering device according to 2.
前記記憶部は、前記IPアドレス情報と前記条件情報とを対応付けて記憶し、
前記IPアドレス更新部は、取得した前記電子証明書から抽出したホスト名が前記条件情報の条件を満たしている場合に、当該ホスト名に対応付けられている前記IPアドレス情報の宛先IPアドレスを更新する、請求項1〜請求項3のいずれかに記載のパケットフィルタリング装置。
The storage unit stores the IP address information and the condition information in association with each other,
The IP address update unit updates the destination IP address of the IP address information associated with the host name when the host name extracted from the acquired electronic certificate satisfies the condition information condition The packet filtering device according to any one of claims 1 to 3.
前記記憶部は、前記端末装置のIPアドレスである端末IPアドレスと前記IPアドレス情報とを対応付けて記憶し、
前記IPアドレス更新部は、取得した前記電子証明書から抽出したホスト名が前記条件情報の条件を満たしている場合に、前記接続パケットの送信元のIPアドレスと等しい前記端末IPアドレスに対応付けられている前記IPアドレス情報を更新する、請求項1〜請求項4のいずれかに記載のパケットフィルタリング装置。
The storage unit stores a terminal IP address, which is an IP address of the terminal device, and the IP address information in association with each other,
The IP address update unit is associated with the terminal IP address equal to the source IP address of the connection packet when the host name extracted from the acquired electronic certificate satisfies the condition information condition. The packet filtering apparatus according to claim 1, wherein the IP address information is updated.
前記IPアドレス更新部は、前記電子証明書の検証結果に基づいて前記IPアドレス情報を更新する、請求項1〜請求項5のいずれかに記載のパケットフィルタリング装置。   The packet filtering device according to claim 1, wherein the IP address update unit updates the IP address information based on a verification result of the electronic certificate.
JP2016015168A 2016-01-29 2016-01-29 Packet filtering device Active JP6382244B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016015168A JP6382244B2 (en) 2016-01-29 2016-01-29 Packet filtering device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016015168A JP6382244B2 (en) 2016-01-29 2016-01-29 Packet filtering device

Publications (2)

Publication Number Publication Date
JP2017135622A JP2017135622A (en) 2017-08-03
JP6382244B2 true JP6382244B2 (en) 2018-08-29

Family

ID=59502925

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016015168A Active JP6382244B2 (en) 2016-01-29 2016-01-29 Packet filtering device

Country Status (1)

Country Link
JP (1) JP6382244B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7130361B2 (en) * 2017-09-22 2022-09-05 東芝テック株式会社 Control device and control method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002261788A (en) * 2001-02-27 2002-09-13 Mitsubishi Electric Corp Firewall managing apparatus and method
US7623518B2 (en) * 2004-04-08 2009-11-24 Hewlett-Packard Development Company, L.P. Dynamic access control lists
JP2007116509A (en) * 2005-10-21 2007-05-10 Nec Corp Communication terminal, program, communication system, and method for outputting security information
JP2013090089A (en) * 2011-10-17 2013-05-13 Canon Inc Information processing device, information processing method and program
KR101564644B1 (en) * 2014-07-03 2015-10-30 한국전자통신연구원 Method and system of extracting access control list

Also Published As

Publication number Publication date
JP2017135622A (en) 2017-08-03

Similar Documents

Publication Publication Date Title
US11811808B2 (en) Rule-based network-threat detection for encrypted communications
US8984620B2 (en) Identity and policy-based network security and management system and method
US20220045992A1 (en) Concealing internal applications that are accessed over a network
US9723023B2 (en) Destination address rewriting to block peer-to-peer communications
WO2012077603A1 (en) Computer system, controller, and network monitoring method
US10491561B2 (en) Equipment for offering domain-name resolution services
Gangan A review of man-in-the-middle attacks
EP3639498B1 (en) Certificate pinning in highly secure network environments using public key certificates obtained from a dhcp (dynamic host configuration protocol) server
US20180205573A1 (en) Network packet redirection device and method thereof
JP6737610B2 (en) Communication device
JP2020017809A (en) Communication apparatus and communication system
WO2015174100A1 (en) Packet transfer device, packet transfer system, and packet transfer method
CN103747005B (en) The means of defence and equipment that DNS cache is poisoned
JP6763605B2 (en) Data communication system, cache DNS device and communication attack prevention method
JP6382244B2 (en) Packet filtering device
KR100856918B1 (en) Method for IP address authentication in IPv6 network, and IPv6 network system
JP6472762B2 (en) Packet filtering device
JP6896264B2 (en) Communication equipment, communication methods, and programs
JP5267893B2 (en) Network monitoring system, network monitoring method, and network monitoring program
US10425416B2 (en) Method of unblocking external computer systems in a computer network infrastructure, distributed computer network having such a computer network infrastructure as well as computer program product
CN108696506B (en) Method, medium, and system for establishing connection between client and terminal device
CN117040817A (en) Authentication method and device
Rafiee et al. Challenges and Solutions for DNS Security in IPv6
KR20210106185A (en) Internet of Things Communication System with Packet Safety Verification
Wang The design and implementation of a social accountability framework

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170912

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180627

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180703

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180801

R150 Certificate of patent or registration of utility model

Ref document number: 6382244

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250