Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5778066B2 - Authentication method using a firewall - Google Patents
[go: Go Back, main page]

JP5778066B2 - Authentication method using a firewall - Google Patents

Authentication method using a firewall Download PDF

Info

Publication number
JP5778066B2
JP5778066B2 JP2012076097A JP2012076097A JP5778066B2 JP 5778066 B2 JP5778066 B2 JP 5778066B2 JP 2012076097 A JP2012076097 A JP 2012076097A JP 2012076097 A JP2012076097 A JP 2012076097A JP 5778066 B2 JP5778066 B2 JP 5778066B2
Authority
JP
Japan
Prior art keywords
authentication
packet
firewall
port number
key table
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
JP2012076097A
Other languages
Japanese (ja)
Other versions
JP2013206260A (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.)
Nippon Telegraph and Telephone West Corp
Original Assignee
Nippon Telegraph and Telephone West 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 Nippon Telegraph and Telephone West Corp filed Critical Nippon Telegraph and Telephone West Corp
Priority to JP2012076097A priority Critical patent/JP5778066B2/en
Publication of JP2013206260A publication Critical patent/JP2013206260A/en
Application granted granted Critical
Publication of JP5778066B2 publication Critical patent/JP5778066B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Description

この発明は、中継装置がポートを開ける際の認証方法に関する。   The present invention relates to an authentication method used when a relay device opens a port.

従来のネットの利用は、ユーザ端末側からサーバへリクエストを送り、そのレスポンスを受け取るものであった。しかし、スマートフォンの普及に伴って、外出先から自宅のネットワークにリモートアクセスして自宅のホームネットワークファイルサーバを利用したり、IP電話ソフトを使って通話させるために外部から通話を呼び出したりといった形で、外部からの要求に応じてソフトウェアを起動させる利用方法が拡大している。   Conventional use of the net involves sending a request from the user terminal side to the server and receiving a response. However, with the spread of smartphones, users can remotely access their home network from outside to use their home network file server, or call from outside to make calls using IP phone software. The usage methods for starting up software in response to external requests are expanding.

しかし、そのような外部ネットワークからのアクセスを受けるためにポートを開け放っておくと、そこがセキュリティホールとなってしまう。これに対して、そのポートで待ち受けているアプリケーションの中でユーザID/パスワードなどを用いて認証することによりセキュリティを確保する手法が知られている。しかしこの手法が安全であるには、そのアプリケーションがパケットを受信してから認証を行うまでのシーケンスの中にセキュリティホールが存在しないことが前提となる。実際にはそのようなネットワークソフトウェアにセキュリティホールが無いことは担保できない。   However, if you leave the port open to receive access from such an external network, it becomes a security hole. On the other hand, there is known a technique for securing security by performing authentication using a user ID / password in an application waiting at the port. However, in order for this method to be secure, it is assumed that there is no security hole in the sequence from when the application receives the packet until authentication is performed. In fact, it cannot be guaranteed that such network software has no security holes.

従って、通信アプリケーションで発生するセキュリティリスクを最大限に回避するには、不正パケットを当該アプリケーションに一切読み込ませないことが望ましい。そのためには、平常時はアプリケーションを停止させておき、必要に応じて立ち上げることができれば理想的である。   Therefore, in order to avoid the security risk that occurs in the communication application to the maximum extent, it is desirable that no illegal packets are read into the application. For that purpose, it is ideal if the application can be stopped during normal times and started up as needed.

これに類する方法として、特許文献1にポート開放要求の取り扱い手法が提示されている。この技術は、外部からポート開放要求を受ければ、その開放要求を認証し、認証に成功すれば配下端末リストを応答し、端末名を相手に指定させて、該当ポートを開くものである。   As a method similar to this, Patent Document 1 proposes a method for handling a port opening request. In this technology, when a port opening request is received from the outside, the opening request is authenticated, and if the authentication is successful, the subordinate terminal list is responded, the terminal name is designated as the other party, and the corresponding port is opened.

また他の方法として、特許文献2にはIP電話に関する技術として、なりすましによる不正アクセスパケットを排除するため、相手端末と音声通信を開始するIP電話端末において、音声パケットに適用すべき宛先ポート番号を互いに指定し合って、受信パケットの送信元IPアドレスと宛先ポート番号をチェックして、受信パケットが不正パケットと判断された場合は、受信パケットを廃棄するという手法が提案されている。   As another method, as a technique related to IP telephone, Patent Document 2 discloses a destination port number to be applied to a voice packet in an IP telephone terminal that starts voice communication with a partner terminal in order to eliminate unauthorized access packets due to spoofing. A method has been proposed in which the source IP address and the destination port number of the received packet are checked by specifying each other and if the received packet is determined to be an illegal packet, the received packet is discarded.

特開2008−78823号公報JP 2008-78823 A 特開2008−217668号公報JP 2008-217668 A

しかしながら、特許文献1に記載の手法では、「必要である」という事を外部から通知するために別のアプリケーションを使用する以上、そのアプリケーションにはポート開放要求を待ち受ける機能を持たせることになる。この機能そのものがセキュリティホールを有していた場合、ネットワークからのアタックを防ぎきれなくなるおそれが高くなる。   However, in the method described in Patent Document 1, as long as another application is used to notify that it is “necessary” from the outside, the application has a function of waiting for a port opening request. If this function itself has a security hole, there is a high possibility that attacks from the network cannot be prevented.

また、特許文献2に記載の手法では、認証行為をアクセス対象機能(SIP機能)自身が実施している。該当パケットを対象機能自身が受け取って処理してしまっているため、パケットの受信から認証完了までのフローにセキュリティホールが内在していた場合に対応できなかった。   In the technique described in Patent Document 2, the authentication target is performed by the access target function (SIP function) itself. Since the target function itself receives and processes the corresponding packet, it was not possible to handle the case where a security hole was inherent in the flow from the reception of the packet to the completion of authentication.

そこでこの発明は、セキュリティリスクがより低い手法で、外部からのリクエストにより通信を開始できるようにすることを目的とする。   Accordingly, an object of the present invention is to enable communication to be started by a request from the outside by a technique with a lower security risk.

この発明は、外部ネットワークからアクセスしようとする外部リクエスト端末と、ファイアウォールを有しそのアクセスを受け付ける中継装置やユーザ端末などの通信機能付き機器とに、予め定めた認証の書式を記録しておき、
上記外部リクエスト端末は、その認証の書式に沿った認証用データを、TCPやUDPなどのパケットのポート番号として埋め込み可能なサイズに分割し、一連のパケットのポート番号部分に埋め込み順番に連続して上記機器へ送出し、
上記通信機能付き機器は、ファイアウォールで受信したパケットのポート番号の連続するパタンを監視して、記録しておいた上記の認証の書式を参照し、そのパタンが上記の認証の書式に沿ったものであることを検出したら、アクセスを受け入れるために上記ファイアウォールにアクセスのためのポートを開放したり、アクセスを受け入れる所定のソフトを立ち上げたりするようにすることで、上記の課題を解決したのである。
The present invention records a predetermined authentication format in an external request terminal to be accessed from an external network and a communication function device such as a relay device or a user terminal that has a firewall and receives the access,
The external request terminal divides authentication data in accordance with the authentication format into a size that can be embedded as a port number of a packet such as TCP or UDP, and continuously in the port number portion of a series of packets in the order of embedding. Send to the above equipment,
The device with the communication function monitors the continuous pattern of the port numbers of the packets received by the firewall, refers to the recorded authentication format, and the pattern conforms to the authentication format. If this is detected, the above problem has been solved by opening the port for access to the firewall in order to accept access, or launching predetermined software that accepts access. .

