JP4518070B2 - Packet filter verification packet generation method, verification packet generation device, verification packet generation program, packet filter test method, packet filter test device - Google Patents

Packet filter verification packet generation method, verification packet generation device, verification packet generation program, packet filter test method, packet filter test device Download PDF

Info

Publication number
JP4518070B2
JP4518070B2 JP2006315710A JP2006315710A JP4518070B2 JP 4518070 B2 JP4518070 B2 JP 4518070B2 JP 2006315710 A JP2006315710 A JP 2006315710A JP 2006315710 A JP2006315710 A JP 2006315710A JP 4518070 B2 JP4518070 B2 JP 4518070B2
Authority
JP
Japan
Prior art keywords
packet
rules
verification
filter
attributes
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
JP2006315710A
Other languages
Japanese (ja)
Other versions
JP2008131463A (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.)
Yamaha Corp
Original Assignee
Yamaha Corp
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 Yamaha Corp filed Critical Yamaha Corp
Priority to JP2006315710A priority Critical patent/JP4518070B2/en
Publication of JP2008131463A publication Critical patent/JP2008131463A/en
Application granted granted Critical
Publication of JP4518070B2 publication Critical patent/JP4518070B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

この発明は、ルータ等のネットワーク機器に設定されるパケットフィルタの設定を検証するための検証パケット発生方法、検証パケット発生装置、検証パケット発生プログラム、パケットフィルタのテスト方法、パケットフィルタのテスト装置に関し、パケットフィルタの設定の検証を網羅的にかつ効率よく行えるようにしたものである。 The present invention, verifying packet generation method for verifying the set of packet filters to be set in a network device such as a router, verifying packet generator, verifying packet generation program, test methods packet filter relates tester packet filter The packet filter settings can be verified comprehensively and efficiently.

パケットフィルタはルータ等のネットワーク機器に設定されて、該ネットワーク機器に入力されるパケットのヘッダ情報をチェックして、該パケットを通過または破棄する処理を行うものである。パケットフィルタは一般に該ネットワーク機器のWAN側でフィルタ処理を行うフィルタルール(WAN側フィルタ)とLAN側でフィルタ処理を行うフィルタルール(LAN側フィルタ)が設定されている。また、WAN側フィルタおよびLAN側フィルタにはWAN側からLAN側に向けて送信されるパケットに対するフィルタルールと、LAN側からWAN側に向けて送信されるパケットに対するフィルタルールがそれぞれ設定されている。パケットフィルタは多くの場合ヘッダ情報に含まれている次の内容(パケットの属性)をチェックする。以下これらのチェック項目を「判定条件」という。
・始点(送信元)IPアドレス(source address)
・始点(送信元)ポート番号(source port)
・プロトコル(protocol)
・終点(受信先)IPアドレス(destination address)
・終点(受信先)ポート番号(destination port)
The packet filter is set in a network device such as a router, checks the header information of a packet input to the network device, and performs a process of passing or discarding the packet. In general, a filter rule for performing filter processing on the WAN side of the network device (WAN side filter) and a filter rule for performing filter processing on the LAN side (LAN side filter) are set for the packet filter. In addition, a filter rule for a packet transmitted from the WAN side to the LAN side and a filter rule for a packet transmitted from the LAN side to the WAN side are set in the WAN side filter and the LAN side filter, respectively. In many cases, the packet filter checks the following contents (packet attributes) included in the header information. Hereinafter, these check items are referred to as “judgment conditions”.
-Start point (source) IP address (source address)
-Start (source) port number (source port)
・ Protocol
-Destination (destination) IP address (destination address)
-Destination (recipient) port number (destination port)

典型的なパケットフィルタの設定は、複数のルールを順番に並べたものである。ここで「ルール」とは「判定条件」と「動作」の組み合わせである。「判定条件」については、1つのルールで複数の値を指定できるのが普通である。例えば始点ポート番号としては「1024〜65535」のように数値範囲(あるいは数値の列挙)で指定できる。この数値範囲の指定例では始点ポート番号が1024であっても1025であってもこの判定条件に一致する(つまり1024〜65535の範囲に属している)ことになる。「動作」は「通過(pass)」または「破棄(reject)」である。   A typical packet filter setting consists of a plurality of rules arranged in order. Here, the “rule” is a combination of “judgment condition” and “operation”. As for the “judgment condition”, it is normal that a plurality of values can be designated by one rule. For example, the start port number can be specified in a numerical value range (or numerical value enumeration) such as “1024 to 65535”. In this numerical range specification example, this determination condition is met (that is, it belongs to the range of 1024 to 65535) regardless of whether the starting point port number is 1024 or 1025. “Operation” is “pass” or “reject”.

パケットフィルタ処理は多くの場合パケットを受信するたびに図2に示す処理を実行する。すなわち1つのパケットを受信すると(S0)、該パケットに付されているヘッダ情報に含まれている属性情報と最初のルール1の判定条件とが比較され、該パケットがこの判定条件に一致するかどうかが判定される(S1)。判定の結果一致していれば、このルール1で設定された動作に従い該パケットは通過または破棄され(S1a)、そこで処理を終了する。一致しない場合は、次のルール2に進み、同様に判定および処理(S2,S3)が実行される。そして最後のルールnまで進んで同様に判定および処理(Sn,Sna)が実行された結果、ルール1〜nのいずれにも一致しなかった場合は、該パケットはデフォルトルールに従って通過または破棄されて、処理を終了する(Sn+1)。このようにして、各受信パケットについて判定条件に一致するまで(一致しない場合は最後のルールnまで)、各ルール1〜nについて順番に判定される。   In many cases, the packet filter process executes the process shown in FIG. 2 every time a packet is received. That is, when one packet is received (S0), the attribute information included in the header information attached to the packet is compared with the determination condition of the first rule 1, and whether the packet matches the determination condition. It is determined whether or not (S1). If they match, the packet is passed or discarded according to the operation set in rule 1 (S1a), and the process is terminated there. If they do not match, the process proceeds to the next rule 2, and determination and processing (S2, S3) are executed in the same manner. If the result of the determination and processing (Sn, Sna) is the same as that of the last rule n, and the result does not match any of the rules 1 to n, the packet is passed or discarded according to the default rule. The process is terminated (Sn + 1). In this manner, the rules 1 to n are sequentially determined until the determination condition is satisfied for each received packet (until the last rule n if not).

パケットフィルタには使用者により数多くのルールが設定される場合があり、ルールの順番を間違えて設定したり、矛盾する(相容れない)複数のルールを設定したりすることによる設定ミスが発生しやすい。そこで、パケットフィルタにルールを設定した後、該パケットフィルタが使用者の意図したとおりに設定されているかどうかを検証する必要がある。   Many rules may be set by the user in the packet filter, and setting mistakes are likely to occur by setting the rules in the wrong order or by setting a plurality of contradictory (incompatible) rules. Therefore, after setting a rule in the packet filter, it is necessary to verify whether the packet filter is set as intended by the user.

パケットフィルタが使用者の意図したとおりに設定されているかどうかを検証するために、従来よりダミーのパケット(検証パケット)を発生させパケットフィルタに入力して、該パケットフィルタの挙動を調べることが行われている。そして、この検証のためにポートスキャンという技術が用いられている。ポートスキャンは、例えばWAN側からLAN側へ送り込まれるパケットに対するWAN側フィルタのフィルタルールについて設定を検証する場合、プロトコル(TCP、UDP等)、始点IPアドレス(相手側のグローバルIPアドレス)、始点ポート番号(相手側のポート番号)、終点IPアドレス(自分側のグローバルIPアドレス)をそれぞれ固定設定しかつ終点ポート番号(自分側のポート番号)を例えば0〜65535の全範囲で変化させた検証パケットを順次発生させてパケットフィルタに入力し、パケットが通過する終点ポート番号を洗い出すことにより行われる。使用者は、この洗い出された終点ポート番号から、自己のネットワーク機器に設定されているパケットフィルタの、WAN側からLAN側へ送り込まれるパケットに対するWAN側フィルタのフィルタルールが自分の意図したとおりに設定されているかどうかを検証することができる。なお、ポートスキャンを利用してパケットフィルタの設定を検証することを記載した文献として下記非特許文献1がある。
「サーバ管理者のためのポート番号早引き・活用辞典」持丸浩二郎著、日本実業出版社、2003年6月1日発行、P.61〜64
In order to verify whether the packet filter is set as intended by the user, a dummy packet (verification packet) is conventionally generated and input to the packet filter to examine the behavior of the packet filter. It has been broken. For this verification, a technology called port scan is used. In the port scan, for example, when verifying the setting of the filter rule of the WAN side filter for the packet sent from the WAN side to the LAN side, the protocol (TCP, UDP, etc.), the start point IP address (the other party's global IP address), the start point port Number (partner port number) and end point IP address (own side global IP address) are fixedly set, and the end point port number (own side port number) is changed in the entire range of 0 to 65535, for example. Are sequentially input to the packet filter, and the destination port number through which the packet passes is identified. The user determines that the filter rule of the WAN side filter for the packet sent from the WAN side to the LAN side of the packet filter set in his network device is as his / her intended from the end port number thus identified. It can be verified whether it is set. The following Non-Patent Document 1 is a document that describes verifying packet filter settings using port scanning.
"Port number quick lookup and utilization dictionary for server administrators" by Kojiro Mochimaru, Nihon Jitsugyo Publishing Co., Ltd., issued on June 1, 2003, P.I. 61-64

WAN側からLAN側へ送り込まれるパケットに対するWAN側フィルタのフィルタルールの設定を検証するためのポートスキャンは、一般的には前述のようにプロトコル、始点IPアドレス、始点ポート番号、終点IPアドレスをそれぞれ固定設定しかつ終点ポート番号を所定範囲(例えば0〜65535)で変化させた検証パケットを順次発生させることにより行われる。ところが、始点IPアドレスと始点ポート番号の組み合わせは様々であり、この組み合わせによってはポートスキャンの結果が異なる可能性がある。例えば或る端末(1つの始点IPアドレスと始点ポート番号の組み合わせ)から送信されたパケットは或る終点IPアドレスの或る終点ポート番号で破棄されても、他の端末(他の1つの始点IPアドレスと始点ポート番号の組み合わせ)から送信されたパケット(始点IPアドレスおよび始点ポート番号以外の属性は先と同じパケット)は同終点IPアドレスの同終点ポート番号を通過する可能性がある。このようなケースでは、特定の始点IPアドレスと始点ポート番号の組み合わせについてポートスキャンしただけでは、WAN側からLAN側へ送り込まれるパケットに対するWAN側フィルタのフィルタルールの設定を網羅的に検証したことにはならない。一方、始点IPアドレスおよび始点ポート番号の組み合わせとして取り得る範囲をすべて検証するには、248通り(始点IPアドレス232通り×始点ポート番号216通り)の組み合わせを調べなければならず、ポートスキャンに膨大な時間がかかり現実的ではない。 In general, the port scan for verifying the setting of the filter rule of the WAN side filter for the packet sent from the WAN side to the LAN side includes the protocol, the start point IP address, the start point port number, and the end point IP address as described above. This is performed by sequentially generating verification packets that are fixedly set and whose end point port number is changed within a predetermined range (for example, 0 to 65535). However, there are various combinations of the start point IP address and the start point port number, and the port scan result may differ depending on the combination. For example, even if a packet transmitted from a certain terminal (combination of one starting point IP address and a starting point port number) is discarded at a certain destination port number of a certain destination IP address, another terminal (other one starting point IP) A packet transmitted from a combination of an address and a start port number (attributes other than the start point IP address and start point port number are the same as the previous packet) may pass through the same end point port number of the same end point IP address. In such a case, only by performing a port scan for a specific combination of the start IP address and the start port number, the setting of the filter rule of the WAN side filter for the packet sent from the WAN side to the LAN side is comprehensively verified. Must not. On the other hand, in order to verify all the possible range as a combination of source IP address and source port number must be examined a combination of two 48 ways (source IP address 2 32 patterns × source port number 2 16 combinations), the port Scanning takes a lot of time and is not realistic.

この発明は上述の点に鑑みてなされたもので、判定条件の組み合わせとして取り得る範囲のすべてを検証しなくてもパケットフィルタの設定を網羅的に検証できるようにして、パケットフィルタの設定の検証を網羅的にかつ効率よく行えるようにした検証パケット発生方法、検証パケット発生装置、検証パケット発生プログラム、パケットフィルタのテスト方法、パケットフィルタのテスト装置を提供しようとするものである。 The present invention has been made in view of the above-described points. The packet filter settings can be comprehensively verified without verifying all the possible ranges of combinations of determination conditions, and the packet filter settings can be verified. verifying packets generated methods to allow comprehensively and efficiently, verifying packet generator, verifying packet generation program, test methods packet filters, it is intended to provide a test device of the packet filter.

この発明の検証パケット発生方法は、パケットの属性に関する複数の判定条件とパケットの属性が該複数の判定条件に適合したときの該パケットの通過または破棄の動作を規定した複数のルールを設定したパケットフィルタについて、適宜の複数のルール(例えばパケットフィルタに設定される全ルールのうち同一方向へ通信されるパケットに適用されかつ判定条件に含まれる少なくとも1つの属性がルール相互間で共通に設定されている全ルール)の設定を検証するための検証パケットを発生する方法であって、パケットの適宜の複数の属性の組み合わせによる集合について、その全体集合の中で前記適宜の複数のルールが単独で該当する個々の領域、該適宜の複数のルールのうち任意の複数のルールが共通に該当する個々の領域、該適宜の複数のルールがいずれも該当しない領域からサンプル点をそれぞれ選択し、該適宜の複数の属性の組み合わせを該選択された各サンプル点に順次変化させて設定し、かつ該サンプル点ごとに他の属性を順次変化させて設定した検証パケットを順次発生するようにしたものである。検証パケットのルール相互間で共通の属性(前記適宜の複数の属性および前記他の属性以外の属性)は該共通の属性に固定設定することができる。   The verification packet generation method according to the present invention is a packet in which a plurality of determination conditions relating to packet attributes and a plurality of rules defining the operation of passing or discarding the packet when the packet attributes meet the plurality of determination conditions. For a filter, a plurality of appropriate rules (for example, at least one attribute that is applied to a packet communicated in the same direction among all the rules set in the packet filter and included in the determination condition is commonly set between the rules) A method for generating a verification packet for verifying the setting of all the rules), and for the set of a combination of a plurality of appropriate attributes of the packet, the appropriate plurality of rules are applicable alone in the entire set Each region, any individual region to which any plurality of rules among the plurality of appropriate rules correspond, Each sample point is selected from an area to which none of the plurality of rules correspond, and the appropriate combination of the plurality of attributes is sequentially changed to each selected sample point, and another attribute is set for each sample point. The verification packets set by sequentially changing are sequentially generated. Attributes common to the rules of the verification packet (attributes other than the appropriate plurality of attributes and the other attributes) can be fixedly set to the common attributes.

この発明によれば、前記各領域内ではいずれのサンプル点を用いてもパケットフィルタに対するパケット(該サンプル点以外の属性が同じであるパケット)の通過、破棄の結果は同じになるので、該各領域ごとに選択したサンプル点について検証パケットを発生することにより、限られた数の検証パケットで該パケットフィルタの設定を網羅的に検証することができ、該パケットフィルタの設定の検証を網羅的にかつ効率よく行うことができる。   According to the present invention, the results of passing and discarding packets (packets having the same attributes other than the sample points) to the packet filter are the same regardless of which sample point is used in each region. By generating verification packets for selected sample points for each region, the packet filter settings can be comprehensively verified with a limited number of verification packets, and the verification of the packet filter settings can be comprehensively verified. And can be performed efficiently.