すなわち、ファイアウォール機能におけるパケット情報の取得処理は必ず実施しなければならない処理であるが、上記機器で実施される実施される処理の中でも、最も早い段階で処理されるものである。そこに認証機能を持たせることによって、セキュリティホールに繋がるような新たな受け付け用ポートの常時開放を行わなくても、リクエストの受付が可能となる。ファイアウォール機能が触れる情報は、IPヘッダやTCP/UDPヘッダに」設定されている、IPアドレスやポート番号といったごく単純な情報であるため、悪意あるユーザがパケットを工夫してバッファオーバーフローなどの不具合を誘発させることが難しい。もしIPヘッダやTCP/UDPヘッダなどの基本的な情報を改変すると、途中のルータなどで正しくルーティングされなかったりしてそもそも上記機器まで到達させることが難しくなるので、外部からアクセスする際にこれらの部分に異常値を紛れ込ませられる可能性は低い。このためファイアウォール自体の高い安全性も保持できる。また、一つのパケットのポート番号ではなく、連続するパケットのポート番号を一揃えで認証することで、認証に必要なbit数を確保することができ、総当たりで突破することも難しいものとすることができる。   In other words, the packet information acquisition process in the firewall function is a process that must be performed, but is performed at the earliest stage among the processes that are performed by the device. By providing an authentication function there, it is possible to accept a request without always opening a new accepting port that leads to a security hole. The information touched by the firewall function is very simple information such as the IP address and port number set in the IP header and TCP / UDP header, so malicious users can devise packets to prevent problems such as buffer overflow. Difficult to trigger. If basic information such as IP header or TCP / UDP header is modified, it will be difficult to reach the above equipment in the first place because it is not routed correctly in the middle of the router. It is unlikely that an abnormal value will be inserted into the part. For this reason, the high security of the firewall itself can be maintained. In addition, the number of bits required for authentication can be secured by authenticating the port numbers of consecutive packets instead of the port number of one packet, making it difficult to break through. be able to.

具体的には、上記機器のファイアウォール機能部に、受信したパケットのポート番号を取得するパケット情報取得部を持たせ、
また、ファイアウォール機能部によってソフトウェアとして外部から守られた部分に、認証のための数列を記録する鍵テーブルと、前記の取得されたパケットのポート番号の連続を、その鍵テーブルと比較参照するパタン解析部とを有する認証機能部を持たせ、認証に成功したらファイアウォールのポートを開けたり、IP電話用ソフトなどのアクセスを受け入れるソフトウェアを起動させたりするアクセス対象機能部を実行させる。対する、外部からアクセスしようとする端末には、予め定めた認証の書式に従い上記の数列に適合したデータを連続するパケットのポート番号に埋め込んで、連続送出する認証情報埋込パケット連続送出機能を持たせる。
Specifically, the firewall function unit of the device has a packet information acquisition unit that acquires the port number of the received packet,
In addition, a key table that records a number sequence for authentication in a part that is protected externally as software by the firewall function unit, and a pattern analysis that compares and refers to a series of port numbers of the obtained packets with the key table. An authentication function unit having an access unit, and when the authentication is successful, an access target function unit that opens a firewall port or activates software that accepts access, such as IP phone software, is executed. On the other hand, the terminal to be accessed from the outside has a function for continuously sending out authentication information embedded packets in which data conforming to the above-mentioned number sequence is embedded in the port number of continuous packets in accordance with a predetermined authentication format and continuously transmitted. Make it.

ここで、認証のための数列とは、例えば16ビットで表せる範囲の数値の連続からなる数列を受信パタンとして予め取り決めておいてもよいし、認証用の共通鍵と上記機器が認識する外部リクエスト端末の送信元IPアドレスとからハッシュ値を生成させて16bitごとに分けた数列を認証のたびに自動的に生成するものでもよい。外部リクエスト端末がそれに適合するデータを送出する際には、その数列を個々の数値ごとに分けて連続するパケットの送信元ポート番号や宛先ポート番号の項目にそのまま埋め込むという方式や、所定の暗号化を施した上で埋め込んでも良い。例えば128bitのMD5であれば、8箇所のポート番号に埋め込むことで送出できる。上記鍵テーブルにはこの数列や変換された数字列が比較可能な形式で常時保存又は一時保存される。16bitごとに分けられた形で格納されていると比較しやすい。なお、共通鍵を用いる場合には、上記機器は鍵テーブルとは別にそれを記憶部に保存しておき、上記外部リクエスト端末も共通鍵を保持しておく必要がある。   Here, the number sequence for authentication may be determined in advance as a reception pattern, for example, a sequence of numerical values in a range that can be expressed in 16 bits, or a common key for authentication and an external request recognized by the device. A hash value may be generated from the source IP address of the terminal, and a numerical sequence divided every 16 bits may be automatically generated every time authentication is performed. When an external requesting terminal sends data conforming to it, the number sequence is divided into individual numerical values and embedded in the source port number and destination port number items of consecutive packets as they are, or with predetermined encryption It may be embedded after applying. For example, a 128-bit MD5 can be sent by being embedded in eight port numbers. In the key table, the numerical sequence and the converted numeric sequence are always stored or temporarily stored in a comparable format. It is easy to compare if it is stored in a form divided into 16 bits. When a common key is used, the device must store it in a storage unit separately from the key table, and the external request terminal must also hold the common key.

上記の数列は長い方がセキュリティ強度は高くなるが、その分必要とするパケット数が増えるため、パケットロスによりパケットが届かずに認証に失敗する可能性も高くなる。このため、外部リクエスト端末は、認証用に用いる一連のパケットを、一定間隔を置きながら何度か送信するとよい。   The longer the above sequence, the higher the security strength. However, since the number of required packets increases accordingly, there is a high possibility that authentication will fail without receiving a packet due to packet loss. For this reason, the external requesting terminal may transmit a series of packets used for authentication several times at regular intervals.

この認証の書式に従ったデータの送出に用いるポート番号部分は、パケットの送信元ポート番号と宛先ポート番号との二箇所があってそれぞれ16bitの長さを持っており、いずれかを単独で認証に用いたり、両方を認証に用いてもよい。両方を用いる方が少ないパケット数でデータを送信できる。ただし、宛先ポートによってはすでに特定の番号にファイアウォールに許可ルールが設定されていたり、何らかのアプリケーションが待ち受けている可能性があるため、比較的自由に設定できる送信元ポート番号のみを認証に使うとエラーが比較的起こりにくくなる。   The port number part used for sending data in accordance with this authentication format has two locations, the source port number and the destination port number of the packet, each having a length of 16 bits. Or both may be used for authentication. If both are used, data can be transmitted with a smaller number of packets. However, depending on the destination port, there is a possibility that an allow rule is already set in the firewall for a specific number or some application may be waiting, so if only the source port number that can be set relatively freely is used for authentication, an error will occur. Is less likely to occur.

この発明により、外部のネットワークから通信を行う場合、平常時は当該通信を行うアプリケーションを停止させておいたり、ポートを閉じておいたりすることができ、セキュリティリスクを低減させることができる。そして、必要時には安全な方法でアプリケーションを外部から起動させたり、ポートを開かせたりすることができる。   According to the present invention, when communication is performed from an external network, an application that performs the communication can be stopped or a port can be closed in normal times, and a security risk can be reduced. And when necessary, you can start applications from the outside and open ports in a safe way.

この発明にかかる中継装置の機能ブロック図Functional block diagram of the relay device according to the present invention この発明の実施形態を進める際のシーケンス図Sequence diagram for advancing the embodiment of the present invention 送信元ポート番号のみを用いる場合の鍵テーブルの例Example of key table when only source port number is used ファイアウォール機能部におけるフロー例図Example flow in the firewall function section 鍵テーブルが固定である場合の認証フロー例図Example of authentication flow when key table is fixed 鍵テーブルを動的生成させる場合の認証フロー例図Example of authentication flow when key table is dynamically generated 鍵テーブルの動的生成フロー例図Example of key table dynamic generation flow

以下、この発明について具体的な実施形態を挙げて説明する。
外部ネットワーク3に接続された外部リクエスト端末2から、ファイアウォールに保護された機器にアクセスする実施形態として、ここでは中継装置1へのアクセスを行う場合を例に説明する。図1はこの実施形態でアクセスする機器である中継装置1の機能ブロック図であり、図2はこの実施形態を進める際のシーケンス図である。
Hereinafter, the present invention will be described with specific embodiments.
As an embodiment in which an external request terminal 2 connected to the external network 3 accesses a device protected by a firewall, a case where access to the relay apparatus 1 is performed will be described as an example. FIG. 1 is a functional block diagram of a relay apparatus 1 which is a device accessed in this embodiment, and FIG. 2 is a sequence diagram when proceeding with this embodiment.