この発明の検証パケット発生方法は、例えばWAN側フィルタの全ルールのうちWAN側からLAN側へ通信されるパケットに適用されかつプロトコルおよび終点IPアドレスがルール相互間で共通に設定されている複数のルールの設定を検証する場合は、始点IPアドレスと始点ポート番号の組み合わせによる集合について、その全体集合の中で前記検証対象の複数のルールが単独で該当する個々の領域、該複数のルールのうち任意の複数のルールが共通に該当する個々の領域、該複数のルールがいずれも該当しない領域からサンプル点をそれぞれ選択し、プロトコルと終点IPアドレスを前記ルール相互間で共通に設定されている属性に固定設定し、かつ始点IPアドレスと始点ポート番号の組み合わせを前記選択された各サンプル点に順次変化させて設定し、かつ該サンプル点ごとに終点ポート番号を適宜の範囲で順次変化させて設定した検証パケットを順次発生するものとすることができる。   The verification packet generation method of the present invention is applied to, for example, a packet communicated from the WAN side to the LAN side among all the rules of the WAN side filter, and a plurality of protocols and end point IP addresses are commonly set between the rules. When verifying the rule settings, for a set of combinations of the start point IP address and the start point port number, individual areas to which the plurality of rules to be verified alone correspond in the entire set, of the plurality of rules An attribute in which a sample point is selected from an individual area to which any of a plurality of rules correspond, and an area to which none of the plurality of rules corresponds, and a protocol and an end point IP address are set in common between the rules. And a combination of the start point IP address and start point port number for each selected sample point. Set by the following changes, and may be one that is sequentially changed in an appropriate range destination port number for each said sample points sequentially generating a validation packet set.

この発明の検証パケット発生装置はこの発明の検証パケット発生方法を実行するものである。この発明の検証パケット発生プログラムはこの発明の検証パケット発生方法を処理装置に実行させるものである。この発明のパケットフィルタのテスト方法はこの発明の検証パケット発生方法により順次発生される検証パケットを前記パケットフィルタに入力し、該パケットフィルタを動作させるものである。この発明のパケットフィルタのテスト装置はこの発明のパケットフィルタのテスト方法を実行するものである。 The verification packet generator of the present invention executes the verification packet generation method of the present invention. The verification packet generation program of the present invention causes a processing device to execute the verification packet generation method of the present invention . Test method for packet filter of this invention enter the verification packets sequentially generated by verifying packet generation method of the present invention in the packet filter is intended to operate the packet filter. The packet filter test apparatus according to the present invention executes the packet filter test method according to the present invention.

この発明の実施の形態を以下説明する。図3は全体のシステム構成およびルータ10内の機能ブロックを示す。この実施の形態では、ルータ10内に検証パケット発生装置および該装置から発生される検証パケットを使用してパケットフィルタをテスト動作させるテスト装置を内蔵している。はじめに、通常の通信で使用される部分について説明する。ルータ10はイーサネット(登録商標)インタフェース12を介してWAN側(インターネット側)14に接続され、イーサネットインタフェース16を介してLAN側18に接続されて、WAN側14とLAN側18間で相互通信を可能にしている。   Embodiments of the present invention will be described below. FIG. 3 shows an overall system configuration and functional blocks in the router 10. In this embodiment, a verification packet generation device and a test device for performing a test operation of a packet filter using a verification packet generated from the device are built in the router 10. First, parts used in normal communication will be described. The router 10 is connected to the WAN side (Internet side) 14 via the Ethernet (registered trademark) interface 12, and connected to the LAN side 18 via the Ethernet interface 16, so that the WAN side 14 and the LAN side 18 can communicate with each other. It is possible.

ルータ10内のパケット転送処理部22はパケットフィルタ24を具えている。このパケットフィルタ24は、パケットの属性に関する複数の判定条件とパケットの属性が該複数の判定条件に適合したときの該パケットの通過または破棄の動作を規定した複数のルールを縦続的に設定し、入力されるパケットについてその属性が前記いずれかのルールで規定された判定条件に一致するか否かを先頭のルールから順番に検査し、一致するルールがあった場合はそのルールで規定された動作に従い該パケットを通過または破棄して処理を終了し、最後のルールまで一致するルールがなかった場合は該パケットを通過または破棄するようにその動作が設定されている。   The packet transfer processing unit 22 in the router 10 includes a packet filter 24. The packet filter 24 cascadely sets a plurality of rules that define a plurality of determination conditions related to packet attributes and the operation of passing or discarding the packet when the packet attributes meet the plurality of determination conditions. Check whether the attribute of the input packet matches the criteria specified in any of the above rules, starting with the first rule, and if there is a match, the action specified in that rule The operation is set so as to pass or discard the packet and terminate the process, and when no rule matches up to the last rule, the packet is passed or discarded.

パケットフィルタ24はWAN側で処理を行うWAN側フィルタとLAN側で処理を行うLAN側フィルタで構成されている。両フィルタにはWAN側14からLAN側18に向けて送信されるパケットに対するフィルタルールと、LAN側18からWAN側14に向けて送信されるパケットに対するフィルタルールがそれぞれ設定されている。パケットフィルタ24のフィルタルールの設定は、使用者によるLAN側18のコンピュータからの操作により、イーサネットインタフェース16を介して(または別途用意されたシリアルインタフェースを介して)行われる。使用者により設定されたフィルタルールはパケットフィルタ設定部(メモリ)32に記憶され、パケットフィルタ24はこの記憶データに該当する内容に設定される。   The packet filter 24 includes a WAN filter that performs processing on the WAN side and a LAN filter that performs processing on the LAN side. In both filters, a filter rule for a packet transmitted from the WAN side 14 toward the LAN side 18 and a filter rule for a packet transmitted from the LAN side 18 toward the WAN side 14 are set. Setting of the filter rule of the packet filter 24 is performed via the Ethernet interface 16 (or a serial interface prepared separately) by a user's operation from the computer on the LAN side 18. The filter rule set by the user is stored in the packet filter setting unit (memory) 32, and the packet filter 24 is set to contents corresponding to this stored data.

WAN側14側から送信されるパケットは、イーサネットインタフェース12のパケット受信処理部20で受信されてパケット転送処理部22に供給される。パケット転送処理部22内のパケットフィルタ24は受信したパケットのヘッダ情報とパケットフィルタ24に設定されているルール(WAN側14からLAN側18に向けて送信されるパケットに対するフィルタルール)とを照合し、例えば前記図2に示したパケットフィルタ処理を実行して、パケットごとに通過または破棄する処理を行う。このパケットフィルタ処理は最初にWAN側フィルタについて行われ、WAN側フィルタを通過したパケットについてさらにLAN側フィルタについて行われる。パケットフィルタ24を通過したパケットはイーサネットインタフェース16のパケット送信処理部26を介してLAN側18のコンピュータに転送される。   Packets transmitted from the WAN side 14 are received by the packet reception processing unit 20 of the Ethernet interface 12 and supplied to the packet transfer processing unit 22. The packet filter 24 in the packet transfer processing unit 22 compares the header information of the received packet with the rules set in the packet filter 24 (filter rules for packets transmitted from the WAN side 14 toward the LAN side 18). For example, the packet filtering process shown in FIG. 2 is executed to perform a process of passing or discarding each packet. This packet filter processing is first performed for the WAN-side filter, and is further performed for the LAN-side filter for packets that have passed through the WAN-side filter. The packet that has passed through the packet filter 24 is transferred to the computer on the LAN side 18 via the packet transmission processing unit 26 of the Ethernet interface 16.

一方、LAN側18のコンピュータから送信されたパケットはイーサネットインタフェース16のパケット受信処理部28で受信されてパケット転送処理部22に供給される。パケット転送処理部22のパケットフィルタ24は受信したパケットのヘッダ情報とパケットフィルタ24に設定されているルール(LAN側18からWAN側14に向けて送信されるパケットに対するフィルタルール)とを照合し、例えば前記図2に示したパケットフィルタ処理を実行して、パケットごとに通過または破棄する処理を行う。このパケットフィルタ処理は最初にLAN側フィルタについて行われ、LAN側フィルタを通過したパケットについてさらにWAN側フィルタについて行われる。パケットフィルタ24を通過したパケットはイーサネットインタフェース12のパケット送信処理部30を介してWAN側14に転送される。   On the other hand, a packet transmitted from the computer on the LAN side 18 is received by the packet reception processing unit 28 of the Ethernet interface 16 and supplied to the packet transfer processing unit 22. The packet filter 24 of the packet transfer processing unit 22 collates the header information of the received packet with the rules set in the packet filter 24 (filter rules for packets transmitted from the LAN side 18 to the WAN side 14), For example, the packet filter process shown in FIG. 2 is executed, and a process of passing or discarding each packet is performed. This packet filter processing is first performed on the LAN side filter, and further performed on the WAN side filter for packets that have passed through the LAN side filter. The packet that has passed through the packet filter 24 is transferred to the WAN side 14 via the packet transmission processing unit 30 of the Ethernet interface 12.