中継装置1は、内部ネットワーク4と、外部ネットワーク3との間にある中継装置であり、例えば家庭用ルータなどのホームゲートウェイのようなゲートウェイとして機能する装置である。外部ネットワーク3からのアクセスに対しては、一部のパケットのみ通過させるファイアウォール機能を発揮させる。   The relay device 1 is a relay device between the internal network 4 and the external network 3, and functions as a gateway such as a home gateway such as a home router. For access from the external network 3, a firewall function that allows only a part of the packets to pass through is exhibited.

内部ネットワーク4とは、家庭用ルータなどである中継装置1で外部ネットワーク3と区切られた、ホームネットワークなどのネットワークである。一般家庭のLANや、特定の法人内LANでもこの発明は実施可能である。   The internal network 4 is a network such as a home network that is separated from the external network 3 by the relay device 1 such as a home router. The present invention can also be implemented in a general household LAN or a specific corporate LAN.

外部ネットワーク3とは、内部ネットワーク4とは中継装置1で区切られた、特定個人又は一般の法人が管理するものではなくセキュリティリスクを有するネットワークであり、一般的にはインターネットである。ただし、特定の通信事業者によって管理される広域ネットワークでも本発明は利用可能である。   The external network 3 is a network that is separated from the internal network 4 by the relay device 1 and is not managed by a specific individual or a general corporation but has a security risk, and is generally the Internet. However, the present invention can also be used in a wide area network managed by a specific communication carrier.

外部リクエスト端末2は、外部ネットワーク3に直接又は間接に接続され、内部ネットワーク4の中継装置1又は内部端末5に対してアクセスを求めるものである。例えば、ファイルサーバ機能を起動させてファイルを読み出そうとするノートパソコンや、IP電話による発呼を行おうとするフィーチャーフォン、スマートフォンなどが挙げられるが、UDP/TCPパケットを送出するネットワーク機能を有する端末であれば特に限定されるものではない。携帯端末である必要もなく、デスクトップパソコンやブレードサーバなどであってもよい。   The external request terminal 2 is directly or indirectly connected to the external network 3 and requests access to the relay device 1 or the internal terminal 5 of the internal network 4. For example, a notebook personal computer that activates a file server function to read a file, a feature phone that attempts to make a call by an IP phone, a smartphone, and the like, but has a network function that transmits UDP / TCP packets If it is a terminal, it will not specifically limit. It is not necessary to be a portable terminal, and may be a desktop personal computer or a blade server.

中継装置1は、外部ネットワーク3からの通信に対して防護を行うファイアウォール機能部10と、ファイアウォール機能部10で受けた情報を元に認証を行う認証機能部20と、アプリケーションの起動やポートの開放などを行わせるアクセス対象機能部30とを有するほか、図示しないが、通信を中継するゲートウェイ機能、ルーティング機能など、中継装置として一般的な機能を有する。また、必要に応じて記憶部に後述する共通鍵を保持する。   The relay device 1 includes a firewall function unit 10 that protects against communication from the external network 3, an authentication function unit 20 that performs authentication based on information received by the firewall function unit 10, and application activation and port opening. In addition to the access target function unit 30 that performs the above-described functions, although not shown, it has general functions as a relay device such as a gateway function and a routing function that relay communication. Further, a common key described later is held in the storage unit as necessary.

ファイアウォール機能部10は、特定の宛先ポート番号以外のパケットを破棄する等といった所定の条件に従い不要或いは危険なパケットを破棄するパケット破棄機能を実行し、中継装置1自身及び内部ネットワーク4内に、不正なパケットが侵入することを防止するソフトウェア又はその機能を有するチップなどのハードウェアである。ただし、パケットの破棄の有無に関わらず、受信したパケットのヘッダ部分の情報を取得するパケット情報取得部11を有し、その情報を次の認証機能部20へ渡すパケット情報受渡機能も実行する。   The firewall function unit 10 executes a packet discard function that discards unnecessary or dangerous packets in accordance with predetermined conditions such as discarding packets other than a specific destination port number. This is software such as a software that prevents intrusion of a packet or a hardware such as a chip having the function. However, regardless of whether or not the packet is discarded, the packet information acquisition unit 11 that acquires information of the header portion of the received packet is included, and a packet information transfer function that passes the information to the next authentication function unit 20 is also executed.

認証機能部20は、予め定めた認証の書式に従った数列を記録する鍵テーブル22と、
前記の取得されたパケットのうち同一の送信元アドレスから送信されたものに含まれるポート番号の連続を、前記の鍵テーブルと比較参照して認証するか否かを判断するパタン解析部21とを有する。鍵テーブル22は、最初から定めた数列であったり、予め外部リクエスト端末2と共有した共通鍵を用いてハッシュ値を算出する数列生成機能を実行することで生成させて一時的に記録するものであったりする。パタン解析部21は、その鍵テーブル22とパケット情報取得部11の前記パケット情報受渡機能から送られてきたパケットの情報とを比較、或いは計算処理して、送られてきたパケットのポート番号の連続によるパタンが認証の条件を満たしているか否かを判断する認証解析機能を実行し、認証されたら後述のアクセス対象機能部30へ実行指示を出す実行指示機能を実行する。また、処理に時間制限を設けるためのタイマ24を有する。
The authentication function unit 20 includes a key table 22 that records a number sequence according to a predetermined authentication format,
A pattern analysis unit 21 that determines whether or not to authenticate a continuation of port numbers included in packets acquired from the same source address among the acquired packets by comparing with the key table. Have. The key table 22 is a numerical sequence determined from the beginning, or is generated by executing a numerical sequence generation function for calculating a hash value using a common key shared in advance with the external request terminal 2 and is temporarily recorded. There is. The pattern analysis unit 21 compares or calculates the key table 22 and the packet information sent from the packet information delivery function of the packet information acquisition unit 11, and continues the port numbers of the sent packets. An authentication analysis function for determining whether or not the pattern according to the above satisfies an authentication condition is executed, and when authenticated, an execution instruction function for issuing an execution instruction to the access target function unit 30 described later is executed. In addition, it has a timer 24 for setting a time limit for processing.

上記の鍵テーブル22の例を図3に示す。この例では、受信すべきパケットのプロトコルがUDPで、宛先ポート番号は特に限定されないが、同一の送信元IPアドレスから発せられた連続して受信した8つのパケットの送信元ポート番号が順番に「10001,10002,10001,10010,20000,12345,20000,10001」であった場合にのみ認証を通過させるものである。順序を考慮しなくても実施可能であるが、パタン解析部21の負担が上がることと、セキュリティは低下するため、順番も鍵テーブル22の通りとなっていることが好ましい。   An example of the key table 22 is shown in FIG. In this example, the protocol of the packet to be received is UDP, and the destination port number is not particularly limited. However, the source port numbers of eight consecutively received packets issued from the same source IP address are sequentially listed as “ The authentication is allowed to pass only when “10001, 10002, 10001, 10010, 20000, 12345, 20000, 10001”. Although it is possible to implement without considering the order, it is preferable that the order is as shown in the key table 22 because the burden on the pattern analysis unit 21 is increased and the security is reduced.

なお、このような鍵テーブル22又はその元となる共通鍵は、複数個あってもよい。鍵テーブル22ごとに認証通過後に起動させるアプリケーションを変えたり、開放させるポートを変えたりすることができる。   Note that there may be a plurality of such key table 22 or a common key that is the basis of the key table 22. For each key table 22, it is possible to change an application to be activated after passing the authentication or change a port to be opened.

また、上記の鍵テーブル22の例としては、このような固定的なテーブルではなく、共通鍵のみ保持しておき、パケットを受信しはじめたら、そのパケットのIPヘッダに含まれる送信元IPアドレスなどの変動要素と共通鍵とから動的に鍵テーブル22を生成してもよい。この場合、認証を行う外部リクエスト端末2も、共通鍵と自身のIPアドレスから同じ文字列を生成して、順にパケットに載せて送出することで認証が可能となる。   In addition, as an example of the key table 22 described above, instead of such a fixed table, only a common key is held, and when a packet starts to be received, a source IP address included in the IP header of the packet, etc. Alternatively, the key table 22 may be dynamically generated from the variable elements and the common key. In this case, the external request terminal 2 that performs authentication can also authenticate by generating the same character string from the common key and its own IP address, and sequentially sending them in the packet.

アクセス対象機能部30は、外部リクエスト端末2が起動を求めるアプリケーションを起動させたり、所定のポートを開放したりといった、外部リクエスト端末2が必要とする通信確立のための処理を実行する。アプリケーションを起動させる場合、中継装置1が内部端末5に起動させる場合と、中継装置1自体がサーバとしてサービスを起動させる場合と、内部端末5自体が自らアプリケーションを起動する場合とがある。また、このアクセス対象機能部30が実際に実行する形態は一つである必要はなく、認証されたパタン(すなわち鍵テーブル22の中身や共通鍵の種類など)の違いによって、異なるアプリケーションを起動させたり、異なるポートを開放させたりしてもよい。アクセスを求める外部リクエスト端末2の求める機能は特に制限なく、ファイルサーバ機能やIP電話機能や、ネットワークに繋がったHDDレコーダの予約など、内部ネットワーク4のどの内部端末5次第でもあり、必要な機能は様々だからである。   The access target function unit 30 executes processing for establishing communication required by the external request terminal 2, such as starting an application that the external request terminal 2 requests to start or opening a predetermined port. When the application is activated, there are a case where the relay apparatus 1 activates the internal terminal 5, a case where the relay apparatus 1 itself activates a service as a server, and a case where the internal terminal 5 itself activates the application itself. Further, the access target function unit 30 need not actually execute one form, and different applications can be started depending on the authenticated pattern (that is, the contents of the key table 22 or the type of the common key). Or open different ports. The function requested by the external request terminal 2 that requests access is not particularly limited, and depends on any internal terminal 5 in the internal network 4 such as a file server function, an IP telephone function, and reservation of an HDD recorder connected to the network. Because it is various.

このような中継装置1に対して、外部リクエスト端末2は、そのままでは必要とする機能を起動させられず、アクセスできないので、中継装置1は一定のセキュリティを保持している。例えば、IP電話用アプリケーションが内部端末5で立ち上がっていなければ、パケットを送っても意味がない。そこで、連続するパケットに、上記の鍵テーブル22に対応した認証情報を載せて送出する。ここで、受信パタンが固定されている場合はそのパタン通りに送出し、共通鍵と送信元IPアドレスから動的にテーブルを生成する場合は、中継装置1にパケットが到着する際の送信元IPアドレスを取得して、算出し、動的な数字列であるテーブルを生成させる。   Since the external request terminal 2 cannot activate the necessary function as it is and cannot access the relay apparatus 1 as it is, the relay apparatus 1 maintains a certain level of security. For example, if the IP telephone application is not started up in the internal terminal 5, it does not make sense to send a packet. Therefore, the authentication information corresponding to the key table 22 is put on successive packets and transmitted. Here, when the reception pattern is fixed, it is transmitted as it is, and when the table is dynamically generated from the common key and the transmission source IP address, the transmission source IP when the packet arrives at the relay device 1 An address is acquired, calculated, and a table that is a dynamic number sequence is generated.

このパケットを受信するファイアウォール機能部10の動作フローについて、図4を用いて説明する。まず(S101)、外部ネットワーク3から送信されてきたパケットをファイアウォール機能部10にて受信する(S102)。なお、実際には中継装置1の中ではネットワークインターフェース部分が最初に受信することになるが、ここでは信号をパケットの形に復元した以降の扱いについて述べる。ファイアウォール機能部10のパケット情報取得部11は、パケットのヘッダ情報を取得する(S103)。ここでパケットのペイロードまでチェックしないことによりファイアウォール機能部10のセキュリティを維持することが望ましい。このヘッダ情報を得た後、次の二つの処理(S104及びS111)を並列に、又は遅延しすぎない程度に前後して進行させる。すなわち、S104及びS111はどちらが先でも構わない。   The operation flow of the firewall function unit 10 that receives this packet will be described with reference to FIG. First (S101), the firewall function unit 10 receives a packet transmitted from the external network 3 (S102). In practice, the network interface portion is received first in the relay device 1, but here, the handling after the signal is restored to the packet form will be described. The packet information acquisition unit 11 of the firewall function unit 10 acquires packet header information (S103). Here, it is desirable to maintain the security of the firewall function unit 10 by not checking the payload of the packet. After obtaining this header information, the next two processes (S104 and S111) are advanced in parallel or back and forth so as not to be over-delayed. In other words, either of S104 and S111 may be performed first.

このS104で実行するファイアウォール処理機能は、一般的なファイアウォールと同様に、所定のファイアウォールのルールに従ったパケットの中継又は破棄である。パケット情報取得部11で得たパケットのヘッダ情報から、中継を認めていない宛先ポート番号のパケットや、アクセスを許否する送信元IPアドレスのパケットなどを破棄することで、中継装置1より中の内部ネットワーク4のセキュリティを維持する。一方で、中継が認められているポート番号及びアドレスを有するパケットは中継する。ファイアウォールの基本的機能としてはそれで完了となる(S105)。   The firewall processing function executed in S104 is relaying or discarding a packet in accordance with a predetermined firewall rule, like a general firewall. By discarding the packet of the destination port number that is not permitted to be relayed or the packet of the transmission source IP address that is permitted to access from the header information of the packet obtained by the packet information acquisition unit 11, the internal content from the relay device 1 Maintain the security of network 4. On the other hand, a packet having a port number and an address for which relaying is permitted is relayed. This completes the basic function of the firewall (S105).

ファイアウォール機能部10は、上記のパケットの中継又は破棄と、並列又は前後して、パケット情報取得部11で得られたパケットのヘッダ情報(基本的には「IPヘッダ」「UDPヘッダ」「TCPヘッダ」であり、以下、まとめて「パケット情報」と略記することがある。)を認証機能部20のパタン解析部21へ通知するパケット情報通知機能を実行する(S111)。ここで通すのはパケットそのものではなく、抽出したヘッダの情報のみであり、バッファオーバーフローによって突破される可能性を低く抑えている。なお、通知は1つのパケットを受信するごとに行い、ファイアウォール機能部10自身でバッファに一時保持して複数のパケット分の情報をまとめて送ることもできる。   The firewall function unit 10 performs packet header information (basically “IP header”, “UDP header”, “TCP header”) obtained by the packet information acquisition unit 11 in parallel with or before and after the relay or discard of the packet. The packet information notification function for notifying the pattern analysis unit 21 of the authentication function unit 20) is executed (S111). Here, only the extracted header information is passed, not the packet itself, and the possibility of breakthrough due to buffer overflow is kept low. The notification is performed every time one packet is received, and the firewall function unit 10 itself can temporarily hold the information in a buffer and send information for a plurality of packets collectively.

この通知を受けて次の認証処理へ移る(S112→S154)。認証機能部20における実施形態は、鍵テーブル22の中身が予め固定されている場合と、動的に生成する場合との二通りが挙げられる。先に、図5を用いて鍵テーブル22の数列が予め設定されている場合のフローについて説明し、次に図6及び7を用いて鍵テーブル22を動的生成する場合のフローについて説明する。   In response to this notification, the process proceeds to the next authentication process (S112 → S154). In the embodiment of the authentication function unit 20, there are two types of cases where the contents of the key table 22 are fixed in advance and when the contents are dynamically generated. First, the flow when the number sequence of the key table 22 is set in advance will be described with reference to FIG. 5, and the flow when the key table 22 is dynamically generated will be described with reference to FIGS.