次に、ルータ10内の検証パケット発生装置およびテスト装置について説明する。ここではパケットフィルタ24に設定された全フィルタルールのうち、WAN側からLAN側へ送り込まれるパケットに対するWAN側フィルタのフィルタルール(ルータ10に割り当てられたグローバルIPアドレスが終点IPアドレスとして共通に設定されているルール)の設定を検証する場合について説明する。図1は検証パケットを使用したパケットフィルタ24のテスト(ポートスキャン)の手順を示す。使用者がLAN側18のコンピュータからポートスキャンの準備を指示すると(S10)、使用者の操作によりまたは自動で検証パケットに付与する属性のうちプロトコル、終点IPアドレスおよびポートスキャン範囲が設定される(S11)。プロトコルはTCP、UDP等のうち検証しようとするルールのプロトコルが使用者の操作により設定される。終点IPアドレスはルータ10に割り当てられたグローバルIPアドレスが使用者の操作によりまたは自動で設定される。終点ポート番号はルータ10のポート番号のスキャン範囲(全範囲スキャンする場合は0〜65535)が使用者の操作によりまたは自動で設定される。なお、フィルタ種類(WAN側フィルタかLAN側フィルタか)を選択してテストできるようにする場合や、パケットの送信方向(WAN側14からLAN側18への送信かLAN側18からWAN側14への送信か)を選択してテストできるようにする場合は、使用者の操作によりフィルタ種類やパケットの送信方向を設定する。   Next, the verification packet generation device and the test device in the router 10 will be described. Here, among all the filter rules set in the packet filter 24, the filter rule of the WAN side filter for the packet sent from the WAN side to the LAN side (the global IP address assigned to the router 10 is commonly set as the end point IP address). Will be described. FIG. 1 shows a test (port scan) procedure of the packet filter 24 using a verification packet. When the user instructs preparation for port scanning from the computer on the LAN side 18 (S10), the protocol, the end point IP address, and the port scanning range are set among the attributes to be added to the verification packet by the user's operation or automatically ( S11). The protocol of a rule to be verified among TCP, UDP, etc. is set by a user operation. As the end point IP address, a global IP address assigned to the router 10 is set by a user operation or automatically. The end point port number is set by the user's operation or automatically within the scan range of the port number of the router 10 (0 to 65535 when the entire range is scanned). It should be noted that the filter type (WAN side filter or LAN side filter) can be selected and tested, or the packet transmission direction (from the WAN side 14 to the LAN side 18 or from the LAN side 18 to the WAN side 14). If it is possible to test by selecting the transmission type, the filter type and the packet transmission direction are set by the user's operation.

検証パケットの属性が設定されたら、パケットフィルタ24に設定されたWAN側からLAN側へ送り込まれるパケットに対するWAN側フィルタのフィルタルールのうち検証パケットの属性設定で設定されたプロトコルについて適用される全ルールについて、各ルールで設定された始点IPアドレスと始点ポート番号の組み合わせによる集合に関し、その全体集合の中で各ルールが単独で該当する個々の領域、該各ルールのうち任意の複数のルールが共通に該当する個々の領域、該各ルールがいずれも該当しない領域からサンプル点が自動で1点ずつ選択される(S12)。   When the attribute of the verification packet is set, all the rules applied to the protocol set in the attribute setting of the verification packet among the filter rules of the WAN side filter for the packet sent from the WAN side to the LAN side set in the packet filter 24 In regard to a set by a combination of the start point IP address and start point port number set in each rule, individual areas to which each rule corresponds independently in the entire set, and a plurality of arbitrary rules among these rules are common Sample points are automatically selected one by one from the individual areas corresponding to the above and areas where none of the rules correspond (S12).

これでポートスキャン待機状態となり、使用者がポートスキャンの開始を指示すると(S13)、プロトコルと終点IPアドレスを前記検証パケットの属性設定で設定された値に固定設定し、始点IPアドレスと始点ポート番号の組み合わせを前記選択された各サンプル点に順次変化して設定し、終点ポート番号を前記検証パケットの属性設定で設定された範囲で順次変化して設定した検証パケットが自動で順次発生され、パケットフィルタ24に設定されたWAN側からLAN側へ送り込まれるパケットに対するWAN側フィルタに供給されてポートスキャンが実行される(S14)。   In this state, the port scan standby state is entered, and when the user instructs the start of the port scan (S13), the protocol and the end point IP address are fixedly set to the values set in the attribute setting of the verification packet, and the start point IP address and start point port A combination of numbers is sequentially changed and set for each of the selected sample points, and a verification packet in which the end point port number is sequentially changed and set within the range set in the attribute setting of the verification packet is automatically and sequentially generated, A port scan is performed by supplying the data to the WAN filter for packets sent from the WAN side to the LAN side set in the packet filter 24 (S14).

全検証パケットによるポートスキャンが終了すると、ポートスキャンによる各検証パケットの通過、破棄の結果が自動で集計され、集計結果として例えば通過したパケットの属性情報(始点IPアドレス、始点ポート番号、終点ポート番号、プロトコル等)がLAN側18のコンピュータのディスプレイに表示される(S15)。使用者はこの結果を見てパケットフィルタ24に設定された全フィルタルールのうち、WAN側からLAN側へ送り込まれるパケットに対するWAN側フィルタのフィルタルールの設定を検証することができる。他のプロトコルについて検証する場合は検証パケットの属性設定(S11)でプロトコルの設定を変更し、上記同様の手順でポートスキャンを実行する。   When the port scan by all the verification packets is completed, the results of passing and discarding of each verification packet by the port scan are automatically totaled, and for example, attribute information of the passed packets (start IP address, start port number, end port number) , Protocol, etc.) are displayed on the display of the computer on the LAN side 18 (S15). The user can verify the setting of the filter rule of the WAN side filter for the packet sent from the WAN side to the LAN side out of all the filter rules set in the packet filter 24 by looking at this result. When verifying another protocol, the protocol setting is changed in the attribute setting (S11) of the verification packet, and the port scan is executed in the same procedure as described above.

以上の処理を実行する図3のルータ10について説明する。ポートスキャン設定部(メモリ)34は前記検証パケットの属性設定(図1のS11)で設定された検証パケットの属性を記憶する。設定解析処理部36はパケットフィルタ設定部32に設定されているフィルタルールとポートスキャン設定部34に設定されている検証パケットの属性に基づき、ポートスキャンの準備段階として、前記サンプル点を選択する処理(同S12)を実行する。ポートスキャン処理部38は、サンプル点が選択されてポートスキャンの準備が完了した後、使用者によるポートスキャン開始指示(同S13)を受けて、該選択されたサンプル点ごとに終点ポート番号を前記設定された範囲で順次変化させた検証パケットを発生する。この検証パケットはパケット転送処理部22に直接入力され、パケットフィルタ24のWAN側フィルタに供給されてフィルタ処理(ポートスキャン)が実行される(同S14)。   The router 10 of FIG. 3 that executes the above processing will be described. The port scan setting unit (memory) 34 stores the attribute of the verification packet set in the attribute setting of the verification packet (S11 in FIG. 1). The setting analysis processing unit 36 selects the sample points as a port scan preparation stage based on the filter rules set in the packet filter setting unit 32 and the verification packet attributes set in the port scan setting unit 34. (S12) is executed. After the sample point is selected and the preparation for the port scan is completed, the port scan processing unit 38 receives a port scan start instruction (S13) from the user, and sets the end port number for each selected sample point. A verification packet that is sequentially changed within a set range is generated. The verification packet is directly input to the packet transfer processing unit 22, and is supplied to the WAN filter of the packet filter 24 to execute filter processing (port scan) (S14).

ポートスキャンによる各検証パケットの通過、破棄の結果はポートスキャン処理部38に伝えられる。ポートスキャン処理部38はこの結果に基づき通過したパケットの情報(始点IPアドレス、始点ポート番号、終点ポート番号、プロトコル等)をまとめて、ポートスキャン結果出力部40を介してLAN側18のコンピュータに送出する。該コンピュータは該情報をディスプレイに表示する。使用者はこの表示を見てパケットフィルタ24の設定を検証する。   The result of passing and discarding each verification packet by the port scan is transmitted to the port scan processing unit 38. Based on this result, the port scan processing unit 38 collects information on the packets that have passed (starting point IP address, starting point port number, end point port number, protocol, etc.) and sends them to the computer on the LAN side 18 via the port scan result output unit 40. Send it out. The computer displays the information on a display. The user looks at this display and verifies the setting of the packet filter 24.

なお、ポートスキャン処理部38から発生する検証パケットに特殊な識別データを埋め込んでおくことにより、通常の通信用のパケットと区別した処理をすることができる。この識別情報を利用して、例えばこの識別データが検出されるパケットについてのみポートスキャン処理を実行させるようにすることができる。また、パケットフィルタ24を通過したパケットのうち識別データが検出されるパケットについてルータ10内で破棄することにより、検証パケットがネットワーク側(WAN側14)に漏れないようにすることができる。   It should be noted that by embedding special identification data in the verification packet generated from the port scan processing unit 38, it is possible to perform processing that distinguishes it from normal communication packets. Using this identification information, for example, the port scan process can be executed only for a packet in which this identification data is detected. Further, by discarding the packet in which identification data is detected among the packets that have passed through the packet filter 24 in the router 10, it is possible to prevent the verification packet from leaking to the network side (WAN side 14).

ここで、設定解析処理部36による始点IPアドレスと始点ポート番号の組み合わせのサンプル点の選択処理について説明する。ここではパケットフィルタ24のWAN側フィルタのうちWAN側14からLAN側18に送信されるパケットに適用されるフィルタルールをR1〜Rnとする。これらルールR1〜Rnは、ルータ10に割り当てられたグローバルIPアドレスが終点IPアドレスとして共通に設定され、かつプロトコルが前記検証パケットの属性設定(図1のS11)で設定されたプロトコルに共通に設定されているものとする。ルールR1〜Rnに設定されている始点IPアドレスと始点ポート番号の組み合わせをCi(i=1,2,…,n)で表す。ここでは説明の便宜上3つのルールR1,R2,R3が設定されているものとする。入力パケットは前記図2のパケットフィルタ処理に従い、R1→R2→R3の順にフィルタに掛けられていき、判定条件が一致したところでルールに規定された動作に従い通過または破棄される。いずれのルールの判定条件にも一致しなかったパケットはデフォルトルールに従って通過または破棄される。   Here, the sample point selection processing of the combination of the start point IP address and the start point port number by the setting analysis processing unit 36 will be described. Here, filter rules applied to packets transmitted from the WAN side 14 to the LAN side 18 among the WAN side filters of the packet filter 24 are R1 to Rn. In these rules R1 to Rn, the global IP address assigned to the router 10 is commonly set as the destination IP address, and the protocol is commonly set to the protocol set in the attribute setting of the verification packet (S11 in FIG. 1). It is assumed that A combination of the start point IP address and the start point port number set in the rules R1 to Rn is represented by Ci (i = 1, 2,..., N). Here, for convenience of explanation, it is assumed that three rules R1, R2, and R3 are set. The input packet is filtered in the order of R1 → R2 → R3 in accordance with the packet filtering process of FIG. 2, and is passed or discarded according to the operation defined in the rule when the determination conditions are matched. A packet that does not match the determination condition of any rule is passed or discarded according to the default rule.

図4はルールR1〜R3における始点IPアドレスと始点ポート番号の組み合わせの各集合C1〜C3を、始点IPアドレスを横軸にとり、始点ポート番号を縦軸にとって模式的に図示したものである。始点IPアドレスと始点ポート番号の組み合わせの全体集合は、各集合Ciが単独で該当する個々の領域、各集合Ciのうち任意の複数の集合が共通に該当する個々の領域、各集合Ciがいずれも該当しない領域に区分される。これら領域の場合分けの数は2n個(したがって集合がC1,C2,C3の3つであれば領域の場合分けの数は8個)である。各集合Ciに属さない部分(すなわち補集合)を−Ciで表すと、各領域Sj(j=1,2,3,…,2n)はそれぞれ次式で表される(*は積集合を表す)。
S1:C1*C2*C3
S2:−C1*C2*C3
S3:C1*−C2*C3
S4:C1*C2*−C3
S5:−C1*−C2*C3
S6:C1*−C2*−C3
S7:−C1*C2*−C3
S8:−C1*−C2*−C3
FIG. 4 schematically shows each set C1 to C3 of combinations of the start point IP address and the start point port number in the rules R1 to R3, with the start point IP address on the horizontal axis and the start point port number on the vertical axis. The entire set of combinations of the starting point IP address and the starting point port number is divided into individual areas to which each set Ci corresponds independently, individual areas to which any of a plurality of sets Ci correspond to each other, and each set Ci Are also classified as non-applicable areas. The number of cases in these areas is 2 n (therefore, the number of cases in areas is 8 if the set is three of C1, C2, and C3). When a portion that does not belong to each set Ci (that is, a complementary set) is represented by −Ci, each region Sj (j = 1, 2, 3,..., 2 n ) is represented by the following formula (* is a product set). To express).
S1: C1 * C2 * C3
S2: -C1 * C2 * C3
S3: C1 * -C2 * C3
S4: C1 * C2 * -C3
S5: -C1 * -C2 * C3
S6: C1 * -C2 * -C3
S7: -C1 * C2 * -C3
S8: -C1 * -C2 * -C3