図5は、鍵テーブル22の数列が予め設定されている場合の、認証機能部20における処理フロー図である。フローにおける変数iの初期値は1(S152)、送信元アドレスを格納する変数aの初期値はnullである(S153)。この状態で、パケット情報取得部11から得たパケットのヘッダ情報を取得して処理を開始する(S112=S154)。   FIG. 5 is a processing flow diagram in the authentication function unit 20 when the numerical sequence of the key table 22 is preset. The initial value of the variable i in the flow is 1 (S152), and the initial value of the variable a for storing the transmission source address is null (S153). In this state, the header information of the packet obtained from the packet information obtaining unit 11 is obtained and processing is started (S112 = S154).

フローとしては、ここで後述するタイマ24による制限時間が満了したか否かを判断し、満了していれば別フローへ移る(S155→Yes,S156)。初期時点ではタイマ24による制限時間が設定されていないのでここは次へ移る(S155→No)。アイドル時は、パケット情報取得部11からパケット情報が通知されるまで待機する(S157→No→S158→S154)。パケット情報が通知されたら(S157→Yes)、処理を開始する(S161)。   As the flow, it is determined whether or not the time limit set by the timer 24 described later has expired, and if it has expired, the flow proceeds to another flow (S155 → Yes, S156). Since the time limit set by the timer 24 is not set at the initial time, the process proceeds to the next step (S155 → No). When idling, it waits until packet information is notified from the packet information acquisition unit 11 (S157 → No → S158 → S154). When the packet information is notified (S157 → Yes), the process is started (S161).

初期時点ではi=1であるので(S161→Yes)、送信元アドレスのチェック(後述するがS162で行う。)を省き、パケット情報に含まれるポート番号(仮に、送信元ポート番号又は宛先ポート番号のみを使う場合を想定する。)を、鍵テーブル22のi=1番目のエントリと比較する(S163)。一致していなければ(S163→No)、それは本発明を利用した認証のためのパケットではないと判断して(S164→S172)、設定値は初期値のままで(S173,S174)タイマ24も発動させていないが(S175)、そのまま最初に戻る(S176→S154)。鍵テーブル22のi=1番目のエントリと一致していれば(S163→Yes)、ここでは最初のエントリなので(S165→Yes)、当該パケットの送信元アドレスを変数「a」に代入し(S166)、タイマ24による時間カウントを開始する(S167)。これはすなわち、所定の時間内に同一の送信元アドレスから来たパケットについてのみ、認証のために鍵テーブル22のエントリと一致しているかを続けて確認するための条件である。基本的に鍵テーブル22のエントリは、偶然の一致での突破を極めて起こりにくくするために複数個からなっており、エントリ数は1ではないため(S168→No)、変数iを+1して(S169)、次のパケットを待つ(S170→S154)。   Since i = 1 at the initial time (S161 → Yes), the source address check (which will be described later in S162) is omitted, and the port number included in the packet information (assuming source port number or destination port number) Is compared with the i = 1st entry in the key table 22 (S163). If they do not match (S163 → No), it is determined that the packet is not for authentication using the present invention (S164 → S172), and the set value remains the initial value (S173, S174). Although not activated (S175), the process returns to the beginning (S176 → S154). If i = 1 in the key table 22 matches (S163 → Yes), it is the first entry here (S165 → Yes), so the transmission source address of the packet is substituted into the variable “a” (S166). ), The timer 24 starts counting time (S167). In other words, this is a condition for continuously confirming whether only packets coming from the same source address within a predetermined time match the entry in the key table 22 for authentication. Basically, there are a plurality of entries in the key table 22 in order to make it difficult to break through accidental coincidence, and the number of entries is not 1 (S168 → No), so the variable i is incremented by 1 ( S169) Waits for the next packet (S170 → S154).

二つ目以降のパケット待ちの折に、タイマ24によって先に定められた制限時間がすでに経過していれば(S155→Yes)、タイムアウトとみなして(S156→S164)、i=1に戻し(S173)、変数「a」から送信元アドレスをクリアし(S174)、タイマ24による時間をリセットして(S175),再び鍵テーブル22の一つ目のエントリに一致するパケットが来るのを待つ(S176→S154→S155→S157→S158→S154)。   If the time limit previously determined by the timer 24 has already passed during the second and subsequent packet waits (S155 → Yes), it is regarded as a timeout (S156 → S164), and i = 1 is returned ( (S173), the transmission source address is cleared from the variable “a” (S174), the time by the timer 24 is reset (S175), and it waits again for a packet that matches the first entry in the key table 22 (S175). S176 → S154 → S155 → S157 → S158 → S154).

タイマ24による制限時間内で(S155→No)次のパケットを受け取ったら(S157→Yes)、今度は(S161→No)そのパケットの送信元アドレスが、変数「a」に格納した先のパケットの送信元アドレスと一致するか否かを判断する(S162)。一致しなければ(S162→No)、それは現在認証保留中の一連のパケットとは別の送信元から発せられたものであるため、認証を行わず次のパケットを待つ(S163→S154)。ここはすなわち、二つ以上の送信元アドレスからの認証を同時に受け付けて処理が錯綜することを避けるためのフローである。この場合、仮に後から認証を行おうとした送信元は最初から一連のパケットを再送信して認証を試みることになる。   When the next packet is received within the time limit set by the timer 24 (S155 → No) (S157 → Yes), this time (S161 → No), the source address of the packet is the value of the previous packet stored in the variable “a”. It is determined whether or not the source address matches (S162). If they do not match (S162 → No), it originates from a different source than the series of packets that are currently pending authentication, so authentication is not performed and the next packet is awaited (S163 → S154). In other words, this is a flow for avoiding complicated processing by simultaneously accepting authentications from two or more source addresses. In this case, a transmission source that intends to authenticate later attempts to authenticate by retransmitting a series of packets from the beginning.

送信元アドレスが変数「a」に格納した先の送信元アドレスと一致していれば(S162→Yes)、引き続いて、そのパケットのヘッダの送信元ポート番号が、鍵テーブル22のi番眼のエントリと一致しているか否かを判断する(S163)。一致していなければ(S163→No)、そこまでの一致が偶然であったか、あるいは認証のミスであるか、いずれにしても認証の失敗として(S164→S172)、変数とタイマを初期値に戻して(S173〜S175)、次のパケットを待つ(S176→S154)。一致していれば(S163→Yes)、i番目までは鍵テーブル22のエントリと一致したということになる(S165→No)。そこまでが鍵テーブル22のエントリの全てでなければ(S168→No)、変数iに+1して(S169)認証作業を続ける。その時点のiが鍵テーブル22のエントリ数に到達していたら(S168→Yes)、認証成功と判断して(S171)、アクセス対象機能部30を起動させ、必要なポートを開放する。その後、次の認証に備えて変数をリセットする(S173〜S175)。   If the transmission source address matches the previous transmission source address stored in the variable “a” (S162 → Yes), the transmission source port number of the packet header is changed to the i-th item in the key table 22. It is determined whether or not the entry matches (S163). If they do not match (S163 → No), whether the match up to that point was accidental or an authentication error, either way, it is an authentication failure (S164 → S172), and the variables and timers are returned to their initial values. (S173 to S175), and waits for the next packet (S176 → S154). If they match (S163 → Yes), it means that the entries in the key table 22 match up to the i-th (S165 → No). If all the entries in the key table 22 have not been reached (S168 → No), the variable i is incremented by 1 (S169) and the authentication operation is continued. If i at that time has reached the number of entries in the key table 22 (S168 → Yes), it is determined that the authentication is successful (S171), the access target function unit 30 is activated, and a necessary port is opened. Thereafter, the variables are reset in preparation for the next authentication (S173 to S175).

なお、この図5のフローで、宛先ポート番号と送信元ポート番号との両方を用いる場合は、いずれのポート番号を先に取り扱うものかを、送信する外部リクエスト端末2と中継装置1との両方に同一の設定で保存しておき、S161のパケット情報との鍵テーブル22のエントリとの対比を、i番目だけでなく(i+1)番目と同時に行い、S169のiの加算を+1ではなく+2とし、S168の判断を「鍵テーブル22のエントリ数は(i+1)以下か?」と変更する。   When both the destination port number and the transmission source port number are used in the flow of FIG. 5, both the external request terminal 2 and the relay device 1 that transmit which port number is to be handled first. And the comparison of the packet information of S161 with the entry of the key table 22 at the same time as the (i + 1) -th as well as the i-th, and the addition of i of S169 is +2 instead of +1 The determination in S168 is changed to “Is the number of entries in the key table 22 equal to or less than (i + 1)?”.

図6は、鍵テーブル22を生成する場合の認証機能部20における処理フロー図である。ただしこのフローを実行する前に、認証しようとする外部リクエスト端末2のIPアドレスの条件値を保有しておくとよい。具体的には、特定の携帯電話キャリアのIPアドレス範囲や、特定のプロバイダ、特定の法人が保有するIPアドレス範囲を保有しておき、サービスの対象となるそれらのIPアドレスに対してのみ本発明を実行することができる。   FIG. 6 is a processing flowchart in the authentication function unit 20 when the key table 22 is generated. However, before executing this flow, it is preferable to hold the condition value of the IP address of the external request terminal 2 to be authenticated. Specifically, the present invention holds only an IP address range of a specific mobile phone carrier, an IP address range possessed by a specific provider or a specific corporation, and only those IP addresses to be serviced. Can be executed.

まず(S211)、フローにおける変数iの初期値は1(S212)、生成前に鍵テーブル22をクリアする(S213)。この状態で、パケット情報取得部11から得たパケットのヘッダ情報を取得して処理を開始する(S112=S214)。   First (S211), the initial value of the variable i in the flow is 1 (S212), and the key table 22 is cleared before generation (S213). In this state, the header information of the packet obtained from the packet information obtaining unit 11 is obtained and the process is started (S112 = S214).

フローとしては、ここで後述するタイマ24による制限時間が満了したか否かを判断し、満了していれば別フローへ移る(S215→Yes,S216)。初期時点ではタイマ24による制限時間が設定されていないのでここは次へ移る(S215→No)。アイドル時は、パケット情報取得部11からパケット情報が通知されるまで待機する(S217→No→S218→S214)。パケット情報が通知されたら(S217→Yes)、送信元IPアドレスが認証対象のIPアドレスか否かを判断する(S219)。例えば携帯電話キャリアが違ったり、プロバイダが違うなど、認証対象のIPアドレスでなければ(S219→No)、当該パケットは無視して再びパケットの通知を待つ(S220→S214)。一方、認証対象のIPアドレスであれば、処理を開始する(S221)。   As a flow, it is determined whether or not the time limit set by the timer 24 described later has expired, and if it has expired, the flow proceeds to another flow (S215 → Yes, S216). Since the time limit set by the timer 24 is not set at the initial time point, the process proceeds to the next step (S215 → No). When idling, it waits until packet information is notified from the packet information acquisition unit 11 (S217 → No → S218 → S214). When the packet information is notified (S217 → Yes), it is determined whether or not the transmission source IP address is an IP address to be authenticated (S219). For example, if the IP address is not the authentication target (eg, mobile phone carrier is different or provider is different) (S219 → No), the packet is ignored and the packet notification is awaited again (S220 → S214). On the other hand, if the IP address is an authentication target, the process is started (S221).

初期時点ではi=1であるので(S221→Yes)、鍵テーブル22の動的な生成処理を行う(S222)。   Since i = 1 at the initial time (S221 → Yes), the key table 22 is dynamically generated (S222).

この動的生成のフローについて図7を用いて説明する。まず(S251)、取得した送信元IPアドレスと共通鍵とからハッシュ値を計算する(S252)。また、新たに生成することになるので鍵テーブル22はここで初期化する(S253)。ここで、中継装置1と外部リクエスト端末2とが認証のために使用するポート番号がいずれかによって扱いが変わる(S254→S255〜S257)。送信元ポート番号のみを認証に用いる場合は、鍵テーブル22に対して、上記の算出したハッシュ値を2バイト(16bit)ずつに分割した値を、送信元ポート番号の項目に割り当て設定したエントリを追加する(S255)。このとき、上記の図3のように宛先ポート番号は指定しない「any」となり、どのような値であれ条件を満たすものとなる。エントリ数は、ハッシュ値が128bitであれば、図3のように8エントリとなる。宛先ポート番号と送信元ポート番号との両方を認証に用いる場合は、鍵テーブルに対して、上記の算出したハッシュ値を2バイト(16bit)ずつに分割した値を、宛先ポート番号と、送信元ポート番号の項目に割り当て設定したエントリを追加する(S256)。順番はどちらが先でもよいが、システム全体を通してどちらが先かを統一しておく必要がある。宛先ポート番号のみを認証に用いる場合は、鍵テーブル22に対して、上記の算出したハッシュ値を2バイト(16bit)ずつに分割した値を、宛先ポート番号の項目に割り当て設定したエントリを追加する(S257)。このとき、送信元ポート番号は指定しない「any」となり、どのような値であれ条件を満たすものとなる。これらいずれかの手法で鍵テーブル22を生成する(S258)。   This dynamic generation flow will be described with reference to FIG. First (S251), a hash value is calculated from the acquired transmission source IP address and the common key (S252). Since the key table 22 is newly generated, the key table 22 is initialized here (S253). Here, the handling changes depending on which port number the relay apparatus 1 and the external request terminal 2 use for authentication (S254 → S255 to S257). When only the transmission source port number is used for authentication, an entry in which a value obtained by dividing the calculated hash value into 2 bytes (16 bits) for the key table 22 is assigned to the transmission source port number item is set. It is added (S255). At this time, as shown in FIG. 3 above, the destination port number is “any” which is not designated, and any value satisfies the condition. If the hash value is 128 bits, the number of entries is 8 entries as shown in FIG. When both the destination port number and the source port number are used for authentication, a value obtained by dividing the calculated hash value into 2 bytes (16 bits) for the key table is obtained as the destination port number and the source. An entry assigned and set to the port number item is added (S256). Whichever comes first, it is necessary to unify which is first throughout the system. When only the destination port number is used for authentication, an entry in which a value obtained by dividing the calculated hash value into 2 bytes (16 bits) is assigned to the item of the destination port number is added to the key table 22. (S257). At this time, the source port number is “any” which is not specified, and any value satisfies the condition. The key table 22 is generated by any one of these methods (S258).

再び図6のフローの説明に戻る(S222〜)。ここで、タイマ24による制限時間のカウントを開始する(S223)。動的生成させた鍵テーブル22について、別途有効期限を設定しておき、その設定した時間を超えたら鍵テーブル22を破棄することで、認証を不正に突破される可能性を低下させるためである。それから、パケット情報に含まれるポート番号(仮に、送信元ポート番号又は宛先ポート番号のみを使う場合を想定する。)を、鍵テーブル22のi=1番目のエントリと比較する(S231)。一致していなければ(S231→No)、それは本発明を利用した認証のためのパケットではないと判断して(S232→S242)、設定値は初期値のままで(S243),鍵テーブル22を初期化し(S244)、タイマ24を停止させて(S245)、そのまま最初に戻る(S246→S214)。鍵テーブル22のi=1番目のエントリと一致していれば(S231→Yes)、ここでは最初のエントリでかつ基本的に鍵テーブル22のエントリは偶然の一致での突破を極めて起こりにくくするために複数個からなっているので、エントリ数は1ではなく(S233→No)、変数iを+1して(S234)、次のパケットを待つ(S235→S214)。   Returning to the description of the flow of FIG. 6 again (S222-). Here, the timer 24 starts counting the time limit (S223). This is to reduce the possibility that the authentication is illegally broken by setting an expiration date for the dynamically generated key table 22 and discarding the key table 22 when the set time is exceeded. . Then, the port number included in the packet information (assuming that only the source port number or the destination port number is used) is compared with the i = 1st entry in the key table 22 (S231). If they do not match (S231 → No), it is determined that the packet is not for authentication using the present invention (S232 → S242), the set value remains the initial value (S243), and the key table 22 is stored. Initialization (S244), the timer 24 is stopped (S245), and the process returns to the beginning (S246 → S214). If it matches with i = 1st entry in the key table 22 (S231 → Yes), the entry in the key table 22 is basically the first entry here, so that it is very difficult to break through coincidence. The number of entries is not 1 (S233 → No), the variable i is incremented by 1 (S234), and the next packet is waited (S235 → S214).