これら領域のうち空集合となる領域がある場合(複数の集合どうしが共通に該当する領域が無い場合)は該空集合となる領域を取り除く。また、相互に一致する複数の領域がある場合(同一のルールが重複して設定されている場合)はその内の1つの領域のみ残し他は取り除く。そして残りの領域からそれぞれ1点ずつ任意のサンプル点(空集合、一致領域が無ければ全8点)を選択する。各領域からサンプル点を選択する処理手法として図形の切り取りのアルゴリズムを利用することができる。そのようなアルゴリズムとしては例えば、Sutherland-Hodgman法と呼ばれるPolygon Clippingを用いることができる。このPolygon Clippingによれば各領域を構成する多角形の頂点が求まるので、各領域の頂点位置の1つをサンプル点として選択することができる。なお、図4の模式図上で1つの領域が複数箇所に分割される場合があるが(例えば図4上で2つのルールによる集合が十字上に交差する場合、各集合が単独で該当する領域はそれぞれ2分割される)、そのような場合でも分割領域ごとにサンプル点を選択する必要はなく、分割された領域全体の中から1つのサンプルを選択すればよい。ただし、分割領域ごとにサンプル点を選択しても問題はない。   When there is an area that becomes an empty set among these areas (when there is no area that corresponds to a plurality of sets in common), the area that becomes the empty set is removed. Also, when there are a plurality of areas that match each other (when the same rule is set redundantly), only one area is left and the others are removed. An arbitrary sample point is selected from each of the remaining areas (empty set; if there is no matching area, all 8 points) are selected. As a processing technique for selecting a sample point from each region, a figure cutting algorithm can be used. As such an algorithm, for example, Polygon Clipping called Sutherland-Hodgman method can be used. According to this Polygon Clipping, the vertices of the polygons constituting each area can be obtained, so that one of the vertex positions of each area can be selected as a sample point. Note that one area may be divided into a plurality of locations on the schematic diagram of FIG. 4 (for example, when a set based on two rules intersects on the cross on FIG. In such a case, it is not necessary to select a sample point for each divided region, and one sample may be selected from the entire divided region. However, there is no problem even if sample points are selected for each divided region.

以上のようにして各領域から選択された各サンプル点(始点IPアドレスと始点ポート番号の組み合わせ)について、終点ポート番号を前記検証パケットの属性設定(図1のS11)で設定された範囲(例えば0〜65535)で変化させた検証パケットを順次発生してポートスキャンを行う。これによれば、同一の領域内ではどこでサンプリングしても通過、破棄の結果は同じになるので、1つの領域についてはその中の1つのサンプル点についてポートスキャンすればその領域全体をポートスキャンしたのと同じになり、無駄なポートスキャンをしなくて済む。しかも空集合および一致領域を除く全領域のサンプル点についてポートスキャンするので、始点IPアドレスと始点ポート番号の組み合わせ全体についてポートスキャンしたのと同じになり、漏れのないポートスキャンを行うことができる。   For each sample point (combination of the start point IP address and start point port number) selected from each region as described above, the end point port number is set in the range set in the attribute setting of the verification packet (S11 in FIG. 1) (for example, 0 to 65535) are sequentially generated and the port scan is performed. According to this, since the results of passing and discarding are the same regardless of where in the same region, if one port scan is performed for one sample point in one region, the entire region is port scanned. This eliminates unnecessary port scanning. In addition, since the port scan is performed for the sample points in all areas except the empty set and the coincidence area, it is the same as the port scan for the entire combination of the start point IP address and the start point port number, and the port scan without omission can be performed.

次に具体例について説明する。ここではパケットフィルタ24のWAN側フィルタに設定されたルールのうちWAN側14からLAN側18に送信されるパケットに適用されるルールとして表1に示す2つのルール1,2が設定されているものとする。

Figure 0004518070
Next, a specific example will be described. Here, of the rules set in the WAN filter of the packet filter 24, two rules 1 and 2 shown in Table 1 are set as rules applied to packets transmitted from the WAN side 14 to the LAN side 18. And
Figure 0004518070

使用者によりポートスキャンの準備が指示されると、図3の設定解析処理部36は各ルール1,2の始点IPアドレスと始点ポート番号の組み合わせによる集合について、その全体集合の中でルール1,2が単独で該当する個々の領域Xs1,Xs2、ルール1,2が共通に該当する領域Xs3、ルール1,2がいずれも該当しない領域Xs4を求め、各領域Xs1〜Xs4からサンプル点を1点ずつ選択する(図1のS12)。図5は領域Xs1〜Xs4を模式的に示したものである。ルール1による始点IPアドレスと始点ポート番号の組み合わせの集合および補集合をそれぞれC1、−C1とし、ルール2による同組み合わせの集合および補集合をそれぞれC2、−C2とすると、領域Xs1〜Xs4はそれぞれ次式で表される。
Xs1:C1*−C2
Xs2:−C1*C2
Xs3:C1*C2
Xs4:−C1*−C2
When the user instructs to prepare for port scanning, the setting analysis processing unit 36 in FIG. 3 sets rule 1 and rule 2 in the entire set for the set of combinations of the start IP address and start port number of each rule 1 and 2. Each region Xs1, Xs2 corresponding to 2 alone, region Xs3 corresponding to rules 1 and 2 in common, and region Xs4 not corresponding to rules 1 and 2 are obtained, and one sample point is obtained from each region Xs1 to Xs4. Each one is selected (S12 in FIG. 1). FIG. 5 schematically shows the regions Xs1 to Xs4. If the set and complement of the combination of the start point IP address and the start point port number according to rule 1 are C1 and −C1, respectively, and the set and complement of the combination according to rule 2 are C2 and −C2, respectively, the regions Xs1 to Xs4 are respectively It is expressed by the following formula.
Xs1: C1 * -C2
Xs2: -C1 * C2
Xs3: C1 * C2
Xs4: -C1 * -C2

設定解析処理部36は領域Xs1〜Xs4ごとに任意のサンプル点を1点ずつ選択する。各領域から選択したサンプル点の例を表2に示す。

Figure 0004518070
The setting analysis processing unit 36 selects an arbitrary sample point for each of the regions Xs1 to Xs4. Examples of sample points selected from each region are shown in Table 2.
Figure 0004518070

設定解析処理部36がサンプル点を選択するとポートスキャン開始待機状態となり、次いで使用者によりポートスキャンの開始が指示されると、ポートスキャン処理部38はプロトコルと終点IPアドレスを表1による値に固定設定し、かつ始点IPアドレスと始点ポート番号の組み合わせを、選択された各サンプル点に順次切り換えて設定し、かつ該順次切り換えられるサンプル点ごとに終点ポート番号を表1により設定された0〜65535の範囲で順次変化させた検証パケットを順次発生し、これによりポートスキャンが実行される。   When the setting analysis processing unit 36 selects a sample point, the port scan start standby state is entered. Then, when the user instructs the start of the port scan, the port scan processing unit 38 fixes the protocol and the end point IP address to the values shown in Table 1. A combination of the start point IP address and the start point port number is sequentially switched to each selected sample point, and the end point port number is set according to Table 1 for each sample point to be sequentially switched. The verification packets sequentially changed in the range are sequentially generated, and thereby the port scan is executed.

なお、前記実施の形態では各領域で選択するサンプル数を1としたが、この発明は各領域のサンプル数を2以上とすることを妨げるものではない。   In the above-described embodiment, the number of samples selected in each region is 1. However, the present invention does not prevent the number of samples in each region from being 2 or more.

前記実施の形態では始点IPアドレスと始点ポート番号の2つの属性の組み合わせによる集合についてサンプル点を選択したが、3つ以上の属性の組み合わせによる集合についてサンプル点を選択することもできる。例えば始点IPアドレスと始点ポート番号とプロトコルの3つの属性の組み合わせの場合は、検証パケットの属性設定(図1のS11)をプロトコルごとに変更することなく、全プロトコルについて一度にポートスキャンすることができる。   In the above embodiment, sample points are selected for a set of combinations of two attributes of a start point IP address and a start point port number. However, sample points can also be selected for a set of combinations of three or more attributes. For example, in the case of a combination of the three attributes of the start point IP address, the start point port number, and the protocol, port scanning can be performed for all protocols at once without changing the attribute setting (S11 in FIG. 1) for each protocol. it can.

前記実施の形態では、WAN側からLAN側へ送り込まれるパケットに対するWAN側フィルタのフィルタルールの設定を検証する場合について説明したが、この発明はWAN側からLAN側へ送り込まれるパケットに対するLAN側フィルタのフィルタルール、LAN側からWAN側へ送出されるパケットに対するLAN側フィルタのフィルタルール、LAN側からWAN側へ送出されるパケットに対するWAN側フィルタのフィルタルールの設定を検証する場合にも適用することができる。例えば、LAN側からWAN側へ送出されるパケットに対するWAN側フィルタのフィルタルールの設定を検証する場合は、終点IPアドレス(相手側のIPアドレス)と終点ポート番号(相手側のポート番号)の組み合わせによる集合についてサンプル点を選択し、始点IPアドレスを自分側のグローバルIPアドレス(ルータ10に割り当てられたグローバルIPアドレス)に固定設定し、プロトコルを任意のプロトコルに固定設定し、終点IPアドレスと終点ポート番号の組み合わせを前記選択された各サンプル点に順次変化させて設定し、該サンプル点ごとに始点ポート番号(自分側のポート番号)を適宜の範囲で順次変化させて設定した検証パケットを順次発生させてポートスキャンを行うことができる。   In the above embodiment, the case of verifying the setting of the filter rule of the WAN side filter for the packet sent from the WAN side to the LAN side has been described. However, the present invention relates to the LAN side filter for the packet sent from the WAN side to the LAN side. It is also applicable to verifying the filter rule, the filter rule of the LAN side filter for the packet sent from the LAN side to the WAN side, and the setting of the filter rule of the WAN side filter for the packet sent from the LAN side to the WAN side. it can. For example, when verifying the setting of the filter rule of the WAN side filter for a packet sent from the LAN side to the WAN side, a combination of the end point IP address (the other party's IP address) and the end point port number (the other party's port number) The sample point is selected for the set of, the start point IP address is fixedly set to its own global IP address (global IP address assigned to the router 10), the protocol is fixedly set to an arbitrary protocol, the end point IP address and the end point A combination of port numbers is sequentially changed to each selected sample point and set, and verification packets set by sequentially changing the start port number (port number on the own side) within an appropriate range for each sample point are sequentially set. Can be generated and port scanning can be performed.

前記実施の形態ではネットワーク機器(ルータ10)内に検証パケット発生装置およびテスト装置を内蔵したが、これに限らずコンピュータから検証パケットを発生させてネットワーク機器に供給してポートスキャンを行う場合にもこの発明を適用することができる。   In the above-described embodiment, the verification packet generation device and the test device are built in the network device (router 10). However, the present invention is not limited to this, and it is also possible to generate a verification packet from a computer and supply it to the network device to perform port scanning. The present invention can be applied.

図3の構成において検証パケットを使用してパケットフィルタのテスト(ポートスキャン)を行う手順を示すフローチャートである。4 is a flowchart showing a procedure for performing a packet filter test (port scan) using a verification packet in the configuration of FIG. 3. パケットフィルタ処理の一例を示すフローチャートである。It is a flowchart which shows an example of a packet filter process. この発明の実施の形態の全体のシステム構成およびルータ内の機能ブロックを示すブロック図である。1 is a block diagram showing an overall system configuration and functional blocks in a router according to an embodiment of the present invention. フィルタルールにおける始点IPアドレスと始点ポート番号の組み合わせの各集合を模式的に示す図である。It is a figure which shows typically each set of the combination of the starting point IP address and starting point port number in a filter rule. 表1のルール設定例における始点IPアドレスと始点ポート番号の組み合わせの各集合を模式的に示す図である。It is a figure which shows typically each set of the combination of a starting point IP address and a starting point port number in the rule setting example of Table 1.

符号の説明Explanation of symbols

10…ルータ(ネットワーク機器)、24…パケットフィルタ、14…WAN側、18…LAN側、22…パケット転送処理部、32…パケットフィルタ設定部、34…ポートスキャン設定部、36…設定解析処理部、38…ポートスキャン処理部、40…ポートスキャン結果出力部 DESCRIPTION OF SYMBOLS 10 ... Router (network apparatus), 24 ... Packet filter, 14 ... WAN side, 18 ... LAN side , 22 ... Packet transfer process part, 32 ... Packet filter setting part, 34 ... Port scan setting part, 36 ... Setting analysis process part , 38 ... Port scan processing unit, 40 ... Port scan result output unit

Claims (7)

パケットの属性に関する複数の判定条件とパケットの属性が該複数の判定条件に適合したときの該パケットの通過または破棄の動作を規定した複数のルールを設定したパケットフィルタについて、適宜の複数のルールの設定を検証するための検証パケットを発生する方法であって、
パケットの適宜の複数の属性の組み合わせによる集合について、その全体集合の中で前記適宜の複数のルールが単独で該当する個々の領域、該適宜の複数のルールのうち任意の複数のルールが共通に該当する個々の領域、該適宜の複数のルールがいずれも該当しない領域からサンプル点をそれぞれ選択し、
該適宜の複数の属性の組み合わせを該選択された各サンプル点に順次変化させて設定し、かつ該サンプル点ごとに他の属性を順次変化させて設定した検証パケットを順次発生する検証パケット発生方法。
A plurality of determination conditions related to packet attributes and a packet filter that sets a plurality of rules that define the operation of passing or discarding the packet when the packet attributes meet the plurality of determination conditions. A method for generating a verification packet to verify a configuration,
For a set of a plurality of combinations of a plurality of appropriate attributes of packets, in the entire set, individual areas to which the appropriate plurality of rules correspond independently, and a plurality of arbitrary rules among the appropriate plurality of rules are common Select each sample point from the corresponding individual area, the area where none of the appropriate multiple rules correspond,
A verification packet generating method for sequentially setting a combination of a plurality of appropriate attributes to the selected sample points and sequentially generating verification packets set by sequentially changing other attributes for each sample point .
パケットの属性に関する複数の判定条件とパケットの属性が該複数の判定条件に適合したときの該パケットの通過または破棄の動作を規定した複数のルールを設定したパケットフィルタについて、該パケットフィルタに設定されているWAN側フィルタの全ルールのうちWAN側からLAN側へ通信されるパケットに適用されかつプロトコルおよび終点IPアドレスがルール相互間で共通に設定されている複数のルールの設定を検証するための検証パケットを発生する方法であって、
始点IPアドレスと始点ポート番号の組み合わせによる集合について、その全体集合の中で前記検証対象の複数のルールが単独で該当する個々の領域、該複数のルールのうち任意の複数のルールが共通に該当する個々の領域、該複数のルールがいずれも該当しない領域からサンプル点をそれぞれ選択し、
プロトコルと終点IPアドレスを前記ルール相互間で共通に設定されている属性に固定設定し、かつ始点IPアドレスと始点ポート番号の組み合わせを前記選択された各サンプル点に順次変化させて設定し、かつ該サンプル点ごとに終点ポート番号を適宜の範囲で順次変化させて設定した検証パケットを順次発生する検証パケット発生方法。
A packet filter in which a plurality of determination conditions relating to packet attributes and a plurality of rules defining the operation of passing or discarding the packet when the packet attributes meet the plurality of determination conditions is set in the packet filter. For verifying the setting of a plurality of rules that are applied to a packet communicated from the WAN side to the LAN side among all the rules of the WAN side filter and the protocol and the destination IP address are commonly set between the rules. A method for generating a verification packet, comprising:
For a set of a combination of a start point IP address and a start point port number, an individual area to which the plurality of rules to be verified are alone in the whole set, and a plurality of arbitrary rules among the plurality of rules are in common Select each sample point from the individual areas to which the multiple rules do not apply,
A protocol and an end point IP address are fixedly set to an attribute set in common between the rules, and a combination of a start point IP address and a start point port number is sequentially changed to each selected sample point, and A verification packet generation method for sequentially generating verification packets set by sequentially changing an end point port number within an appropriate range for each sample point.
請求項1または2記載の方法を処理装置に実行させる検証パケット発生プログラム。   A verification packet generation program for causing a processing device to execute the method according to claim 1. 請求項1または2記載の方法により順次発生される検証パケットを前記パケットフィルタに入力し、該パケットフィルタを動作させるパケットフィルタのテスト方法。   A test method for a packet filter in which verification packets sequentially generated by the method according to claim 1 or 2 are input to the packet filter and the packet filter is operated. パケットの属性に関する複数の判定条件とパケットの属性が該複数の判定条件に適合したときの該パケットの通過または破棄の動作を規定した複数のルールを設定したパケットフィルタについて、適宜の複数のルールの設定を検証するための検証パケットを発生する装置であって、
前記パケットフィルタに設定した複数のルールを記憶するパケットフィルタ設定部と、
検証パケットに付与する属性を記憶するポートスキャン設定部と、
前記パケットフィルタ設定部に記憶されている複数のルールと前記ポートスキャン設定部に記憶されている検証パケットの属性に基づき、パケットの適宜の複数の属性の組み合わせによる集合について、その全体集合の中で前記適宜の複数のルールが単独で該当する個々の領域、該適宜の複数のルールのうち任意の複数のルールが共通に該当する個々の領域、該適宜の複数のルールがいずれも該当しない領域からサンプル点をそれぞれ選択する設定解析処理部と
該適宜の複数の属性の組み合わせを該選択された各サンプル点に順次変化させて設定し、かつ該サンプル点ごとに他の属性を順次変化させて設定した検証パケットを順次発生するポートスキャン処理部と
を具備してなる検証パケット発生装置
A plurality of determination conditions related to packet attributes and a packet filter that sets a plurality of rules that define the operation of passing or discarding the packet when the packet attributes meet the plurality of determination conditions. A device that generates a verification packet for verifying settings,
A packet filter setting unit for storing a plurality of rules set in the packet filter;
A port scan setting unit for storing attributes to be added to the verification packet;
Based on the plurality of rules stored in the packet filter setting unit and the attribute of the verification packet stored in the port scan setting unit, a set of appropriate combinations of a plurality of attributes in the packet is included in the entire set. From the individual areas to which the appropriate plurality of rules are independently applied, the individual areas to which any of the appropriate plurality of rules are commonly applied, and the areas to which none of the appropriate plurality of rules are applicable A setting analysis processing unit for selecting each sample point;
A port scan processing unit that sequentially sets a combination of a plurality of appropriate attributes to each selected sample point, and sequentially generates verification packets that are set by sequentially changing other attributes for each sample point. When
Consisting comprises a verification packet generator.
パケットの属性に関する複数の判定条件とパケットの属性が該複数の判定条件に適合したときの該パケットの通過または破棄の動作を規定した複数のルールを設定したパケットフィルタについて、該パケットフィルタに設定されているWAN側フィルタの全ルールのうちWAN側からLAN側へ通信されるパケットに適用されかつプロトコルおよび終点IPアドレスがルール相互間で共通に設定されている複数のルールの設定を検証するための検証パケットを発生する装置であって、
前記パケットフィルタに設定した複数のルールを記憶するパケットフィルタ設定部と、
検証パケットに付与する属性としてプロトコル、終点IPアドレスおよびポートスキャン範囲を記憶するポートスキャン設定部と、
前記パケットフィルタ設定部に記憶されている複数のルールのうち前記ポートスキャン設定部に記憶されている検証パケットのプロトコルが適用される全ルールについて、始点IPアドレスと始点ポート番号の組み合わせによる集合について、その全体集合の中で前記検証対象の複数のルールが単独で該当する個々の領域、該複数のルールのうち任意の複数のルールが共通に該当する個々の領域、該複数のルールがいずれも該当しない領域からサンプル点をそれぞれ選択する設定解析処理部と
プロトコルと終点IPアドレスを前記ルール相互間で共通に設定されている属性に固定設定し、かつ始点IPアドレスと始点ポート番号の組み合わせを前記選択された各サンプル点に順次変化させて設定し、かつ該サンプル点ごとに終点ポート番号を前記ポートスキャン範囲で順次変化させて設定した検証パケットを順次発生するポートスキャン処理部と
を具備してなる検証パケット発生装置
A packet filter in which a plurality of determination conditions relating to packet attributes and a plurality of rules defining the operation of passing or discarding the packet when the packet attributes meet the plurality of determination conditions is set in the packet filter. For verifying the setting of a plurality of rules that are applied to a packet communicated from the WAN side to the LAN side among all the rules of the WAN side filter and the protocol and the destination IP address are commonly set between the rules. A device that generates a verification packet,
A packet filter setting unit for storing a plurality of rules set in the packet filter;
A port scan setting unit for storing a protocol, an end point IP address, and a port scan range as attributes to be given to the verification packet;
Of all the rules to which the protocol of the verification packet stored in the port scan setting unit is applied among the plurality of rules stored in the packet filter setting unit, for a set of combinations of the start point IP address and the start point port number, In the whole set, individual areas to which the plurality of rules to be verified correspond independently, individual areas to which any of the plurality of rules correspond in common, and all of the plurality of rules correspond A setting analysis processing unit for selecting each sample point from a region not to be
A protocol and an end point IP address are fixedly set to an attribute set in common between the rules, and a combination of a start point IP address and a start point port number is sequentially changed to each selected sample point, and A port scan processing unit for sequentially generating verification packets set by sequentially changing an end point port number in the port scan range for each sample point ;
Consisting comprises a verification packet generator.
請求項または記載の検証パケット発生装置と、
該検証パケット発生装置により順次発生される検証パケットを前記パケットフィルタに入力し、該パケットフィルタを動作させてポートスキャンを実行すパケット転送処理部と、
該ポートスキャンによる各検証パケットの通過、破棄の結果を入力し、この結果に基づき通過したパケットの情報を出力するポートスキャン処理部と、
該ポートスキャン処理部から出力される通過したパケットの情報をコンピュータに送出するポートスキャン結果出力部と
を具備してなるパケットフィルタのテスト装置
A verification packet generator according to claim 5 or 6 ,
The verification packets sequentially generated by the verification packet generator input to the packet filter, and packet transfer processing unit to run a port scan by operating the packet filter,
A port scan processing unit for inputting a result of passing and discarding each verification packet by the port scan and outputting information of the passed packet based on the result;
A port scan result output unit for sending information of passed packets output from the port scan processing unit to a computer;
A packet filter testing apparatus comprising:
JP2006315710A 2006-11-22 2006-11-22 Packet filter verification packet generation method, verification packet generation device, verification packet generation program, packet filter test method, packet filter test device Active JP4518070B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006315710A JP4518070B2 (en) 2006-11-22 2006-11-22 Packet filter verification packet generation method, verification packet generation device, verification packet generation program, packet filter test method, packet filter test device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006315710A JP4518070B2 (en) 2006-11-22 2006-11-22 Packet filter verification packet generation method, verification packet generation device, verification packet generation program, packet filter test method, packet filter test device

Publications (2)

Publication Number Publication Date
JP2008131463A JP2008131463A (en) 2008-06-05
JP4518070B2 true JP4518070B2 (en) 2010-08-04

Family

ID=39556854

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006315710A Active JP4518070B2 (en) 2006-11-22 2006-11-22 Packet filter verification packet generation method, verification packet generation device, verification packet generation program, packet filter test method, packet filter test device

Country Status (1)

Country Link
JP (1) JP4518070B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ES2391366T3 (en) * 2008-05-07 2012-11-23 Telefonaktiebolaget Lm Ericsson (Publ) Test methods, systems and provisions to verify compliance with requirements specifications
CN106549793B (en) 2015-09-23 2020-08-07 华为技术有限公司 Flow control method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040122967A1 (en) * 2002-12-23 2004-06-24 Bressler Robert D. Method and apparatus for managing packet flows for multiple network services

Also Published As

Publication number Publication date
JP2008131463A (en) 2008-06-05

Similar Documents

Publication Publication Date Title
JP5462905B2 (en) Protocol emulator
US8005945B2 (en) Aggregating policy criteria parameters into ranges for efficient network analysis
US9660886B1 (en) Scalable network route analysis
US7782859B2 (en) Enhanced packet classification
JP6308601B2 (en) Packet processing method and device
CN109218301B (en) Method and device for mapping frame header defined by software between multiple protocols
CN110635914B (en) Weak password detection method
JP4616718B2 (en) Network equipment
CN103339887A (en) Method for optimizing a network prefix-list search
JP2003188900A (en) System, method and program for estimating address, and network device
CN108647043A (en) A kind of realization method and system of order line input
DK2460317T3 (en) System and method for identifying multiple paths between network nodes
JP4518070B2 (en) Packet filter verification packet generation method, verification packet generation device, verification packet generation program, packet filter test method, packet filter test device
WO2016013177A1 (en) Network inspection apparatus, network inspection method, and storage medium
KR101323852B1 (en) Virtual Firewall system and the control method for using based on commonness security policy
EP2302874B1 (en) Communication system, terminal device, and communication method for RTP/RTCP data transmission over a NAT
CN109525683B (en) Vacant address diving method and device for IPV4 address of metropolitan area network
CN105763663B (en) A kind of private net address management method, control device and the network equipment
WO2022252634A1 (en) Data flow transmission method and apparatus, computer device, and storage medium
WO2021240752A1 (en) Protocol identification device, protocol identification method, and program
JPWO2010086982A1 (en) Information processor and communication control method thereof
CN113992507B (en) Method, device, server and storage medium for determining default parameter values
Clark Firewall policy diagram: Novel data structures and algorithms for modeling, analysis, and comprehension of network firewalls
RU2710302C1 (en) Method of organizing operation of network equipment components for processing network packets (4 versions)
JP2011193327A (en) System and method for simulating network

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100127

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100202

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100405

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: 20100427

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100510

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130528

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4518070

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140528

Year of fee payment: 4