二つ目以降のパケット待ちの折に、タイマ24によって先に定められた制限時間がすでに経過していれば(S215→Yes)、タイムアウトとみなして(S216→S242)、i=1に戻し(S243)、鍵テーブル22を初期化し(S244)、タイマ24による制限時間をリセットして(S245),再び鍵テーブル22の一つ目のエントリに一致するパケットが来るのを待つ(S246→S214→S215→S217→S218→S214)。   If the time limit previously determined by the timer 24 has already passed (S215 → Yes) when waiting for the second and subsequent packets, it is regarded as a timeout (S216 → S242), and i = 1 is returned ( S243), the key table 22 is initialized (S244), the time limit set by the timer 24 is reset (S245), and a wait is made again for a packet that matches the first entry in the key table 22 (S246 → S214 → S215 → S217 → S218 → S214).

タイマ24による制限時間内で(S215→No)次のパケットを受け取ったら(S217→Yes)、今度は(S221→No)そのパケットの送信元アドレスが、現在扱っている認証対象のIPアドレスと一致するか否かを判断する(S225)。一致しなければ(S225→No)、それは現在認証保留中の一連のパケットとは別の送信元から発せられたものであるため、認証を行わず次のパケットを待つ(S226→S214)。ここはすなわち、二つ以上の送信元アドレスからの認証を同時に受け付けて処理が錯綜することを避けるためのフローである。この場合、仮に後から認証を行おうとした送信元は最初から一連のパケットを再送信して認証を試みることになる。   When the next packet is received within the time limit set by the timer 24 (S215 → No) (S217 → Yes), this time (S221 → No), the source address of the packet matches the IP address of the authentication target currently handled. It is determined whether or not to perform (S225). If they do not match (S225 → No), it originates from a different source than the series of packets that are currently pending authentication, so authentication is not performed and the next packet is awaited (S226 → S214). In other words, this is a flow for avoiding complicated processing by simultaneously accepting authentications from two or more source addresses. In this case, a transmission source that intends to authenticate later attempts to authenticate by retransmitting a series of packets from the beginning.

送信元アドレスが現在扱っている認証対象の送信元アドレスと一致していれば(S225→Yes)、引き続いて、そのパケットのヘッダの送信元ポート番号(又は宛先ポート番号)が、鍵テーブル22のi番目のエントリと一致しているか否かを判断する(S231)。一致していなければ(S231→No)、そこまでの一致が偶然であったか、あるいは認証のミスであるか、いずれにしても認証の失敗として(S232→S242)、変数と鍵テーブル22とタイマを初期値に戻して(S243〜S245)、次のパケットを待つ(S246→S214)。一致していれば(S231→Yes)、i番目までは鍵テーブル22のエントリと一致したということになる。そこまでが鍵テーブル22のエントリの全てでなければ(S233→No)、変数iに+1して(S234)認証作業を続ける。その時点のiが鍵テーブル22のエントリ数に到達したら(S233→Yes)、認証成功と判断して(S241)、アクセス対象機能部30を起動させ、必要なポートを開放する。その後、次の認証に備えて変数をリセットする(S243〜S245)。   If the transmission source address matches the current transmission source address to be authenticated (S225 → Yes), the transmission source port number (or destination port number) of the header of the packet is subsequently stored in the key table 22. It is determined whether or not it matches the i-th entry (S231). If they do not match (S231 → No), whether the match so far was accidental or an authentication error, in any case as an authentication failure (S232 → S242), the variable, the key table 22 and the timer are stored. It returns to the initial value (S243 to S245) and waits for the next packet (S246 → S214). If they match (S231 → Yes), it means that the entries in the key table 22 match up to the i-th. If all the entries in the key table 22 have not been reached (S233 → No), the variable i is incremented by 1 (S234) and the authentication operation is continued. When i at that time reaches the number of entries in the key table 22 (S233 → Yes), it is determined that the authentication is successful (S241), and the access target function unit 30 is activated to open a necessary port. Thereafter, the variables are reset in preparation for the next authentication (S243 to S245).

なお、この図5のフローで、宛先ポート番号と送信元ポート番号との両方を用いる場合は、いずれのポート番号を先に取り扱うものかを、送信する外部リクエスト端末2と中継装置1との両方に同一の設定で保存しておき、S161のパケット情報との鍵テーブル22のエントリとの対比を、i番目だけでなく(i+1)番目と同時に行い、S169のiの加算を+1ではなく+2とし、S168の判断を「鍵テーブル22のエントリ数は(i+1)以下か?」と変更する。   When both the destination port number and the transmission source port number are used in the flow of FIG. 5, both the external request terminal 2 and the relay device 1 that transmit which port number is to be handled first. And the comparison of the packet information of S161 with the entry of the key table 22 at the same time as the (i + 1) -th as well as the i-th, and the addition of i of S169 is +2 instead of +1 The determination in S168 is changed to “Is the number of entries in the key table 22 equal to or less than (i + 1)?”.

以上の中継装置1を用いた認証方法は、パーソナルファイアウォール機能を有するパソコンやサーバ、スマートフォンが、中継装置1で外部ネットワーク3と区切られた内部ネットワーク4内に存在している場合でも実行可能である。すなわち、上記の実施形態と同様に、端末自体のパーソナルファイアウォールであるファイアウォール機能部にパケット情報取得部を有するものとさせ、共通鍵又は鍵テーブルと、パタン解析部を有する認証機能部を有するものとさせ、アクセス対象機能部により、具体的に電話ソフトなどのアプリケーションを立ち上げたりするようにすればよい。   The above authentication method using the relay device 1 can be executed even when a personal computer, a server, or a smartphone having a personal firewall function exists in the internal network 4 separated from the external network 3 by the relay device 1. . That is, as in the above embodiment, the firewall function unit, which is a personal firewall of the terminal itself, has a packet information acquisition unit, and has a common key or key table and an authentication function unit having a pattern analysis unit. Then, the access target function unit may specifically launch an application such as telephone software.

1 中継装置
2 外部リクエスト端末
3 外部ネットワーク
4 内部ネットワーク
5 内部端末
10 ファイアウォール機能部
11 パケット情報取得部
20 認証機能部
21 パタン解析部
22 鍵テーブル
24 タイマ
30 アクセス対象機能部
DESCRIPTION OF SYMBOLS 1 Relay apparatus 2 External request terminal 3 External network 4 Internal network 5 Internal terminal 10 Firewall function part 11 Packet information acquisition part 20 Authentication function part 21 Pattern analysis part 22 Key table 24 Timer 30 Access target function part

Claims (7)

外部ネットワークからアクセスしようとする外部リクエスト端末と、ファイアウォールを有しそのアクセスを受け付ける通信機能付き機器とに、予め定めた認証の書式を記録しておき、
上記外部リクエスト端末は、その認証の書式に沿った数列をパケットのポート番号として埋め込み可能なサイズに分割した情報として、一連のパケットの送信元ポート番号部分のみに埋め込み連続して上記機器へ送出し、
上記機器は、ファイアウォールで受信したパケットの送信元ポート番号の連続するパタンを監視して、記録しておいた上記の認証の書式を参照し、そのパタンが上記の認証の書式に沿ったものであることを検出したら、アクセスを受け入れるためのアクセス対象機能部を実行させる、ファイアウォールを用いた認証方法。
Record a predetermined authentication format on the external requesting terminal to be accessed from the external network and a device with a communication function that has a firewall and accepts the access,
The external request terminal embeds only a sequence of numbers in accordance with the authentication format into a size that can be embedded as a port number of a packet and embeds it only in the source port number portion of a series of packets and sends it continuously to the device. ,
The device monitors the continuous pattern of the source port number of the packet received by the firewall, refers to the recorded authentication format, and the pattern conforms to the authentication format. An authentication method using a firewall that, when detected, executes an access target function unit for accepting access.
上記の予め定めた認証の書式が、同一送信元アドレスから送信された連続するパケットの送信元ポート番号の連続との一致を判断すべき数列であり、上記機器及び上記リクエスト端末がそれぞれその数列を保持して認証を行う請求項に記載の認証方法。 The predetermined authentication format is a sequence of numbers that should be determined to match with the sequence of source port numbers of consecutive packets transmitted from the same source address. The authentication method according to claim 1 , wherein authentication is performed by holding. 上記の予め定めた認証の書式が、上記機器と上記外部リクエスト端末とが共有する共通鍵と、上記機器が認識する上記外部リクエスト端末の送信元IPアドレスとからハッシュ値を生成し、パケットの送信元ポート番号に格納可能なサイズに分割した数列を、認証のたびに生成させて認証を行う請求項に記載の認証方法。 Predetermined authentication format was described above, generates a hash value from a common key shared by the said equipment and the external request terminal, the device with the source IP address of recognizing the external request terminal, the transmission of the packet The authentication method according to claim 1 , wherein authentication is performed by generating a number sequence divided into sizes that can be stored in the original port number for each authentication. 外部ネットワークからの通信に対してファイアウォールとして機能するファイアウォール機能部を有する通信機能付き機器であって、
上記ファイアウォール機能部は、受信したパケットの送信元ポート番号を取得するパケット情報取得部を有し、
また、
予め定めた認証の書式に従った数列を記録する鍵テーブルと、
前記の取得されたパケットのうち同一の送信元アドレスから送信されたものに含まれる送信元ポート番号の連続を、前記の鍵テーブルと比較参照して認証するか否かを判断するパタン解析部と、
を含み上記ファイアウォール機能部によって外部ネットワークから守られた認証機能部を有し、
さらに、上記認証に成功したら、前記ファイアウォールの所定のポートを開け、アクセスを受け入れる所定のソフトウェアを起動させ、又はそれらの両方を行わせるアクセス対象機能部を有する、
外部ネットワークに接続した外部リクエスト端末からの認証をファイアウォールにより認証可能な通信機能付き機器。
A device with a communication function having a firewall function unit that functions as a firewall for communication from an external network,
The firewall function unit includes a packet information acquisition unit that acquires a transmission source port number of a received packet,
Also,
A key table that records a sequence of numbers according to a predetermined authentication format;
A pattern analysis unit that determines whether or not to authenticate a continuation of source port numbers included in packets acquired from the same source address among the acquired packets by comparing with the key table; ,
Including an authentication function unit protected from an external network by the firewall function unit,
Furthermore, when the authentication is successful, the access target function unit is configured to open a predetermined port of the firewall, start predetermined software that accepts access, or both.
A device with a communication function that can authenticate from an external request terminal connected to an external network by a firewall.
上記の予め定めた認証の書式が、上記鍵テーブルに予め記録された、同一送信元アドレスから送信された連続するパケットの送信元ポート番号との一致を判断すべき数列である請求項に記載の通信機能付き機器。 5. The sequence according to claim 4 , wherein the predetermined authentication format is a number sequence that is recorded in advance in the key table to determine a match with a source port number of consecutive packets transmitted from the same source address. Equipment with communication function. 上記の予め定めた認証の書式が、上記外部リクエスト端末との間で共有する共通鍵と、上記機器自身が認識する上記外部リクエスト端末の送信元IPアドレスと、からハッシュ値を生成し、パケットの送信元ポート番号に格納可能なサイズに分割した数列からなる上記鍵テーブルを認証のたびに生成させて上記認証を行うものである、請求項に記載の通信機能付き機器。 The predetermined authentication format generates a hash value from the common key shared with the external request terminal and the source IP address of the external request terminal recognized by the device itself, The apparatus with a communication function according to claim 4 , wherein the authentication is performed by generating the key table composed of a number sequence divided into a size that can be stored in a transmission source port number for each authentication. 外部ネットワークと内部ネットワークとの間に設ける中継装置であ請求項乃至のいずれかに記載の通信機能付き機器と、
上記の予め定めた認証の書式に従い上記の数列に適合したデータを連続するパケットの送信元ポート番号に埋め込んで、連続送出する認証情報埋込パケット連続送出機能を持たせた外部リクエスト端末と
からなる認証システム。
A communication function device according to any one of claims 4 to 6 repeater der Ru provided between an external network and an internal network,
An external request terminal having a function of continuously transmitting authentication information embedded packets that continuously transmit data that conforms to the above-described number sequence in the transmission source port number of continuous packets according to the above-described predetermined authentication format. Authentication system.
JP2012076097A 2012-03-29 2012-03-29 Authentication method using a firewall Active JP5778066B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012076097A JP5778066B2 (en) 2012-03-29 2012-03-29 Authentication method using a firewall

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012076097A JP5778066B2 (en) 2012-03-29 2012-03-29 Authentication method using a firewall

Publications (2)

Publication Number Publication Date
JP2013206260A JP2013206260A (en) 2013-10-07
JP5778066B2 true JP5778066B2 (en) 2015-09-16

Family

ID=49525243

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012076097A Active JP5778066B2 (en) 2012-03-29 2012-03-29 Authentication method using a firewall

Country Status (1)

Country Link
JP (1) JP5778066B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003091503A (en) * 2001-09-14 2003-03-28 Toshiba Corp Authentication method using port access and server device applying the method
JP2005309974A (en) * 2004-04-23 2005-11-04 Nippon Telegr & Teleph Corp <Ntt> Network device, authentication method using network device, authentication program, and recording medium

Also Published As

Publication number Publication date
JP2013206260A (en) 2013-10-07

Similar Documents

Publication Publication Date Title
US20210099873A1 (en) Authenticating client devices in a wireless communication network with client-specific pre-shared keys
US10652210B2 (en) System and method for redirected firewall discovery in a network environment
US20180124096A1 (en) Detection of vulnerable devices in wireless networks
US20160248734A1 (en) Multi-Wrapped Virtual Private Network
US20170118022A1 (en) Mainstream connection establishment method and device based on multipath transmission control protocol (mptcp)
CN112954683B (en) Domain name resolution method, device, electronic device and storage medium
US20180176774A1 (en) System and Method for Ensuring Secure Connections
CN106789858B (en) Access control method and device and server
US11943202B1 (en) Utilization of multiple exit internet protocol addresses in a virtual private network
CN101827112B (en) The method and system of recognizing client software through network authentication server
CN102823219A (en) Method of securing access to data or services that are accessible via a device implementing the method and corresponding device
US9686311B2 (en) Interdicting undesired service
CN114268499B (en) Data transmission method, device, system, equipment and storage medium
US11575654B1 (en) Enabling efficient communication in a hybrid network
JP6488001B2 (en) Method for unblocking an external computer system in a computer network infrastructure, a distributed computer network having such a computer network infrastructure, and a computer program product
AU2015301504B2 (en) End point secured network
JP5778066B2 (en) Authentication method using a firewall
Gupta et al. Addressing IoT security challenges: A framework for determining security requirements of smart locks leveraging MQTT-SN
US10079857B2 (en) Method of slowing down a communication in a network
CN104380686A (en) Method and system for implementing NG firewall, NG firewall client and NG firewall server
CN114363083A (en) Security precaution method, device and equipment of intelligent gateway
Izhar et al. Network Security Vulnerabilities: Malicious Nodes attack
Sørensen et al. Automatic profile-based firewall for iot devices
Railkar et al. 3 Threat analysis and attack modeling for machine-to-machine communication toward Internet of things
CN115767535A (en) Terminal vpn network access authentication method and system under 5G scene

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140811

RD13 Notification of appointment of power of sub attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7433

Effective date: 20140811

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150313

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150421

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150616

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150708

R150 Certificate of patent or registration of utility model

Ref document number: 5778066

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

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350