JP2004078507A - Access control device, access control method and computer program - Google Patents

Access control device, access control method and computer program Download PDF

Info

Publication number
JP2004078507A
JP2004078507A JP2002237259A JP2002237259A JP2004078507A JP 2004078507 A JP2004078507 A JP 2004078507A JP 2002237259 A JP2002237259 A JP 2002237259A JP 2002237259 A JP2002237259 A JP 2002237259A JP 2004078507 A JP2004078507 A JP 2004078507A
Authority
JP
Japan
Prior art keywords
packet
communication
access control
connection
application
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.)
Pending
Application number
JP2002237259A
Other languages
Japanese (ja)
Inventor
Atsushi Saito
齋藤 淳
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2002237259A priority Critical patent/JP2004078507A/en
Publication of JP2004078507A publication Critical patent/JP2004078507A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To allow a fire wall built in each terminal unit connected to a network, to perform appropriate access control in cooperation with an application of a terminal device. <P>SOLUTION: The setting of the fire wall is dynamically changed using the contents of parameters of a used system call when using the network. The network is thereby used while enhancing safety without setting the fire wall beforehand. Furthermore, there is no need to add a special code for control to the fire wall, to the application, nor need to incorporate a unique processing mechanism corresponding to a protocol such as a file transfer protocol, in the fire wall. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、コンピュータなどの機器への外部からのアクセスをコントロールするアクセス制御装置及びアクセス制御方法、並びにコンピュータ・プログラムに係り、特に、ネットワークに接続された機器に対するアクセスをコントロールするアクセス制御装置及びアクセス制御方法、並びにコンピュータ・プログラムに関する。
【0002】
さらに詳しくは、本発明は、ネットワークの境界に配置されて通過するパケットを監視し、設定されたルールに従ってパケットを通過させるか破棄するかといったアクセス制御を行なうアクセス制御装置及びアクセス制御方法、並びにコンピュータ・プログラムに係り、特に、機器上で動作するアプリケーションと連携して適切なアクセス制御を行なうアクセス制御装置及びアクセス制御方法、並びにコンピュータ・プログラムに関する。
【0003】
【従来の技術】
昨今、情報処理や情報通信などのコンピューティング技術が飛躍的に向上し、コンピュータ・システムが広汎に普及してきている。さらに、コンピュータどうしを相互接続するネットワーク・コンピューティング技術に対する要望も高まってきている。ネットワーク接続環境下では、コンピュータ資源の共有や、情報の共有・流通・配布・交換などの協働的作業を円滑に行なうことができる。
【0004】
コンピュータどうしを相互接続するネットワークの形態は様々である。例えば、イーサネット(Ethernet)のような局所に敷設されたLAN(Local Area Network)や、さらには、ネットワークどうしの相互接続を繰り返し行った結果として文字通り世界規模のネットワークへ成長を遂げた「インターネット」(The Internet)などさまざまである。
【0005】
インターネットは、各大学や研究機関などに設置されたサーバが自主的に相互接続を繰り返した結果、巨大ネットワークへと成長するに至った、字義通り、ネットワークのネットワークである。現在、インターネット上には無数のサーバが接続されており、各サーバは、各種の資源オブジェクトを無数のクライアントに公開している。インターネット上のサーバ同士は、通常、TCP/IP(Transmission Control Protocol/Internet Protocol)プロトコルに従って相互接続されている。
【0006】
インターネット上では、WWW(World Wide Web)、News、TELNET(TELetypewriter NETwork)、FTP(File Transfer Protocol)、Gopherなど、多数のサービス/アプリケーションが公開されている。
【0007】
最近では、電話回線(ADSL(Asymmetric Digital Subscriber Line)など)やケーブル・テレビなどの高速なネットワーク回線の敷設に伴い、常時接続環境の充実してきている。また、今後普及が見込まれるIPv6により、数多くの機器がインターネットに接続されることが予想される。
【0008】
しかしながら、このような広域ネットワークの普及と同時に、安全性に対する不安も生じている。何故ならば、ネットワークを介することで知らないうちに機器に不正にアクセスされ、システム内のデータを不正に模倣・盗用、改ざんしたり、ウィルス感染などによりシステムを使用不要にしたりするなど、人手を介さずに攻撃を受ける可能性があるからである。このため、インターネットの利用者は、いくつかのセキュリティ対策を講じなければならない。
【0009】
ネットワークに接続した機器又はサービスについて、誰に対してどのような利用を許すかのコントロール、すなわちアクセス制御は、通信の経路上に配設されたファイヤ・ウォールが行なうことが一般的である。
【0010】
ファイヤ・ウォールは、ネットワークの境界に配置され、通過するパケットを監視し、設定されたルールに従ってパケットを通過させるか又は破棄するかといった処理を行なう。
【0011】
このようなファイヤ・ウォールの一般的な利用形態としては、ネットワークを信頼できる範囲(例えば自組織内ネットワーク)と信頼できない範囲(例えばインターネットのような外部ネットワーク)に区別し、両者間の通信を原則不可とし、少数の例外的な通信(例えばインターネット上のHTTPサーバに対する通信)のみを許すような利用方法が挙げられる。
【0012】
しかしながら、近年のIPv6技術の発展とともに、将来のネットワークのあり方として、端末と通信相手の端末が直接接続する”end−to−end”通信を基本とした構成が望まれている。その動機の1つとして、端末機器のアプリケーションを設計する者が自由にアプリケーションを作成できるようにするために、ネットワークは原則としてすべての端末へのend−to−endでの接続性を統一した単純なインターフェースで提供すべきだという考え方が挙げられる。
【0013】
そのような構成においては、通信の経路上にファイヤ・ウォールが存在せず、機器自体にファイヤ・ウォールの機能が組み込まれた形態が用いられるものと予想される。
【0014】
例えば、IP Filter(http://cooms.anu.edu.au/ ̄avalon/ip−filter.htmlから取得できるもの)のようなパケット・フィルタリング・ソフトウェアを各端末機器にインストールするような構成が考えられる。その場合、端末機器の構成は、例えば図20に示すようなものが考えられる。
【0015】
ファイヤ・ウォールには、ルールを設定するためのインターフェースとなる設定部があり、ユーザ・プログラムの設定ツールによって設定される。また、状態保持部には、例えば通過するパケットの属するTCPセッションの状態が記録される。制御部は、設定されたルールと、状態保持部の情報を利用してパケット通過の可否を決定する。
【0016】
しかしながら、ファイヤ・ウォールと同様の機構を端末機器に組み込んだだけでは、アプリケーション・プログラムがネットワークを利用するのに必要なファイヤ・ウォールの設定をあらかじめ設定ツールなどにより行なう必要があり、柔軟性に欠ける。例えば、新たなアプリケーションの利用を開始するときなどに設定の変更が必要になるなどの困難が生じる。
【0017】
また、アプリケーション・プロトコルによっては、ファイヤ・ウォールを越えた通信ができないという、ファイヤ・ウォールが本来持つ問題点のため、end−to−end通信を行ないつつ、安全性を確保するのは困難である。
【0018】
一例として、ftp(File Transfer Protocol)に代表されるような、動的に決定したポート番号を使ってTCP接続を新規に行なうようなプロトコルについては、そのプロトコルの動作を把握していなければならない。すなわち、端末機器の設計者が新しいプロトコルを使うアプリケーションを作成した場合、ファイヤ・ウォールを超えた通信できないという事態が生じる。このため、上述したような端末機器自体に組み込まれたファイヤ・ウォール機能を実現するには問題となる。
【0019】
通常のftpクライアントの動作は図21に示すようなシーケンスに従って通信が行なわれる。まず、制御用の通信をするためにftpサーバの21番ポートにTCP接続を行ない、各種コマンドの送信を行なう。一方、データ転送のためには別なTCP接続を用いるので、一般的には子プロセスを生成してPORTコマンドのパラメータとして指定するようになっている。例えば、クライアントがデータの取得のためにRETRコマンドを送った場合、ftpサーバはPORTコマンドで指定されたポートに対して接続してデータを転送する。
【0020】
このため、ファイや・ウォールにftpの通信を通過させるには、ftpサーバからデータ転送用の接続を許す必要がある。このような設定をあらかじめ行なおうとすると、ftpサーバは多数あり、そのアドレスをあらかじめ決定することはできないため、すべてのアドレスからの接続を受け付けるような設定が必要になってしまう。このような設定では脆弱性が増すため、実現は困難である。
【0021】
従来のファイヤ・ウォール関連技術では、ftpの通信を通過させるには以下のような手法が用いられている。
【0022】
ファイヤ・ウォールが21番ポートのパケットを監視して、ftpクライアントが送信したPORTコマンドを発見して解析し、データ転送のためのポート番号を得る。その後、データ転送用のポートに対して、サーバからクライアントへのTCPコネクションの接続を許可するようにファイヤ・ウォールの設定変更を行なう。
【0023】
この方式では、FTPに特化した処理を持つプログラムが必要になるという問題がある。さらに、ftpと同様に、通信中に動的に割り当てたポート番号によって別な接続を生成するようなプロトコルに関しては、そのプロトコルの仕様に沿った処理を個別に追加することが必要になるという問題もある。
【0024】
このような問題を解決するための技術として、例えば特開2000−349821号公報に開示されているポートアクセス制御システムを挙げることができる。同公報によれば、FTPクライアントがオペレーティング・システムから動的に割り当てられたデータ・コネクション用のポートに対しては、外部ネットワークからのアクセスを許可するようにファイヤ・ウォールに要求することにより、FTPサーバ間でのデータ・コネクションを確立する。データ・コネクションの開放時には、ファイヤ・ウォールにおけるそのポートに対するアクセス許可を取り消す。したがって、FTPファイル伝送をファイヤ・ウォールを介して行なう場合にも、FTPファイル伝送に用いるポートをファイヤ・ウォールにおいてアクセス可能なものとしてあらかじめ設定しておく必要がなく、FTPファイル伝送におけるデータ・コネクションの確立などがファイヤ・ウォールを介して効率的に行なうことができ、ファイヤ・ウォールによるセキュリティを維持したままネットワークの利便性を向上させることができる。
【0025】
しかしながら、同公報に記載の技術では、ftpアプリケーションを変更しなくてはならないという問題がある。
【0026】
【発明が解決しようとする課題】
本発明の目的は、ネットワークの境界に配置されて通過するパケットを監視し、設定されたルールに従ってパケットを通過させるか破棄するかといったアクセス制御を好適に行なうことができる、優れたアクセス制御装置及びアクセス制御方法、並びにコンピュータ・プログラムを提供することにある。
【0027】
本発明のさらなる目的は、機器上で動作するアプリケーションと連携して適切なアクセス制御を好適に行なうことができる、優れたアクセス制御装置及びアクセス制御方法、並びにコンピュータ・プログラムを提供することにある。
【0028】
本発明のさらなる目的は、アプリケーションが通信を行なうために設定したルールの変更が必要となった時点で動的に設定変更を行なうことができる、優れたアクセス制御装置及びアクセス制御方法、並びにコンピュータ・プログラムを提供することにある。
【0029】
本発明のさらなる目的は、動的に決定したポート番号を使ってネットワーク接続を新規に行なうようなプロトコルでデータ通信を行なう場合であっても、好適にアクセス制御を行なうことができる、優れたアクセス制御装置及びアクセス制御方法、並びにコンピュータ・プログラムを提供することにある。
【0030】
本発明のさらなる目的は、ネットワークに接続された個々の端末装置に内蔵されたファイヤ・ウォールが、端末機器のアプリケーションと連携して適切なアクセス制御を行なうことができる、優れたアクセス制御装置及びアクセス制御方法、並びにコンピュータ・プログラムを提供することにある。
【0031】
本発明のさらなる目的は、初期状態のファイヤ・ウォールの設定では通信許可を与えない状態に設定し、アプリケーションが通信を行なうためにファイヤ・ウォールの設定変更が必要となった時点で動的に設定変更を行なうことができる、優れたアクセス制御装置及びアクセス制御方法、並びにコンピュータ・プログラムを提供することにある。
【0032】
【課題を解決するための手段及び作用】
本発明は、上記課題を参酌してなされたものであり、その第1の側面は、ネットワークに接続された機器に対するアクセスを制御するアクセス制御装置であって、
ネットワーク・インターフェースへの入出力パケットを監視して、所定の制御ルールに基づいてパケットの通過の可否を制御するファイヤ・ウォールと、
アプリケーション・プログラムが通信時に呼び出す呼び出しパラメータを解釈して前記制御ルールを変更する設定部を備えたシステム・コールと、
を具備することを特徴とするアクセス制御装置である。
【0033】
ここで、前記ファイヤ・ウォールは、通過するパケットの属するネットワーク接続に関する通信の状態を保持する状態保持部と、前記状態保持部に保持されている通信の状態に応じてパケット通過の可否を決定する制御部とを備えている。
【0034】
前記状態保持部は、通過するパケットの属するネットワーク接続に関する発信元のアドレス及びポート、宛先アドレス及びポート、通信の状態、アプリケーションIDを記録し、また、前記制御部は、受信したパケットの宛先となるアプリケーションのIDの状態を参照してパケットの通過の可否を決定するようになっている。
【0035】
前記制御部は、より具体的には、受信したパケットの宛先となるアプリケーションのIDから該アプリケーションと関連するアプリケーションIDの一覧を参照し、関連するアプリケーションIDによってセッション情報を検索し、該セッションの宛先とパケットの送信元が一致するかどうかを判定し、一致した場合にパケットの通過を許可する。
【0036】
したがって、本発明の第1の側面に係るアクセス制御装置によれば、ネットワークを利用する際に、使用するシステム・コールのパラメータの内容を使ってファイヤ・ウォールの設定を動的に変更することで、あらかじめファイヤ・ウォールの設定をしなくても、安全を高めつつネットワークを利用することができる。また、ファイヤ・ウォールへ制御するための特殊なコードをアプリケーションに加えなくてもよい。また、ファイヤ・ウォールにftpなどのプロトコルに対応した固有の処理機構を組み込まなくてもよい。
【0037】
前記設定部は、外部からの接続要求時に元のアプリケーションから立ち上げられる子プロセスの状態を前記状態保持部に登録するようにしてもよい。
【0038】
また、前記設定部は、元のアプリケーションから子プロセスを生成するときにその状態を前記状態保持部に登録するようにしてよい。
【0039】
また、ネットワーク接続を開始するシステム・コールにおいて、アプリケーション・プログラムが通信時に呼び出す呼び出しパラメータにファイヤ・ウォールの制御ルールを記述するパラメータを含んでいてもよい。
【0040】
また、接続を待ち受けるためのシステム・コールにおいて、アプリケーション・プログラムが通信時に呼び出す呼び出しパラメータにファイヤ・ウォールの制御ルールを記述するパラメータを含んでいてもよい。
【0041】
また、前記ファイヤ・ウォールは、通過するパケットの属するネットワーク接続に関する通信の状態が接続中である場合、アプリケーションから指定された宛先へ接続を開始するためのパケットの通過を許すようにしてもよい。
【0042】
また、前記ファイヤ・ウォールは、通過するパケットの属するネットワーク接続に関する通信の状態が通信中である場合、指定されている発信元から宛先への双方向の通信を許可するようにしてもよい。
【0043】
また、前記ファイヤ・ウォールは、通過するパケットの属するネットワーク接続に関する通信の状態が待ち受けである場合、アプリケーションに対して指定されている発信元からの接続を許すようにしてもよい。
【0044】
また、前記ファイヤ・ウォールは、通過するパケットの属するネットワーク接続に関する通信の状態が条件付待ち受けである場合、既に通信中状態にあるプログラムが動的に新たな接続をした場合のみ接続を許可するようにしてもよい。
【0045】
また、前記ファイヤ・ウォールは、通過するパケットの属するネットワーク接続に関する通信の状態が終了待ちの場合、接続を終了させる手順の途中であることを示すようにしてもよい。
【0046】
また、本発明の第2の側面は、ネットワークに接続された機器に対するアクセスを制御するための処理をコンピュータ・システム上で実行するようにコンピュータ可読形式で記述されたコンピュータ・プログラムであって、
ネットワーク・インターフェースへの入出力パケットを監視して、所定の制御ルールに基づいてパケットの通過の可否を制御するパケット通過制御ステップと、
アプリケーション・プログラムが通信時に呼び出す呼び出しパラメータを解釈して前記制御ルールを変更する制御ルール変更ステップと、
を具備することを特徴とするコンピュータ・プログラムである。
【0047】
本発明の第2の側面に係るコンピュータ・プログラムは、コンピュータ・システム上で所定の処理を実現するようにコンピュータ可読形式で記述されたコンピュータ・プログラムを定義したものである。換言すれば、本発明の第2の側面に係るコンピュータ・プログラムをコンピュータ・システムにインストールすることによって、コンピュータ・システム上では協働的作用が発揮され、本発明の第1側面に係るアクセス制御装置と同様の作用効果を得ることができる。
【0048】
本発明のさらに他の目的、特徴や利点は、後述する本発明の実施形態や添付する図面に基づくより詳細な説明によって明らかになるであろう。
【0049】
【発明の実施の形態】
以下、図面を参照しながら本発明の実施形態について詳解する。但し、端末装置がパケット・フィルタ形式のファイヤ・ウォールを用いてアクセス制御を行なう場合について扱うものとする。
【0050】
図1には、本発明が適用された通信システムの構成例を模式的に示している。
【0051】
同図において、ネットワーク6は、例えば企業など特定の組織内あるいは家庭内に限定的に敷設されたネットワークなどのローカル・エリア・ネットワーク(LAN)であり、端末4が接続され、IPv6アドレスaddr4が割り当てられている。
【0052】
端末4は、ネットワークを利用するアプリケーションを搭載した機器であり、一例としてパーソナル・コンピュータ(PC)などの計算機で構成されるが、勿論、ネットワーク通信機能を備えた家電製品などの他の形態の情報機器であってもよい。本明細書では、端末機器4内にFTPクライアント14を持つ機器を例として取り上げる。
【0053】
ネットワーク6は、インターネットなどの広域ネットワークを経由して他のネットワーク5と相互接続されている。ネットワーク5には、端末3が接続されている。
【0054】
端末3は、IPv6プロトコルにより通信可能な機器であり、アドレスaddr3が割り当てられている。端末3は、一例としてパーソナル・コンピュータ(PC)などの計算機で構成されるが、勿論、ネットワーク通信機能を備えた家電製品などの他の形態の情報機器であってもよい。本明細書では、端末機器3内にFTPサーバ13を持つ機器を例として取り上げる。
【0055】
図2には、端末機器4の機能構成を模式的に示している。同図に示すよう、端末機器4は、ネットワークを利用して通信するアプリケーション・プログラムであるFTPクライアント14と、IP(Internet Protocol)プロトコルに従ったデータの受け渡し処理を行なうIP処理部15と、ネットワーク6経由でのパケットの通過の可否を制御するファイヤ・ウォール16とを備えている。
【0056】
FTPクライアント14などのアプリケーションは、ネットワーク利用時に、オペレーティング・システム(OS)の機能の一部であるシステム・コールを呼び出し、IP処理部15に指示を伝える。
【0057】
IP処理部15は、アプリケーションから渡されたデータを、IPパケットの形式に変換し、ファイヤ・ウォールで出力の可否を判定した上で出力する。また、ネットワークから受信したIPパケットをファイヤ・ウォールで入力可否を判定し、形式変換してからアプリケーションに渡す。
【0058】
ファイヤ・ウォール16は、ルールを設定するためのインターフェースとなる設定部16A及び通信の状態を保持する状態保持部16Bと、制御部16Cとを備えている。アプリケーションが通信時に呼び出すOSの機能であるシステム・コールから、設定部16Aを通じてルールの設定を行なう。
【0059】
状態保持部16Bには、通過するパケットの属するTCPなどの接続に関する情報として、発信元のアドレス及びポート、宛先アドレス及びポート、通信の状態、アプリケーションIDが記録される。アプリケーションのIDは、ネットワーク接続を利用している各アプリケーションに関するIDが記録される。例えばUnix系のオペレーティング・システムにおけるプロセスIDがアプリケーションIDとして利用可能である。また、ネットワーク接続の状態としては、「接続中」、「待ち受け」、「条件付待ち受け」、「通信中」、「終了待ち」という5通りの状態が用いられる。
【0060】
ファイヤ・ウォール16内の制御部16Cは、状態保持部16Bの情報を利用して、パケット通過の可否を決定する。
【0061】
「接続中」状態の場合、端末内のアプリケーションから指定された宛先へ接続を開始するためのパケットの通過を許す。
【0062】
「通信中」状態の場合、指定されている発信元から宛先への双方向の通信を許可する。
【0063】
「待ち受け」状態の場合、端末内のアプリケーションに対して、指定されている発信元からの接続を許す。
【0064】
「条件付き待ち受け」の場合、既に通信中状態にあるプログラムが動的に新たな接続をした場合のみ接続を許可する。
【0065】
「終了待ち」の場合、接続を終了させる手順の途中であることを示す。
【0066】
図2に示す実施形態に係る端末装置4における動作を、インターネット5を介して相互接続される端末3のFTPサーバ13に接続してファイル取得を行なう通信の手順を例に挙げて説明する。図3及び図4には、このときの端末装置4の動作手順をフローチャートの形式で示している。また、図5には、このときの端末装置4及び端末装置3間の動作シーケンスを示している。
【0067】
本実施形態では、端末4上のファイヤ・ウォール16は、当初、すべての通信を不許可とするように設定されている。但し、この初期設定は一例であり、インターネット5上で公衆に公開するような類のサーバ機能を持つ場合には、以下の説明と矛盾することなく、サーバがリクエスト受信に使用するポート番号の通信を許可するよう、適切な設定をすることが可能である。
【0068】
ftpクライアント14がftpサーバ13に接続するために、端末3のIPアドレスaddr3の21番ポート(コマンド用ポート)に対するconnectを実行する(ステップS1)。
【0069】
端末4のOSは、connectシステム・コールの処理中に、その引数である接続先アドレスaddr3、ポート21番といったTCP接続の情報と、ftpクライアント14のプロセスIDを組にして、ファイヤ・ウォール16の状態保持部16Bに登録する(ステップS2)。このとき、この接続に関する情報は「接続中」状態として、状態保持部16Bに登録される。
【0070】
ftpクライアント14とftpサーバ13でTCP接続が確立した後、ファイヤ・ウォール16は、状態保持部16Bのaddr3のポート21番に対する接続に関する情報を「通信中」状態に変更する(ステップS3)。
【0071】
ftpクライアント14は、子プロセスを立ち上げ、データ転送のために新たなTCP接続を準備する(ステップS4)。ここでは、データ転送用ポートとしてポート5001番を利用する場合を例に挙げる。
【0072】
子プロセスは、5001番ポートでTCP接続を待つよう、listenを実行する(ステップS5)。
【0073】
次に、子プロセスは、システム・コールacceptを実行して、5001番ポートに接続されるまでブロックする(ステップS6)。
【0074】
次に、ftpクライアント14は、データ転送のためのポートを指定するPORTコマンドを、制御のために既に21番ポートに対して確立したTCP接続を使って転送する(ステップS7)。
【0075】
これに対し、ftpサーバ13は、PORTコマンドを受信して、パラメータであるポート番号5001を記録する(ステップS8)。
【0076】
次いで、ftpクライアント14は、データ取得のため、RETRコマンドを送信する(ステップS9)。
【0077】
ftpサーバ13は、RETRコマンドを受信すると、addr4の5001番ポートに対してデータを送信する(ステップS10)。
【0078】
ファイヤ・ウォール16は、addr3からの5001番ポートに対するTCPパケットの到着を発見する(ステップS11)。
【0079】
次いで、ファイヤ・ウォール16は、IP処理部15で保持している状態の中から、現在端末4でlistenされているポートの一覧を取得し(ステップS12)、その中に5001番があるかどうかを調べる(ステップS13)。このような動作は、例えばUnix系のオペレーティング・システムであれば、socktatコマンドを使って情報を取得することにより実現される。
【0080】
ここで、現在端末4でlistenされているポートの一覧の5001番がなかった場合には、パケットを破棄して(ステップS14)、RSTを返す(ステップS15)。その結果、ftpサーバ13からのTCP接続の試みは失敗する。
【0081】
また、5001番ポートが待ち受けられていた場合、そのポートを使用しているプロセスのプロセスID、及びその子プロセスのID一覧を取得する(ステップS16)。
【0082】
次いで、ファイヤ・ウォール16は、上記のプロセス又はその子プロセスのそれぞれについて、IDの一覧を使って、状態保持部16Bにaddr3との間で「通信中」状態である接続の情報があるかどうかを検索する(ステップS17)。
【0083】
もし存在しなければ(ステップS18)、ファイヤ・ウォール16は、パケットを破棄して(ステップS14)、RSTを返す(ステップS15)。その結果、ftpサーバ13からのTCP接続の試みは失敗する。
【0084】
一方、状態保持部16Bにaddr3との間で「通信中」状態である接続の情報が存在する場合には(ステップS18)、ファイヤ・ウォール16は、パケットの受信処理を続行すると同時に、5001番ポートに対するTCP接続の情報を「通信中」状態として登録し、パケットの通過を許可する(ステップS19)。
【0085】
その後、子プロセスが待ち受けていた5001番へのTCP接続が確立すると(ステップS20)、子プロセスとftpサーバの間でデータ転送を実行する(ステップS21)。
【0086】
ファイヤ・ウォール16は、5001番ポートに対するFINパケットの到着を発見する(ステップS22)。
【0087】
ftpクライアント14は、TCPの終了処理として、FINに対するACKを送信する(ステップS23)。
【0088】
端末14上の子プロセスの終了により、closeが実行される(ステップS24)。
【0089】
オペレーティング・システムは、closeシステム・コールの処理中に、closeで指定されたソケット・ディスクリプタから、該当するTCPコネクションの宛先アドレス、宛先ポート、送信先ポートの情報を得て、該当する(データ転送用ポートとしての)5001番ポートの接続の情報をファイヤ・ウォール16の状態保持部16Bより削除する(ステップS25)。
【0090】
以上でデータ転送コネクションに関する処理が一通り終了する。
【0091】
ftpクライアント14の終了時、ftpクライアント14がcloseシステム・コールを発行する(ステップS26)。
【0092】
オペレーティング・システムは、close処理中に、コマンド用ポートとしての21番ポートの接続の情報をファイヤ・ウォール16の状態保持部16Bから削除して(ステップS27)、パケットの通過を禁止する。
【0093】
以上の説明からも判るように、図2に示すような構成の端末4においては、あらかじめftpに特化した動作をするようなファイヤ・ウォールの機能がなくても、ファイヤ・ウォール越しに従来のftpプロトコルを変更することなく使用することが可能になる。また、ftp以外に、例えばRTSP(Real Time Streaming Protocol)など動的に決定したポート番号を使って接続を新規に作成するようなプロトコルについても、図示の端末4を同様に適用することができる。
【0094】
図6には、端末機器4の他の機能構成例を模式的に示している。同図に示すよう、端末機器4は、ネットワークを利用して通信するアプリケーション・プログラムであるFTPクライアント14と、IP(Internet Protocol)プロトコルに従ったデータの受け渡し処理を行なうIP処理部15と、ネットワーク6経由でのパケットの通過の可否を制御するファイヤ・ウォール16とを備えている。
【0095】
FTPクライアント14などのアプリケーションは、ネットワーク利用時に、オペレーティング・システム(OS)の機能であるシステム・コールを呼び出し、IP処理部15に指示を伝える。
【0096】
IP処理部15は、アプリケーションから渡されたデータを、IPパケットの形式に変換し、ファイヤ・ウォールで出力の可否を判定した上で出力する。また、ネットワークから受信したIPパケットをファイヤ・ウォールで入力可否を判定し、形式変換してからアプリケーションに渡す。
【0097】
ファイヤ・ウォール16は、ルールを設定するためのインターフェースとなる設定部16A及び通信の状態を保持する状態保持部16Bと、制御部16Cとを備えている。アプリケーションが通信時に呼び出すOSの機能であるシステム・コールから、設定部16Aを通じて設定を行なう。
【0098】
状態保持部16Bには、通過するパケットの属するTCPなどの接続に関する情報として、発信元のアドレス及びポート、宛先アドレス及びポート、通信の状態、アプリケーションIDが記録される。アプリケーションのIDは、ネットワーク接続を利用している各アプリケーションに関するIDが記録される。例えばUnix OSにおけるプロセスIDがアプリケーションIDとして利用可能である。また、状態としては、「接続中」、「待ち受け」、「条件付待ち受け」、「通信中」、「終了待ち」という5通りの状態が用いられる。
【0099】
ファイヤ・ウォール16内の制御部16Cは、状態保持部16Bの情報を利用して、パケット通過の可否を決定する。
【0100】
図6に示す実施形態に係る端末装置4における動作を、インターネット5を介して相互接続される端末3のFTPサーバ13に接続してファイル取得を行なう通信の手順を例に挙げて説明する。図7及び図8には、このときの端末装置4の動作手順をフローチャートの形式で示している。また、図9には、このときの端末装置4及び端末装置3間の動作シーケンスを示している。
【0101】
本実施形態では、端末4上のファイヤ・ウォール16は、当初、すべての通信を不許可とするように設定されている。但し、この初期設定は一例であり、インターネット5上で公衆に公開するような類のサーバ機能を持つ場合には、以下の説明と矛盾することなく、サーバがリクエスト受信に使用するポート番号の通信を許可するよう、適切な設定をすることが可能である。
【0102】
ftpクライアント14がftpサーバ13に接続するために、端末3のIPアドレスaddr3のコマンド用ポートとしての21番ポートに対するconnectを実行する(ステップS31)。
【0103】
端末4のOSは、connectシステム・コールの処理中に、その引数である接続先アドレスaddr3、ポート21番といったTCP接続の情報と、ftpクライアント14のプロセスIDを組にして、ファイヤ・ウォール16の状態保持部16Bに登録する(ステップS32)。このとき、この接続に関する情報は「接続中」状態として、状態保持部16Bに登録される。
【0104】
ftpクライアント14とftpサーバ13でTCP接続が確立した後、ファイヤ・ウォール16は、状態保持部16Bのaddr3のポート21番に対する接続に関する情報を「通信中」状態に変更する(ステップS33)。
【0105】
ftpクライアント14は、子プロセスを立ち上げ、データ転送のために新たなTCP接続を準備する(ステップS34)。ここでは、データ転送用ポートとしてポート5001番を利用する場合を例に挙げる。
【0106】
子プロセスは、5001番ポートでTCP接続を待つよう、listenを実行する(ステップS35)。
【0107】
次に、子プロセスは、システム・コールacceptを実行して、5001番ポートに接続されるまでブロックする(ステップS36)。
【0108】
端末4のOSは、acceptシステム・コールの処理中に、TCP接続の情報と、子プロセスのプロセスIDを組にして、ファイヤ・ウォール16の状態保持部16Bに登録する。この際、addr4の5001番に対する接続の情報が「条件付接続待ち」として登録される(ステップS37)。
【0109】
次に、ftpクライアント14は、データ転送のためのポートを指定するPORTコマンドを、制御のために既に21番ポートに対して確立したTCP接続を使って転送する(ステップS38)。
【0110】
これに対し、ftpサーバ13は、PORTコマンドを受信して、パラメータであるポート番号5001を記録する(ステップS39)。
【0111】
次いで、ftpクライアント14は、データ取得のため、RETRコマンドを送信する(ステップS40)。
【0112】
ftpサーバ13は、RETRコマンドを受信すると、addr4の5001番ポートに対してデータを送信する(ステップS41)。
【0113】
ファイヤ・ウォール16は、addr3からの5001番ポートに対するTCPパケットの到着を発見する(ステップS42)。
【0114】
次いで、ファイヤ・ウォール16は、ファイヤ・ウォール16内の状態保持部16Bの中から5001番ポートに対する「待ち受け」又は「条件付き待ち受け」状態になっているものを検索する(ステップS43)。
【0115】
ここで、5001番ポートに対する「待ち受け」又は「条件付き待ち受け」状態になっているものがなかった場合には(ステップS44)、パケットを破棄して(ステップS45)、RSTを返す(ステップS46)。その結果、ftpサーバ13からのTCP接続の試みは失敗する。
【0116】
また、5001番ポートに対する「待ち受け」又は「条件付き待ち受け」状態になっているものがあった場合には(ステップS44)、既に通信を行なっているプログラムが動的に新たな接続をした場合のみ接続を許可する。そのために、まず、ファイヤ・ウォール16は、5001番で待ち受けているプロセスのプロセスIDからその親プロセスのIDを取得する(ステップS47)。
【0117】
次いで、ファイヤ・ウォール16は、上記のプロセス又はその親プロセスのそれぞれについて、状態保持部16Bにaddr3と「通信中」状態である情報があるかどうかを検索する(ステップS48)。
【0118】
もし存在しなければ(ステップS49)、ファイヤ・ウォール16は、パケットを破棄して(ステップS45)、RSTを返す(ステップS46)。その結果、ftpサーバ13からのTCP接続の試みは失敗する。
【0119】
一方、状態保持部16Bにaddr3との間で「通信中」状態である接続の情報が存在する場合には(ステップS49)、ファイヤ・ウォール16は、パケットの受信処理を続行すると同時に、5001番ポートに対するTCP接続の情報を「通信中」状態として登録し、パケットの通過を許可する(ステップS50)。
【0120】
その結果、子プロセスが待ち受けていた5001番へのTCP接続が確立する(ステップS51)と、子プロセスとftpサーバの間でデータ転送を実行する(ステップS52)。
【0121】
データ転送が終了するとき、ftpサーバ13はFINパケットを送信する(ステップS53)。
【0122】
ファイヤ・ウォール16は、5001番ポートに対するFINパケットの到着を発見すると、状態保持部16Bの該当する情報を「終了待ち」状態に変更する。ftpクライアント14は、TCPの終了処理として、FINに対するACKパケットを送信する(ステップS54)。そして、端末14上の子プロセスの終了により、closeが実行される(ステップS55)。
【0123】
ファイヤ・ウォール16は、5001番ポートからのACKパケットの送信を発見すると、状態保持部16Bよりデータ転送用ポートとしての5001番ポートのコネクションの情報を削除する(ステップS56)。そして、ファイヤ・ウォール16は、通信を不許可にするようにファイヤ・ウォール16の設定変更を行なう。
【0124】
以上でデータ転送コネクションに関する処理が一通り終了する。ftpクライアント14が新たにデータ転送用コネクションを生成する場合には、上述と同様の処理手順を繰り返し行なう。
【0125】
ftpクライアント14の終了時、ftpクライアント14はcloseシステム・コールを発行する(ステップS57)。
【0126】
オペレーティング・システムは、closeシステム・コールの処理中に、closeで指定されたソケット・ディスクリプタから、該当するTCPコネクションの宛先アドレス、宛先ポート、送信先ポートの情報を得て、該当するTCPセッションの通信を禁止するように、コマンド用ポートとしての21番ポートの接続の情報をファイヤ・ウォール16内の状態保持部16Bから削除して(ステップS58)、パケットの通過を禁止する。
【0127】
以上の説明からも判るように、図6に示すような構成の端末4においては、あらかじめftpに特化した動作をするようなファイヤ・ウォールの機能がなくても、ファイヤ・ウォール越しに従来のftpプロトコルを変更することなく使用することが可能になる。また、ftp以外に、例えばRTSP(Real Time Streaming Protocol)など動的に決定したポート番号を使って接続を新規に作成するようなプロトコルについても、図示の端末4を同様に適用することができる。
【0128】
図10には、本発明が適用された通信システムについての他の構成例を模式的に示している。
【0129】
同図において、ネットワーク6は、例えば企業など特定の組織内あるいは家庭内に限定的に敷設されたネットワークなどのローカル・エリア・ネットワーク(LAN)であり、端末7が接続され、Ipv6アドレスaddr7が割り当てられている。
【0130】
端末7は、ネットワークを利用するアプリケーションを搭載した機器であり、一例としてパーソナル・コンピュータ(PC)などの計算機で構成されるが、勿論、ネットワーク通信機能を備えた家電製品などの他の形態の情報機器であってもよい。本明細書では、端末機器7内にHTTPサーバ17を持つ機器を例として取り上げる。
【0131】
ネットワーク6は、インターネットなどの広域ネットワークを経由して他のネットワーク5と相互接続されている。ネットワーク5には、IPv6プロトコルにより通信可能な端末8が接続されている。
【0132】
端末8は、IPv6プロトコルにより通信可能な機器であり、アドレスaddr8が割り当てられている。端末8は、一例としてパーソナル・コンピュータ(PC)などの計算機で構成されるが、勿論、ネットワーク通信機能を備えた家電製品などの他の形態の情報機器であってもよい。本明細書では、端末機器8内にHTTPクライアント18を持つ機器を例として取り上げる。
【0133】
図11には、図10に示したネットワークにおいて動作する端末機器7の機能構成を模式的に示している。同図に示すよう、端末機器7は、ネットワークを利用して通信するアプリケーション・プログラムであるHTTPサーバ17と、IP(Internet Protocol)プロトコルに従ったデータの受け渡し処理を行なうIP処理部15と、ネットワーク6経由でのパケットの通過の可否を制御するファイヤ・ウォール16とを備えている。
【0134】
HTTPサーバ17などのアプリケーションは、ネットワーク利用時に、オペレーティング・システム(OS)の機能の一部であるシステム・コールを呼び出し、IP処理部15に指示を伝える。
【0135】
IP処理部15は、アプリケーションから渡されたデータを、IPパケットの形式に変換し、ファイヤ・ウォールで出力の可否を判定した上で出力する。また、ネットワークから受信したIPパケットをファイヤ・ウォールで入力可否を判定し、形式変換してからアプリケーションに渡す。
【0136】
ファイヤ・ウォール16は、ルールを設定するためのインターフェースとなる設定部16A及び通信の状態を保持する状態保持部16Bと、制御部16Cとを備えている。アプリケーションが通信時に呼び出すOSの機能であるシステム・コールから、設定部16Aを通じてルールの設定を行なう。
【0137】
状態保持部16Bには、通過するパケットの属するTCPなどの接続に関する情報として、発信元のアドレス及びポート、宛先アドレス及びポート、通信の状態、アプリケーションIDが記録される。アプリケーションのIDは、ネットワーク接続を利用している各アプリケーションに関するIDが記録される。例えばUnix OSにおけるプロセスIDがアプリケーションIDとして利用可能である。また、状態としては、「接続中」、「待ち受け」、「条件付待ち受け」、「通信中」、「終了待ち」という5通りの状態が用いられる。
【0138】
ファイヤ・ウォール16内の制御部16Cは、状態保持部16Bの情報を利用して、パケット通過の可否を決定する。
【0139】
図10に示す実施形態に係る端末装置7における動作を、インターネット5を介して相互接続される端末8のHTTPクライアント18に接続してファイル提供を行なう通信の手順を例に挙げて説明する。図12には、このときの端末装置7の動作手順をフローチャートの形式で示している。また、図13には、このときの端末装置7及び端末装置8間の動作シーケンスを示している。
【0140】
本実施形態では、端末7上のファイヤ・ウォール16は、当初、すべての通信を不許可とするように設定されている。
【0141】
HTTPサーバ17は、80番ポートでTCPの接続を待つよう、listenを実行する(ステップS61)。
【0142】
次いで、HTTPサーバ17は、acceptシステム・コールを実行する(ステップS62)。
【0143】
端末7のOSは、acceptシステム・コールの処理として、80番ポートでのTCP接続を待ち受ける処理を行ない、さらに接続先ポート番号である80番に対する接続を「待ち受け」状態してファイヤ・ウォール16の状態保持部16Bに登録する(ステップS63)。
【0144】
HTTPサーバ17はHTTPクライアント18からの80番ポートへの接続要求に応答して接続を行なう。HTTPクライアント18は、addr7の80番ポートに対してデータを送信する(ステップS64)。
【0145】
ファイヤ・ウォール16は、addr8からの80番ポートに対するTCPパケットの到着を発見する(ステップS65)。
【0146】
次いで、ファイヤ・ウォール16は、状態保持部16Bより80番ポートに対する接続を待ち受けしているものを検索する(ステップS66)。
【0147】
80番ポートに対する接続を待ち受けしているものを発見できなかった場合には(ステップS67)、RSTを返して(ステップS68)、パケットを破棄する(ステップS69)。その結果、HTTPサーバ17からのTCP接続の試みは失敗する。
【0148】
一方、80番ポートに対する接続を待ち受けしているものを発見できた場合には(ステップS67)、パケットの通過を許可し、状態保持部16Bの接続に関する情報を「通信中」状態に変更する(ステップS70)。
【0149】
その結果、「待ち受け」状態であった80番ポートへのTCP接続が確立し(ステップS71)、HTTPサーバ17とHTTPクライアント18の間でデータ転送を実行する(ステップS72)。
【0150】
HTTPプロトコルによるデータ転送が終了するとき、HTTPサーバ17はFINパケットを送信する(ステップS73)。
【0151】
HTTPクライアント18は、TCPの終了処理として、FINに対するACKパケットを送信する(ステップS74)。
【0152】
ファイヤ・ウォール16は、80番ポートにおけるACKパケットの受信を発見することにより、HTTPクライアント18とのTCP接続の終了を検出する(ステップS75)。
【0153】
次いで、ファイヤ・ウォール16は、状態保持部16Bにおける80番ポートに関する情報を「待ち受け」状態に戻して(ステップS76)、HTTPサーバ17に対して指定されている発信元からの接続を許す。
【0154】
図12及び図13を参照しながら説明したファイヤ・ウォール16の動作は、listen及びacceptシステム・コールを用いて接続を待ち受けるようなプログラム全般に対して同様に適用することが可能であり、ファイヤ・ウォール16の設定を動的に変更することが可能である。
【0155】
図14には、図10に示したネットワークにおいて動作する端末機器7についての他の機能構成を模式的に示している。同図に示すよう、端末機器4は、ネットワークを利用して通信するアプリケーション・プログラムであるHTTPサーバ17と、IP(Internet Protocol)プロトコルに従ったデータの受け渡し処理を行なうIP処理部15と、ネットワーク6経由でのパケットの通過の可否を制御するファイヤ・ウォール16とを備えている。
【0156】
HTTPサーバ17などのアプリケーションは、ネットワーク利用時に、オペレーティング・システム(OS)の機能の一部であるシステム・コールを呼び出し、IP処理部15に指示を伝える。
【0157】
IP処理部15は、アプリケーションから渡されたデータを、IPパケットの形式に変換し、ファイヤ・ウォールで出力の可否を判定した上で出力する。また、ネットワークから受信したIPパケットをファイヤ・ウォールで入力可否を判定し、形式変換してからアプリケーションに渡す。
【0158】
ファイヤ・ウォール16は、ルールを設定するためのインターフェースとなる設定部16A及び通信の状態を保持する状態保持部16Bと、制御部16Cとを備えている。アプリケーションが通信時に呼び出すOSの機能であるシステム・コールから、設定部16Aを通じてルールの設定を行なう。
【0159】
状態保持部16Bには、通過するパケットの属するTCPなどの接続に関する情報として、発信元のアドレス及びポート、宛先アドレス及びポート、通信の状態、アプリケーションIDが記録される。アプリケーションのIDは、ネットワーク接続を利用している各アプリケーションに関するIDが記録される。例えばUnix系のオペレーティング・システムにおけるプロセスIDがアプリケーションIDとして利用可能である。また、状態としては、「接続中」、「待ち受け」、「条件付待ち受け」、「通信中」、「終了待ち」という5通りの状態が用いられる。
【0160】
ファイヤ・ウォール16内の制御部16Cは、状態保持部16Bの情報を利用して、パケット通過の可否を決定する。
【0161】
図14に示した端末7と図11に示したものとの主な相違は、HTTPサーバ17が80番ポートでのTCP接続を待ち受けるプロセスが異なる点である。
【0162】
図14に示す実施形態に係る端末装置7における動作を、インターネット5を介して相互接続される端末8のHTTPクライアント18に接続してファイル提供を行なう通信の手順を例に挙げて説明する。図15には、このときの端末装置7の動作手順をフローチャートの形式で示している。また、図16には、このときの端末装置7及び端末装置8間の動作シーケンスを示している。
【0163】
本実施形態では、端末7上のファイヤ・ウォール16は、当初、すべての通信を不許可とするように設定されている。
【0164】
HTTPサーバ17は、80番ポートでTCPの接続を待つよう、listenを実行する(ステップS81)。
【0165】
次いで、HTTPサーバ17は、fw_acceptシステム・コールを実行する(ステップS82)。fw_acceptは、acceptシステム・コールの機能を拡張したものであり、fw_acceptの引数には、acceptの引数に加えて接続を許可するアドレスとしてaddr3を指定する。
【0166】
従来のシステム・コールacceptは、
int accept(int s, struct sockaddr *addr, socklen_t *addrlen);
【0167】
という呼び出し書式を持ち、引数addrは接続後に通信相手のアドレスを受け取るために用いている。これに対し、fw_acceptは、
【0168】
fw_accept(int s, struct sockaddr *accept_addr, struct sockaddr *accept_mask, socklen_t *addrlen, struct sockaddr *addr, socklen_t *addrlen);
【0169】
という呼び出し書式を持ち、引数accept_addrで接続を許可するアドレスを指定する。そして、HTTPサーバ17は、fw_acceptの引数として、通常のaccept呼び出し時の引数に加えて、接続を許可するアドレスとしてaddr8を指定する。
【0170】
端末7のOSは、fw_acceptシステム・コールの処理として、通常のacceptシステム・コールと同様の処理を行ない、さらにその引数として渡されたaddr3から、接続先ポート番号である80番に対する接続について「待ち受け」状態としてファイヤ・ウォール16の状態保持部16Bに登録する(ステップS83)。
【0171】
HTTPクライアント18は、addr7の80番ポートに対してデータを送信する(ステップS84)。
【0172】
ファイヤ・ウォール16は、addr8からの80番ポートに対するTCPパケットの到着を発見する(ステップS85)。
【0173】
次いで、ファイヤ・ウォール16は、状態保持部16Bを参照して、「待ち受け」状態となっている情報を、その中の発信元アドレスとして指定されているアドレスと、パケットを送ってきたアドレスを比較する(ステップS86)。
【0174】
80番ポートに対する接続を待ち受けしているものを発見できなかった場合には(ステップS87)、RSTを返して(ステップS88)、パケットを破棄する(ステップS89)。その結果、HTTPサーバ17からのTCP接続の試みは失敗する。
【0175】
一方、addr8が指定されている場合には、80番ポートに対する接続を待ち受けしているものを発見される(ステップS87)。この場合、さらに、発信元アドレスが許可されているかどうかを判別する(ステップS90)。
【0176】
ファイヤ・ウォール16には、既にこの接続を許すような設定がなされているので、パケットの通過を許可し、状態保持部16Bの接続に関する情報を「通信中」状態に変更する(ステップS91)。その結果、「待ち受け」状態であった80番ポートへのTCP接続が確立し(ステップS92)、HTTPサーバ17とHTTPクライアント18の間でデータ転送を実行する(ステップS93)。
【0177】
データ転送が終了するとき、HTTPサーバ17はFINパケットを送信する(ステップS94)。
【0178】
HTTPクライアント18は、TCPの終了処理として、FINに対するACKパケットを送信する(ステップS95)。
【0179】
ファイヤ・ウォール16は、80番ポートにおけるACKパケットの受信を発見することにより、HTTPクライアント18とのTCP接続の終了を検出する(ステップS96)。
【0180】
次いで、ファイヤ・ウォール16は、状態保持部16Bにおける80番ポートに関する情報を「待ち受け」状態に戻して(ステップS97)、HTTPサーバ17に対して指定されている発信元からの接続を許す。
【0181】
図17には、図10に示したネットワークにおいて動作する端末機器8の機能構成を模式的に示している。同図に示すように、端末機器8は、ネットワークを利用して通信するアプリケーション・プログラムであるHTTPクライアント18と、IP(Internet Protocol)プロトコルに従ったデータの受け渡し処理を行なうIP処理部15と、ネットワーク6経由でのパケットの通過の可否を制御するファイヤ・ウォール16とを備えている。
【0182】
HTTPクライアント18などのアプリケーションは、ネットワーク利用時に、オペレーティング・システム(OS)の機能の一部であるシステム・コールを呼び出し、IP処理部15に指示を伝える。
【0183】
IP処理部15は、アプリケーションから渡されたデータを、IPパケットの形式に変換し、ファイヤ・ウォールで出力の可否を判定した上で出力する。また、ネットワークから受信したIPパケットをファイヤ・ウォールで入力可否を判定し、形式変換してからアプリケーションに渡す。
【0184】
ファイヤ・ウォール16は、ルールを設定するためのインターフェースとなる設定部16A及び通信の状態を保持する状態保持部16Bと、制御部16Cとを備えている。アプリケーションが通信時に呼び出すOSの機能であるシステム・コールから、設定部16Aを通じてルールの設定を行なう。
【0185】
状態保持部16Bには、通過するパケットの属するTCPなどの接続に関する情報として、発信元のアドレス及びポート、宛先アドレス及びポート、通信の状態、アプリケーションIDが記録される。アプリケーションのIDは、ネットワーク接続を利用している各アプリケーションに関するIDが記録される。例えばUnix OSにおけるプロセスIDがアプリケーションIDとして利用可能である。また、状態としては、「接続中」、「待ち受け」、「条件付待ち受け」、「通信中」、「終了待ち」という5通りの状態が用いられる。
【0186】
ファイヤ・ウォール16内の制御部16Cは、状態保持部16Bの情報を利用して、パケット通過の可否を決定する。
【0187】
図17に示す実施形態に係る端末装置8における動作を、インターネット5を介して相互接続される端末8のHTTPサーバ17に接続してファイル取得を行なう通信の手順を例に挙げて説明する。図18には、このときの端末装置8の動作手順をフローチャートの形式で示している。また、図19には、このときの端末装置7及び端末装置8間の動作シーケンスを示している。
【0188】
本実施形態では、端末8上のファイヤ・ウォール16は、当初、すべての通信を不許可とするように設定されている。
【0189】
HTTPクライアント18は、HTTPサーバ17に接続するための端末7のIPv6アドレスaddr7の80番ポートに対するconnectを実行する(ステップS101)。
【0190】
端末8のOSは、connectシステム・コールの処理中に、その引数である接続先アドレスaddr7、ポート80番といったTCP接続の情報と、HTTPクライアント18のプロセスIDを組にして、ファイヤ・ウォール16の状態保持部16Bに登録する(ステップS102)。このとき、この接続に関する情報は「接続中」状態として、状態保持部16Bに登録される。
【0191】
HTTPクライアント18からaddr7のポート80番に対してSYNパケットが送信され、HTTPサーバ17が受信する。HTTPサーバ17は、TCP接続を確立するため、ACKパケットを送信する(ステップS103)。
【0192】
ファイヤ・ウォール16は、addr7のポート80番からのACKパケットを発見し(ステップS104)、状態保持部16Bから該当する状態を検索する(ステップS105)。
【0193】
80番ポートに対する接続を待ち受けしているものを発見できなかった場合には(ステップS106)、RSTを返して(ステップS107)、パケットを破棄する(ステップS108)。その結果、HTTPサーバ17へのTCP接続の試みは失敗する。
【0194】
一方、80番ポートに対する接続を待ち受けしているものを発見できた場合には(ステップS106)、さらに、発信元アドレスが許可されているかどうかを判断する(ステップS109)。
【0195】
発信元アドレスが許可されていない場合には、RSTを返して(ステップS107)、パケットを破棄する(ステップS108)。その結果、HTTPサーバ17へのTCP接続の試みは失敗する。
【0196】
発信元アドレスが許可されている場合には、パケットの通過を許可し、状態保持部16Bの接続に関する情報を「通信中」状態に変更する(ステップS110)。
【0197】
続いて、HTTPクライアント18からACKパケットが送信され、HTTPサーバ17がこれを受信することにより、80番ポートへのTCP接続が確立し(ステップS111)、HTTPサーバ17とHTTPクライアント18の間でデータ転送を実行する(ステップS112)。
【0198】
HTTPプロトコルによるデータ転送が終了するとき、HTTPサーバ17はFINパケットを送信する(ステップS113)。
【0199】
ファイヤ・ウォール16は、80番ポートにおけるACKパケットの受信を発見することにより、HTTPクライアント18とのTCP接続の終了を検出すると、状態保持部16Bの80番ポートに関する情報を「終了待ち」状態に変更する(ステップS114)。
【0200】
HTTPクライアント18は、TCPの終了処理として、FINに対するACKパケットをHTTPサーバ17に送信する(ステップS115)。
【0201】
続いて、HTTPクライアント18は、HTTPサーバ17にFINパケットを送信する(ステップS116)。これに対し、HTTPサーバ17はACKパケットを送信する(ステップS117)。
【0202】
ファイヤ・ウォール16は、80番ポートにおけるACKパケットの受信を発見することにより、HTTPクライアント18とのTCP接続の終了を検出する(ステップS118)。
【0203】
ファイヤ・ウォール16は、状態保持部16Bより80番ポートの接続の情報についての削除する(ステップS119)。そして、ファイヤ・ウォール16は、通信を不許可にするようにファイヤ・ウォール16の設定変更を行なう。
【0204】
図18及び図19を参照しながら説明したファイヤ・ウォール16の動作は、connectシステム・コールを用いて接続を待ち受けるようなプログラム全般に対して同様に適用することが可能であり、ファイヤ・ウォール16の設定を動的に変更することが可能である。
【0205】
[追補]
以上、特定の実施形態を参照しながら、本発明について詳解してきた。しかしながら、本発明の要旨を逸脱しない範囲で当業者が該実施形態の修正や代用を成し得ることは自明である。すなわち、例示という形態で本発明を開示してきたのであり、本明細書の記載内容を限定的に解釈するべきではない。本発明の要旨を判断するためには、冒頭に記載した特許請求の範囲の欄を参酌すべきである。
【0206】
【発明の効果】
以上詳記したように、本発明によれば、ネットワークの境界に配置されて通過するパケットを監視し、設定されたルールに従ってパケットを通過させるか破棄するかといったアクセス制御を好適に行なうことができる、優れたアクセス制御装置及びアクセス制御方法、並びにコンピュータ・プログラムを提供することができる。
【0207】
また、本発明によれば、動的に決定したポート番号を使ってネットワーク接続を新規に行なうようなプロトコルでデータ通信を行なう場合であっても、好適にアクセス制御を行なうことができる、優れたアクセス制御装置及びアクセス制御方法、並びにコンピュータ・プログラムを提供することができる。
【0208】
また、本発明によれば、ネットワークに接続された個々の端末装置に内蔵されたファイヤ・ウォールが、端末機器のアプリケーションと連携して適切なアクセス制御を行なうことができる、優れたアクセス制御装置及びアクセス制御方法、並びにコンピュータ・プログラムを提供することができる。
【0209】
また、本発明によれば、初期状態のファイヤ・ウォールの設定では通信許可を与えない状態に設定し、アプリケーションが通信を行なうためにファイヤ・ウォールの設定変更が必要となった時点で動的に設定変更を行なうことができる、優れたアクセス制御装置及びアクセス制御方法、並びにコンピュータ・プログラムを提供することができる。
【0210】
本発明によれば、ネットワークを利用する際に、使用するシステム・コールのパラメータの内容を使ってファイヤ・ウォールの設定を動的に変更することで、あらかじめファイヤ・ウォールの設定をしなくても、安全を高めつつネットワークを利用することができる。
【0211】
また、本発明によれば、ファイヤ・ウォールへ制御するための特殊なコードをアプリケーションに加えなくてもよい。また、ファイヤ・ウォールにftpなどのプロトコルに対応した固有の処理機構を組み込まなくてもよい。
【図面の簡単な説明】
【図1】本発明が適用された通信システムの構成例を模式的に示した図である。
【図2】図1に示すネットワーク上で動作する端末機器4の機能構成を模式的に示した図である。
【図3】図2に示す実施形態に係る端末装置4における動作手順を示したフローチャートである。
【図4】図2に示す実施形態に係る端末装置4における動作手順を示したフローチャートである。
【図5】図2に示す実施形態に係る端末装置4と端末装置3間における動作を示したシーケンス図である。
【図6】図1に示すネットワーク上で動作する端末機器4についての他の機能構成を模式的に示した図である。
【図7】図6に示す実施形態に係る端末装置4における動作手順を示したフローチャートである。
【図8】図6に示す実施形態に係る端末装置4における動作手順を示したフローチャートである。
【図9】図6に示す実施形態に係る端末装置4と端末装置3間における動作を示したシーケンス図である。
【図10】本発明が適用された通信システムについての他の構成例を模式的に示した図まである。
【図11】図10に示すネットワーク上で動作する端末機器7の機能構成を模式的に示した図である。
【図12】図10に示す実施形態に係る端末機器7における動作手順を示したフローチャートである。
【図13】図10に示す実施形態に係る端末装置7と端末装置8間における動作を示したシーケンス図である。
【図14】図10に示すネットワーク上で動作する端末機器7についての機能構成を模式的に示した図である。
【図15】図14に示す実施形態に係る端末機器7における動作手順を示したフローチャートである。
【図16】図10に示す実施形態に係る端末装置7と端末装置8間における動作を示したシーケンス図である。
【図17】図10に示すネットワーク上で動作する端末機器8についての機能構成を模式的に示した図である。
【図18】図17に示す実施形態に係る端末機器8における動作手順を示したフローチャートである。
【図19】図10に示す実施形態に係る端末装置7と端末装置8間における動作を示したシーケンス図である。
【図20】パケット・フィルタリング・ソフトウェアをインストールした端末機器の機能構成(従来例)を示した図である。
【図21】通常のftpクライアントの動作(従来例)を示したシーケンス図である。
【符号の説明】
3…端末機器(FTPサーバ)
4…端末機器(FTPクライアント)
5…ネットワーク(インターネット)
6…ネットワーク(LAN)
13…FTPサーバ
14…FTPクライアント
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an access control device and an access control method for controlling external access to a device such as a computer, and a computer program, and more particularly to an access control device and an access control device for controlling access to a device connected to a network. The present invention relates to a control method and a computer program.
[0002]
More specifically, the present invention relates to an access control apparatus, an access control method, and a computer, which monitor a packet located at a boundary of a network and pass the packet, and perform access control such as passing or discarding the packet according to a set rule. The present invention relates to a program, and more particularly to an access control device and an access control method for performing appropriate access control in cooperation with an application running on a device, and a computer program.
[0003]
[Prior art]
In recent years, computing technologies such as information processing and information communication have been dramatically improved, and computer systems have become widespread. In addition, there is an increasing demand for network computing technology for interconnecting computers. Under a network connection environment, cooperative work such as sharing of computer resources and sharing, distribution, distribution, and exchange of information can be smoothly performed.
[0004]
There are various forms of networks that interconnect computers. For example, a locally laid LAN (Local Area Network) such as Ethernet or the "Internet" (literally, a world-wide network as a result of repeatedly interconnecting networks) ( The Internet).
[0005]
The Internet is, literally, a network of networks that has grown into a huge network as a result of servers installed at universities and research institutions voluntarily repeating interconnections. Currently, countless servers are connected on the Internet, and each server publishes various resource objects to countless clients. Servers on the Internet are usually interconnected according to TCP / IP (Transmission Control Protocol / Internet Protocol) protocol.
[0006]
Many services / applications such as WWW (World Wide Web), News, TELNET (Teletypewriter NETwork), FTP (File Transfer Protocol), and Gopher are disclosed on the Internet.
[0007]
Recently, with the laying of high-speed network lines such as telephone lines (ADSL (Asymmetric Digital Subscriber Line)) and cable televisions, the always-on connection environment has been enhanced. Also, it is expected that many devices will be connected to the Internet by IPv6, which is expected to spread in the future.
[0008]
However, with the widespread use of such wide area networks, security concerns have arisen. This is because devices are illegally accessed without knowing through the network, and the data in the system is improperly copied, stolen, or tampered with, and the system is no longer required due to virus infection. This is because they may be attacked without intervention. For this reason, Internet users must take some security measures.
[0009]
Generally, a firewall provided on a communication path performs control of who is allowed to use what kind of device or service connected to the network, that is, access control.
[0010]
The firewall is disposed at the boundary of the network, monitors a passing packet, and performs processing such as passing or discarding the packet according to a set rule.
[0011]
As a general usage form of such a firewall, a network is classified into a reliable range (for example, an internal network) and an unreliable range (for example, an external network such as the Internet), and communication between the two is basically performed. There is a usage method that makes it impossible and allows only a small number of exceptional communications (for example, communications with an HTTP server on the Internet).
[0012]
However, with the development of IPv6 technology in recent years, a configuration based on “end-to-end” communication in which a terminal and a communication partner terminal are directly connected is desired as a future network. As one of the motivations, in order to allow the designer of the terminal device application to freely create the application, the network is basically a simple, unified end-to-end connectivity to all terminals. The idea is that it should be provided with a simple interface.
[0013]
In such a configuration, it is expected that there is no firewall on the communication path, and a configuration in which the function of the firewall is incorporated in the device itself is used.
[0014]
For example, a configuration is conceivable in which packet filtering software such as an IP Filter (obtainable from http://comoms.anu.edu.au/@avalon/ip-filter.html) is installed in each terminal device. Can be In this case, the configuration of the terminal device may be, for example, as shown in FIG.
[0015]
The firewall has a setting unit serving as an interface for setting rules, and is set by a setting tool of a user program. The state holding unit records the state of the TCP session to which the passing packet belongs, for example. The control unit determines whether or not the packet can be passed using the set rules and the information of the state holding unit.
[0016]
However, if a mechanism similar to a firewall is simply incorporated into a terminal device, it is necessary to set in advance a firewall necessary for an application program to use a network using a setting tool or the like, which lacks flexibility. . For example, there are difficulties such as a need to change settings when starting use of a new application.
[0017]
Also, depending on the application protocol, it is difficult to ensure security while performing end-to-end communication due to the inherent problem of the firewall that communication across the firewall cannot be performed. .
[0018]
As an example, for a protocol such as ftp (File Transfer Protocol) that newly establishes a TCP connection using a dynamically determined port number, the operation of the protocol must be known. That is, when a designer of a terminal device creates an application using a new protocol, a situation occurs in which communication over a firewall cannot be performed. Therefore, there is a problem in realizing the firewall function incorporated in the terminal device itself as described above.
[0019]
In the normal operation of the ftp client, communication is performed according to a sequence as shown in FIG. First, a TCP connection is made to port 21 of the ftp server for control communication, and various commands are transmitted. On the other hand, since another TCP connection is used for data transfer, a child process is generally created and designated as a parameter of a PORT command. For example, when the client sends a RETR command to acquire data, the ftp server connects to the port specified by the PORT command and transfers the data.
[0020]
Therefore, in order to pass ftp communication through a firewall or a wall, it is necessary to allow a connection for data transfer from the ftp server. If such settings are to be made in advance, there are many ftp servers and their addresses cannot be determined in advance, so settings must be made to accept connections from all addresses. Such a setting increases the vulnerability and is difficult to realize.
[0021]
In the conventional firewall-related technology, the following method is used to pass ftp communication.
[0022]
The firewall monitors the packet of the 21st port, finds and analyzes the PORT command transmitted by the ftp client, and obtains a port number for data transfer. Then, the setting of the firewall is changed so that the port for data transfer is permitted to establish a TCP connection from the server to the client.
[0023]
This method has a problem that a program having a process specialized for FTP is required. Further, similarly to ftp, for a protocol that creates another connection based on a port number dynamically allocated during communication, it is necessary to individually add processing in accordance with the specification of the protocol. There is also.
[0024]
As a technique for solving such a problem, for example, a port access control system disclosed in JP-A-2000-349821 can be cited. According to the publication, an FTP client requests a firewall to permit access from an external network to a port for a data connection dynamically allocated by an operating system, thereby enabling the FTP client to access the port. Establish a data connection between servers. When releasing the data connection, the access permission for the port on the firewall is revoked. Therefore, even when the FTP file transmission is performed through the firewall, the port used for the FTP file transmission does not need to be set in advance as an accessible port on the firewall, and the data connection of the FTP file transmission is not required. The establishment can be efficiently performed through the firewall, and the convenience of the network can be improved while maintaining the security by the firewall.
[0025]
However, the technique described in this publication has a problem that the ftp application must be changed.
[0026]
[Problems to be solved by the invention]
An object of the present invention is to provide an excellent access control device that monitors packets passing at a network boundary and that can appropriately perform access control such as passing or discarding packets according to a set rule, and an excellent access control device. An object of the present invention is to provide an access control method and a computer program.
[0027]
A further object of the present invention is to provide an excellent access control device, an excellent access control method, and a computer program capable of appropriately performing appropriate access control in cooperation with an application running on a device.
[0028]
A further object of the present invention is to provide an excellent access control device and an access control method, and a computer, which can dynamically change settings when a rule set for performing communication by an application becomes necessary. To provide a program.
[0029]
A further object of the present invention is to provide an excellent access control that can appropriately perform access control even when performing data communication using a protocol that newly establishes a network connection using a dynamically determined port number. A control device, an access control method, and a computer program are provided.
[0030]
A further object of the present invention is to provide an excellent access control device and an access control device in which a firewall built in each terminal device connected to a network can perform appropriate access control in cooperation with an application of the terminal device. A control method and a computer program are provided.
[0031]
A further object of the present invention is to set the initial state of the firewall to a state in which communication is not permitted, and to dynamically set when the application needs to change the setting of the firewall in order to perform communication. An object of the present invention is to provide an excellent access control device, an access control method, and a computer program capable of performing a change.
[0032]
Means and Action for Solving the Problems
The present invention has been made in view of the above problems, and a first aspect thereof is an access control device that controls access to a device connected to a network,
A firewall that monitors input / output packets to and from the network interface and controls whether or not packets can pass based on a predetermined control rule;
A system call comprising a setting unit for interpreting a call parameter that the application program calls during communication and changing the control rule;
An access control device characterized by comprising:
[0033]
Here, the firewall may determine whether or not the packet can be passed according to a state holding unit that holds a communication state related to a network connection to which a passing packet belongs and a state of the communication held in the state holding unit. A control unit.
[0034]
The state holding unit records a source address and port, a destination address and port, a communication state, and an application ID related to a network connection to which a passing packet belongs, and the control unit is a destination of the received packet. With reference to the status of the application ID, it is determined whether or not the packet can pass.
[0035]
More specifically, the control unit refers to a list of application IDs related to the application from the ID of the application serving as the destination of the received packet, searches for session information by the relevant application ID, and It is determined whether the source of the packet matches the source of the packet. If the source matches, the packet is permitted to pass.
[0036]
Therefore, according to the access control device according to the first aspect of the present invention, when using the network, the setting of the firewall is dynamically changed using the contents of the parameters of the system call to be used. Even without setting up a firewall in advance, the network can be used while improving security. Also, it is not necessary to add a special code for controlling the firewall to the application. Also, it is not necessary to incorporate a unique processing mechanism corresponding to a protocol such as ftp into the firewall.
[0037]
The setting unit may register, in the state holding unit, a state of a child process started from an original application when a connection request is made from the outside.
[0038]
The setting unit may register a state of the child process in the state holding unit when a child process is generated from an original application.
[0039]
In a system call for starting a network connection, a call parameter called by an application program during communication may include a parameter describing a firewall control rule.
[0040]
In a system call for waiting for a connection, a call parameter called by an application program during communication may include a parameter describing a firewall control rule.
[0041]
Further, the firewall may allow a packet for starting a connection to a destination designated by an application to pass when a communication state relating to a network connection to which the passing packet belongs is being connected.
[0042]
Further, the firewall may allow bidirectional communication from a designated source to a destination when a communication state regarding a network connection to which a passing packet belongs is in communication.
[0043]
Further, the firewall may allow a connection from a source specified for an application when a communication state regarding a network connection to which a passing packet belongs is standby.
[0044]
Also, the firewall may allow connection only when a program already in a communication state dynamically establishes a new connection when a communication state regarding a network connection to which a passing packet belongs is a conditional standby. It may be.
[0045]
Further, the firewall may indicate that the communication is in the middle of a procedure for terminating the connection when the state of communication regarding the network connection to which the passing packet belongs is waiting for termination.
[0046]
According to a second aspect of the present invention, there is provided a computer program described in a computer-readable form so as to execute a process for controlling access to a device connected to a network on a computer system,
A packet passing control step of monitoring input / output packets to / from the network interface and controlling whether or not the packet can pass based on a predetermined control rule;
A control rule change step of interpreting a call parameter called by the application program during communication and changing the control rule,
A computer program characterized by comprising:
[0047]
The computer program according to the second aspect of the present invention defines a computer program described in a computer-readable format so as to realize a predetermined process on a computer system. In other words, by installing the computer program according to the second aspect of the present invention in a computer system, a cooperative action is exerted on the computer system, and the access control device according to the first aspect of the present invention. The same operation and effect as described above can be obtained.
[0048]
Further objects, features, and advantages of the present invention will become apparent from more detailed descriptions based on embodiments of the present invention described below and the accompanying drawings.
[0049]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. However, it is assumed that the terminal device performs access control using a packet filter type firewall.
[0050]
FIG. 1 schematically shows a configuration example of a communication system to which the present invention is applied.
[0051]
In the figure, a network 6 is a local area network (LAN) such as a network limitedly laid in a specific organization such as a company or a home, to which a terminal 4 is connected, and an IPv6 address addr4 is assigned. Have been.
[0052]
The terminal 4 is a device on which an application using a network is installed, and is constituted by a computer such as a personal computer (PC) as an example. Of course, other forms of information such as home electric appliances having a network communication function are provided. It may be a device. In this specification, a device having the FTP client 14 in the terminal device 4 will be taken as an example.
[0053]
The network 6 is interconnected with another network 5 via a wide area network such as the Internet. The terminal 3 is connected to the network 5.
[0054]
The terminal 3 is a device that can communicate according to the IPv6 protocol, and is assigned an address addr3. The terminal 3 is configured by a computer such as a personal computer (PC) as an example, but may be another type of information device such as a home appliance having a network communication function. In this specification, a device having the FTP server 13 in the terminal device 3 will be described as an example.
[0055]
FIG. 2 schematically illustrates the functional configuration of the terminal device 4. As shown in FIG. 1, a terminal device 4 includes an FTP client 14 which is an application program that communicates using a network, an IP processing unit 15 which performs a data transfer process in accordance with an IP (Internet Protocol) protocol, and a network. And a firewall 16 for controlling whether or not a packet can pass through the firewall 6.
[0056]
An application such as the FTP client 14 calls a system call which is a part of the function of the operating system (OS) when using the network, and transmits an instruction to the IP processing unit 15.
[0057]
The IP processing unit 15 converts the data passed from the application into an IP packet format, determines whether or not the data can be output by a firewall, and outputs the data. Also, the input / output of the IP packet received from the network is determined by the firewall, the format is converted, and the IP packet is passed to the application.
[0058]
The firewall 16 includes a setting unit 16A serving as an interface for setting rules, a state holding unit 16B for holding a communication state, and a control unit 16C. Rules are set through the setting unit 16A from a system call, which is an OS function called by the application during communication.
[0059]
In the state holding unit 16B, a source address and port, a destination address and port, a communication state, and an application ID are recorded as information on a connection such as TCP to which a passing packet belongs. As the application ID, an ID of each application using the network connection is recorded. For example, a process ID in a Unix-based operating system can be used as an application ID. In addition, as the network connection state, five states of “connected”, “standby”, “conditional standby”, “communicating”, and “end wait” are used.
[0060]
The control unit 16C in the firewall 16 uses the information in the state holding unit 16B to determine whether or not the packet can pass.
[0061]
In the “connected” state, a packet for starting a connection to a destination specified by an application in the terminal is allowed to pass.
[0062]
In the "communicating" state, two-way communication from the specified source to the destination is permitted.
[0063]
In the “standby” state, the application in the terminal is permitted to connect from the specified source.
[0064]
In the case of "conditional standby", the connection is permitted only when a program already in the communication state dynamically establishes a new connection.
[0065]
"Waiting for termination" indicates that the connection is being terminated.
[0066]
The operation of the terminal device 4 according to the embodiment shown in FIG. 2 will be described with reference to an example of a communication procedure of connecting to the FTP server 13 of the terminal 3 interconnected via the Internet 5 and acquiring a file. 3 and 4 show the operation procedure of the terminal device 4 at this time in the form of a flowchart. FIG. 5 shows an operation sequence between the terminal device 4 and the terminal device 3 at this time.
[0067]
In the present embodiment, the firewall 16 on the terminal 4 is initially set so as to prohibit all communication. However, this initial setting is only an example, and if the server has a server function that is open to the public on the Internet 5, the communication of the port number used by the server for receiving the request is not inconsistent with the following description. It is possible to make an appropriate setting so as to allow.
[0068]
The ftp client 14 connects to the 21st port (command port) of the IP address addr3 of the terminal 3 in order to connect to the ftp server 13 (step S1).
[0069]
During the processing of the connect system call, the OS of the terminal 4 sets the TCP connection information such as the connection destination address addr3 and the port number 21 as its arguments and the process ID of the ftp client 14 as a set, and The information is registered in the state holding unit 16B (step S2). At this time, information on this connection is registered in the state holding unit 16B as a “connected” state.
[0070]
After the TCP connection is established between the ftp client 14 and the ftp server 13, the firewall 16 changes the information on the connection to the port 21 of the addr3 of the state holding unit 16B to the “communicating” state (step S3).
[0071]
The ftp client 14 starts up a child process and prepares a new TCP connection for data transfer (step S4). Here, a case where port number 5001 is used as a data transfer port will be described as an example.
[0072]
The child process executes listen so as to wait for a TCP connection at port 5001 (step S5).
[0073]
Next, the child process executes the system call "accept" and blocks until the child process is connected to the port 5001 (step S6).
[0074]
Next, the ftp client 14 transfers a PORT command designating a port for data transfer using the TCP connection already established for the 21st port for control (step S7).
[0075]
On the other hand, the ftp server 13 receives the PORT command and records the port number 5001 as a parameter (step S8).
[0076]
Next, the ftp client 14 transmits a RETR command to acquire data (step S9).
[0077]
Upon receiving the RETR command, the ftp server 13 transmits data to port 5001 of addr4 (step S10).
[0078]
The firewall 16 detects the arrival of the TCP packet from the addr 3 to the port 5001 (step S11).
[0079]
Next, the firewall 16 obtains a list of ports currently being listened to by the terminal 4 from the state held by the IP processing unit 15 (step S12), and determines whether there is a number 5001 in the list. Is checked (step S13). Such an operation is realized, for example, by acquiring information using a socktat command in a Unix-based operating system.
[0080]
Here, if there is no port 5001 in the list of ports currently listened on the terminal 4, the packet is discarded (step S14), and the RST is returned (step S15). As a result, the attempt of the TCP connection from the ftp server 13 fails.
[0081]
When the port 5001 is waiting, the process ID of the process using the port and the list of IDs of its child processes are acquired (step S16).
[0082]
Next, the firewall 16 uses the list of IDs for each of the above processes or their child processes to determine whether or not there is information on the connection in the “communicating” state with the addr 3 in the state holding unit 16B. Search (step S17).
[0083]
If not (step S18), the firewall 16 discards the packet (step S14) and returns RST (step S15). As a result, the attempt of the TCP connection from the ftp server 13 fails.
[0084]
On the other hand, if there is information on the connection in the “communicating” state with the addr 3 in the state holding unit 16B (step S18), the firewall 16 continues the packet receiving process and simultaneously sets the number 5001. The information of the TCP connection to the port is registered as the "communicating" state, and the passage of the packet is permitted (step S19).
[0085]
Thereafter, when a TCP connection to the number 5001 waiting for the child process is established (step S20), data transfer is performed between the child process and the ftp server (step S21).
[0086]
The firewall 16 detects the arrival of the FIN packet to the port 5001 (step S22).
[0087]
The ftp client 14 transmits an ACK to the FIN as TCP termination processing (step S23).
[0088]
When the child process on the terminal 14 ends, close is executed (step S24).
[0089]
During the processing of the close system call, the operating system obtains the information of the destination address, the destination port, and the destination port of the corresponding TCP connection from the socket descriptor specified by the close, and obtains the information (for data transfer). The information on the connection of port 5001 (as a port) is deleted from the state holding unit 16B of the firewall 16 (step S25).
[0090]
Thus, the process for the data transfer connection is completed.
[0091]
When the ftp client 14 ends, the ftp client 14 issues a close system call (step S26).
[0092]
During the close processing, the operating system deletes the connection information of the 21st port as the command port from the state holding unit 16B of the firewall 16 (step S27), and prohibits the passage of the packet.
[0093]
As can be seen from the above description, in the terminal 4 having the configuration as shown in FIG. 2, even if there is no firewall function for performing an operation specialized for ftp in advance, the conventional terminal 4 can be connected through the firewall. It can be used without changing the ftp protocol. In addition to the ftp, the illustrated terminal 4 can be similarly applied to a protocol such as RTSP (Real Time Streaming Protocol) that newly creates a connection using a dynamically determined port number.
[0094]
FIG. 6 schematically illustrates another example of the functional configuration of the terminal device 4. As shown in FIG. 1, a terminal device 4 includes an FTP client 14 which is an application program that communicates using a network, an IP processing unit 15 which performs a data transfer process in accordance with an IP (Internet Protocol) protocol, and a network. And a firewall 16 for controlling whether or not a packet can pass through the firewall 6.
[0095]
An application such as the FTP client 14 calls a system call, which is a function of the operating system (OS), when using the network, and transmits an instruction to the IP processing unit 15.
[0096]
The IP processing unit 15 converts the data passed from the application into an IP packet format, determines whether or not the data can be output by a firewall, and outputs the data. Also, the input / output of the IP packet received from the network is determined by the firewall, the format is converted, and the IP packet is passed to the application.
[0097]
The firewall 16 includes a setting unit 16A serving as an interface for setting rules, a state holding unit 16B for holding a communication state, and a control unit 16C. The setting is performed through a setting unit 16A from a system call, which is an OS function called by the application during communication.
[0098]
In the state holding unit 16B, a source address and port, a destination address and port, a communication state, and an application ID are recorded as information on a connection such as TCP to which a passing packet belongs. As the application ID, an ID of each application using the network connection is recorded. For example, a process ID in the Unix OS can be used as an application ID. In addition, five states such as “connecting”, “standby”, “conditional standby”, “communicating”, and “end wait” are used.
[0099]
The control unit 16C in the firewall 16 uses the information in the state holding unit 16B to determine whether or not the packet can pass.
[0100]
The operation of the terminal device 4 according to the embodiment shown in FIG. 6 will be described with reference to an example of a communication procedure of connecting to the FTP server 13 of the terminal 3 interconnected via the Internet 5 and acquiring a file. 7 and 8 show the operation procedure of the terminal device 4 at this time in the form of a flowchart. FIG. 9 shows an operation sequence between the terminal device 4 and the terminal device 3 at this time.
[0101]
In the present embodiment, the firewall 16 on the terminal 4 is initially set so as to prohibit all communication. However, this initial setting is only an example, and if the server has a server function that is open to the public on the Internet 5, the communication of the port number used by the server for receiving the request is not inconsistent with the following description. It is possible to make an appropriate setting so as to allow.
[0102]
In order for the ftp client 14 to connect to the ftp server 13, the ftp client 14 executes a connect to the 21st port as the command port of the IP address addr3 of the terminal 3 (step S31).
[0103]
During the process of the connect system call, the OS of the terminal 4 sets the information of the TCP connection such as the connection destination address addr3 and the port 21 as its arguments and the process ID of the ftp client 14 as a set, and The information is registered in the state holding unit 16B (step S32). At this time, information on this connection is registered in the state holding unit 16B as a “connected” state.
[0104]
After the TCP connection is established between the ftp client 14 and the ftp server 13, the firewall 16 changes the information on the connection to the port 21 of the addr3 of the state holding unit 16B to the “communicating” state (step S33).
[0105]
The ftp client 14 starts up a child process and prepares a new TCP connection for data transfer (step S34). Here, a case where port number 5001 is used as a data transfer port will be described as an example.
[0106]
The child process executes listen so as to wait for a TCP connection at port 5001 (step S35).
[0107]
Next, the child process executes the system call "accept" and blocks until the child process is connected to the port 5001 (step S36).
[0108]
During the processing of the accept system call, the OS of the terminal 4 sets the TCP connection information and the process ID of the child process as a set and registers them in the state holding unit 16B of the firewall 16. At this time, information on the connection of addr4 to the number 5001 is registered as “waiting for conditional connection” (step S37).
[0109]
Next, the ftp client 14 transfers a PORT command designating a port for data transfer using a TCP connection already established for the 21st port for control (step S38).
[0110]
On the other hand, the ftp server 13 receives the PORT command and records the port number 5001 as a parameter (step S39).
[0111]
Next, the ftp client 14 transmits a RETR command to acquire data (step S40).
[0112]
Upon receiving the RETR command, the ftp server 13 transmits data to port 5001 of addr4 (step S41).
[0113]
The firewall 16 detects the arrival of the TCP packet from the addr 3 to the port 5001 (step S42).
[0114]
Next, the firewall 16 searches the state holding unit 16B in the firewall 16 for the port 5001 in the “standby” or “conditional standby” state (step S43).
[0115]
If there is no “standby” or “conditional standby” state for port 5001 (step S44), the packet is discarded (step S45), and RST is returned (step S46). . As a result, the attempt of the TCP connection from the ftp server 13 fails.
[0116]
If any of the ports 5001 is in the "standby" or "conditional standby" state (step S44), only when a program that is already communicating dynamically makes a new connection. Allow connection. For this purpose, first, the firewall 16 acquires the ID of the parent process from the process ID of the process waiting for the number 5001 (step S47).
[0117]
Next, the firewall 16 searches each of the above processes or their parent processes for information indicating that there is information in the state holding unit 16B in the “communicating” state with the addr3 (step S48).
[0118]
If it does not exist (step S49), the firewall 16 discards the packet (step S45) and returns RST (step S46). As a result, the attempt of the TCP connection from the ftp server 13 fails.
[0119]
On the other hand, if there is information on the connection in the “communicating” state with the addr 3 in the state holding unit 16B (step S49), the firewall 16 continues the packet receiving process and simultaneously sets the number 5001. The information of the TCP connection to the port is registered as the “communicating” state, and the passage of the packet is permitted (step S50).
[0120]
As a result, when a TCP connection to the 5001 which the child process has been waiting for is established (step S51), data transfer is performed between the child process and the ftp server (step S52).
[0121]
When the data transfer ends, the ftp server 13 transmits a FIN packet (step S53).
[0122]
When the firewall 16 detects the arrival of the FIN packet to the port 5001, the firewall 16 changes the corresponding information in the state holding unit 16B to the “end waiting” state. The ftp client 14 transmits an ACK packet for the FIN as TCP termination processing (step S54). Then, upon termination of the child process on the terminal 14, close is executed (step S55).
[0123]
When detecting the transmission of the ACK packet from the 5001 port, the firewall 16 deletes the information of the connection of the 5001 port as the data transfer port from the state holding unit 16B (step S56). Then, the firewall 16 changes the setting of the firewall 16 so as to prohibit communication.
[0124]
Thus, the process for the data transfer connection is completed. When the ftp client 14 newly generates a data transfer connection, the same processing procedure as described above is repeatedly performed.
[0125]
When the ftp client 14 ends, the ftp client 14 issues a close system call (step S57).
[0126]
During the processing of the close system call, the operating system obtains information on the destination address, destination port, and destination port of the corresponding TCP connection from the socket descriptor specified by close, and performs communication of the corresponding TCP session. The connection information of the 21st port as the command port is deleted from the state holding unit 16B in the firewall 16 (step S58), and the passage of the packet is prohibited.
[0127]
As can be seen from the above description, in the terminal 4 having the configuration as shown in FIG. 6, even if there is no firewall function for performing an operation specialized for ftp in advance, the conventional terminal 4 can be connected through the firewall. It can be used without changing the ftp protocol. In addition to the ftp, the illustrated terminal 4 can be similarly applied to a protocol such as RTSP (Real Time Streaming Protocol) that newly creates a connection using a dynamically determined port number.
[0128]
FIG. 10 schematically shows another configuration example of the communication system to which the present invention is applied.
[0129]
In the figure, a network 6 is a local area network (LAN) such as a network which is laid in a specific organization such as a company or a home in a limited manner, to which a terminal 7 is connected and an Ipv6 address addr7 is assigned. Has been.
[0130]
The terminal 7 is a device equipped with an application that uses a network, and is configured by a computer such as a personal computer (PC) as an example. Of course, other forms of information such as home electric appliances having a network communication function are provided. It may be a device. In this specification, a device having an HTTP server 17 in the terminal device 7 will be described as an example.
[0131]
The network 6 is interconnected with another network 5 via a wide area network such as the Internet. A terminal 8 that can communicate with the network 5 according to the IPv6 protocol is connected to the network 5.
[0132]
The terminal 8 is a device that can communicate according to the IPv6 protocol, and is assigned an address addr8. The terminal 8 is configured by a computer such as a personal computer (PC) as an example, but may be another type of information device such as a home appliance having a network communication function. In this specification, a device having an HTTP client 18 in the terminal device 8 will be taken as an example.
[0133]
FIG. 11 schematically illustrates a functional configuration of the terminal device 7 that operates in the network illustrated in FIG. As shown in FIG. 1, a terminal device 7 includes an HTTP server 17 which is an application program for communicating using a network, an IP processing unit 15 for performing a data transfer process in accordance with an IP (Internet Protocol) protocol, and a network. And a firewall 16 for controlling whether or not a packet can pass through the firewall 6.
[0134]
An application such as the HTTP server 17 calls a system call which is a part of the function of the operating system (OS) when using the network, and transmits an instruction to the IP processing unit 15.
[0135]
The IP processing unit 15 converts the data passed from the application into an IP packet format, determines whether or not the data can be output by a firewall, and outputs the data. Also, the input / output of the IP packet received from the network is determined by the firewall, the format is converted, and the IP packet is passed to the application.
[0136]
The firewall 16 includes a setting unit 16A serving as an interface for setting rules, a state holding unit 16B for holding a communication state, and a control unit 16C. Rules are set through the setting unit 16A from a system call, which is an OS function called by the application during communication.
[0137]
In the state holding unit 16B, a source address and port, a destination address and port, a communication state, and an application ID are recorded as information on a connection such as TCP to which a passing packet belongs. As the application ID, an ID of each application using the network connection is recorded. For example, a process ID in the Unix OS can be used as an application ID. In addition, five states such as “connecting”, “standby”, “conditional standby”, “communicating”, and “end wait” are used.
[0138]
The control unit 16C in the firewall 16 uses the information in the state holding unit 16B to determine whether or not the packet can pass.
[0139]
The operation of the terminal device 7 according to the embodiment shown in FIG. 10 will be described with reference to an example of a communication procedure of connecting to the HTTP client 18 of the terminal 8 interconnected via the Internet 5 and providing a file. FIG. 12 shows the operation procedure of the terminal device 7 at this time in the form of a flowchart. FIG. 13 shows an operation sequence between the terminal device 7 and the terminal device 8 at this time.
[0140]
In the present embodiment, the firewall 16 on the terminal 7 is initially set so as to prohibit all communication.
[0141]
The HTTP server 17 executes a listen so as to wait for a TCP connection on the 80th port (step S61).
[0142]
Next, the HTTP server 17 executes an accept system call (step S62).
[0143]
The OS of the terminal 7 performs a process of waiting for a TCP connection at the 80th port as a process of the accept system call, and furthermore, establishes a “waiting” state for the connection to the connection destination port number of 80 and sets the firewall 16 to The information is registered in the state holding unit 16B (step S63).
[0144]
The HTTP server 17 makes a connection in response to a connection request to the port 80 from the HTTP client 18. The HTTP client 18 transmits data to port 80 of addr7 (step S64).
[0145]
The firewall 16 detects the arrival of the TCP packet from the addr 8 to the 80th port (step S65).
[0146]
Next, the firewall 16 searches the state holding unit 16B for a connection waiting for the port 80 (step S66).
[0147]
If a device waiting for connection to port 80 cannot be found (step S67), RST is returned (step S68), and the packet is discarded (step S69). As a result, the TCP connection attempt from the HTTP server 17 fails.
[0148]
On the other hand, if a connection waiting for the connection to the 80th port can be found (step S67), the passage of the packet is permitted, and the information on the connection of the state holding unit 16B is changed to the “communicating” state ( Step S70).
[0149]
As a result, a TCP connection to the port 80 in the "standby" state is established (step S71), and data transfer is performed between the HTTP server 17 and the HTTP client 18 (step S72).
[0150]
When the data transfer by the HTTP protocol ends, the HTTP server 17 transmits a FIN packet (Step S73).
[0151]
The HTTP client 18 transmits an ACK packet for the FIN as TCP termination processing (step S74).
[0152]
The firewall 16 detects the end of the TCP connection with the HTTP client 18 by detecting the reception of the ACK packet on the 80th port (step S75).
[0153]
Next, the firewall 16 returns the information on the 80th port in the state holding unit 16B to the “standby” state (step S76), and permits the HTTP server 17 to connect from the designated source.
[0154]
The operation of the firewall 16 described with reference to FIGS. 12 and 13 can be similarly applied to all programs that wait for a connection using the listen and accept system calls. The settings of the wall 16 can be dynamically changed.
[0155]
FIG. 14 schematically shows another functional configuration of the terminal device 7 operating in the network shown in FIG. As shown in FIG. 1, a terminal device 4 includes an HTTP server 17 which is an application program for communicating using a network, an IP processing unit 15 for performing a data transfer process in accordance with an IP (Internet Protocol) protocol, and a network. And a firewall 16 for controlling whether or not a packet can pass through the firewall 6.
[0156]
An application such as the HTTP server 17 calls a system call which is a part of the function of the operating system (OS) when using the network, and transmits an instruction to the IP processing unit 15.
[0157]
The IP processing unit 15 converts the data passed from the application into an IP packet format, determines whether or not the data can be output by a firewall, and outputs the data. Also, the input / output of the IP packet received from the network is determined by the firewall, the format is converted, and the IP packet is passed to the application.
[0158]
The firewall 16 includes a setting unit 16A serving as an interface for setting rules, a state holding unit 16B for holding a communication state, and a control unit 16C. Rules are set through the setting unit 16A from a system call, which is an OS function called by the application during communication.
[0159]
In the state holding unit 16B, a source address and port, a destination address and port, a communication state, and an application ID are recorded as information on a connection such as TCP to which a passing packet belongs. As the application ID, an ID of each application using the network connection is recorded. For example, a process ID in a Unix-based operating system can be used as an application ID. In addition, five states such as “connecting”, “standby”, “conditional standby”, “communicating”, and “end wait” are used.
[0160]
The control unit 16C in the firewall 16 uses the information in the state holding unit 16B to determine whether or not the packet can pass.
[0161]
The main difference between the terminal 7 shown in FIG. 14 and the terminal shown in FIG. 11 is that the process in which the HTTP server 17 waits for the TCP connection on the 80th port is different.
[0162]
The operation of the terminal device 7 according to the embodiment shown in FIG. 14 will be described with reference to an example of a communication procedure of connecting to the HTTP client 18 of the terminal 8 interconnected via the Internet 5 and providing a file. FIG. 15 shows the operation procedure of the terminal device 7 at this time in the form of a flowchart. FIG. 16 shows an operation sequence between the terminal device 7 and the terminal device 8 at this time.
[0163]
In the present embodiment, the firewall 16 on the terminal 7 is initially set so as to prohibit all communication.
[0164]
The HTTP server 17 executes listen so as to wait for a TCP connection at the 80th port (step S81).
[0165]
Next, the HTTP server 17 executes a fw_accept system call (step S82). fw_accept is an extension of the function of the accept system call, and the argument of fw_accept specifies addr3 as an address permitting connection in addition to the argument of accept.
[0166]
The conventional system call accept is
int accept (int s, structure sockaddr * addr, socklen_t * addrlen);
[0167]
And the argument addr is used to receive the address of the communication partner after connection. On the other hand, fw_accept is
[0168]
fw_accept (int s, structure sockaddr * accept_addr, structure sockaddr * accept_mask, socklen_t * addrlen, structure sockaddr * addr, t * ndr; n * sdr)
[0169]
, And the address permitted to be connected is specified by the argument accept_addr. Then, the HTTP server 17 specifies addr8 as an address for permitting the connection, in addition to the argument at the time of calling the normal accept as the argument of fw_accept.
[0170]
The OS of the terminal 7 performs the same processing as that of the normal accept system call as the processing of the fw_accept system call, and furthermore, from the addr3 passed as its argument, the connection for the connection destination port number 80 is "standby". The state is registered in the state holding unit 16B of the firewall 16 (step S83).
[0171]
The HTTP client 18 transmits data to port 80 of addr7 (step S84).
[0172]
The firewall 16 detects the arrival of the TCP packet from the addr 8 to the 80th port (step S85).
[0173]
Next, the firewall 16 refers to the state holding unit 16B and compares the information in the “standby” state with the address specified as the source address in the information and the address that sent the packet. (Step S86).
[0174]
If a device waiting for connection to the 80th port cannot be found (step S87), RST is returned (step S88), and the packet is discarded (step S89). As a result, the TCP connection attempt from the HTTP server 17 fails.
[0175]
On the other hand, if addr8 is specified, a server waiting for a connection to port 80 is found (step S87). In this case, it is further determined whether or not the source address is permitted (step S90).
[0176]
Since the firewall 16 has already been set to allow this connection, it allows the passage of the packet and changes the information on the connection of the state holding unit 16B to the “communicating” state (step S91). As a result, a TCP connection to port 80 in the "standby" state is established (step S92), and data transfer is performed between the HTTP server 17 and the HTTP client 18 (step S93).
[0177]
When the data transfer ends, the HTTP server 17 transmits a FIN packet (Step S94).
[0178]
The HTTP client 18 transmits an ACK packet for the FIN as TCP termination processing (step S95).
[0179]
The firewall 16 detects the end of the TCP connection with the HTTP client 18 by detecting the reception of the ACK packet on the 80th port (step S96).
[0180]
Next, the firewall 16 returns the information on the 80th port in the state holding unit 16B to the “standby” state (step S97), and permits the HTTP server 17 to connect from the designated source.
[0181]
FIG. 17 schematically illustrates a functional configuration of the terminal device 8 that operates in the network illustrated in FIG. As shown in the figure, a terminal device 8 includes an HTTP client 18 which is an application program for communicating using a network, an IP processing unit 15 for performing a data transfer process according to an IP (Internet Protocol) protocol, A firewall 16 for controlling whether or not packets can pass through the network 6;
[0182]
An application such as the HTTP client 18 calls a system call which is a part of the function of the operating system (OS) when using the network, and transmits an instruction to the IP processing unit 15.
[0183]
The IP processing unit 15 converts the data passed from the application into an IP packet format, determines whether or not the data can be output by a firewall, and outputs the data. Also, the input / output of the IP packet received from the network is determined by the firewall, the format is converted, and the IP packet is passed to the application.
[0184]
The firewall 16 includes a setting unit 16A serving as an interface for setting rules, a state holding unit 16B for holding a communication state, and a control unit 16C. Rules are set through the setting unit 16A from a system call, which is an OS function called by the application during communication.
[0185]
In the state holding unit 16B, a source address and port, a destination address and port, a communication state, and an application ID are recorded as information on a connection such as TCP to which a passing packet belongs. As the application ID, an ID of each application using the network connection is recorded. For example, a process ID in the Unix OS can be used as an application ID. In addition, five states such as “connecting”, “standby”, “conditional standby”, “communicating”, and “end wait” are used.
[0186]
The control unit 16C in the firewall 16 uses the information in the state holding unit 16B to determine whether or not the packet can pass.
[0187]
The operation of the terminal device 8 according to the embodiment shown in FIG. 17 will be described using an example of a communication procedure for connecting to the HTTP server 17 of the terminal 8 interconnected via the Internet 5 and acquiring a file. FIG. 18 shows the operation procedure of the terminal device 8 at this time in the form of a flowchart. FIG. 19 shows an operation sequence between the terminal device 7 and the terminal device 8 at this time.
[0188]
In the present embodiment, the firewall 16 on the terminal 8 is initially set so as to prohibit all communication.
[0189]
The HTTP client 18 executes a connect to the 80th port of the IPv6 address addr7 of the terminal 7 for connecting to the HTTP server 17 (step S101).
[0190]
During the processing of the connect system call, the OS of the terminal 8 sets the information of the TCP connection such as the connection destination address addr7 and the port number 80 as its arguments and the process ID of the HTTP client 18 as a set, and It is registered in the state holding unit 16B (step S102). At this time, information on this connection is registered in the state holding unit 16B as a “connected” state.
[0191]
The SYN packet is transmitted from the HTTP client 18 to the port 80 of the addr 7 and received by the HTTP server 17. The HTTP server 17 transmits an ACK packet to establish a TCP connection (Step S103).
[0192]
The firewall 16 finds an ACK packet from the port 80 of the addr 7 (step S104), and searches the state holding unit 16B for a corresponding state (step S105).
[0193]
If a device waiting for a connection to the 80th port cannot be found (step S106), RST is returned (step S107), and the packet is discarded (step S108). As a result, an attempt to make a TCP connection to the HTTP server 17 fails.
[0194]
On the other hand, if a device waiting for a connection to the 80th port can be found (step S106), it is further determined whether or not the source address is permitted (step S109).
[0195]
If the source address is not permitted, RST is returned (step S107), and the packet is discarded (step S108). As a result, an attempt to make a TCP connection to the HTTP server 17 fails.
[0196]
If the source address is permitted, the passage of the packet is permitted, and the information on the connection of the state holding unit 16B is changed to the “communicating” state (step S110).
[0197]
Subsequently, an ACK packet is transmitted from the HTTP client 18, and the HTTP server 17 receives the ACK packet, thereby establishing a TCP connection to the 80th port (step S111), and transmitting data between the HTTP server 17 and the HTTP client 18. The transfer is performed (Step S112).
[0198]
When the data transfer by the HTTP protocol ends, the HTTP server 17 sends a FIN packet (step S113).
[0199]
Upon detecting the end of the TCP connection with the HTTP client 18 by detecting the reception of the ACK packet on the 80th port, the firewall 16 sets the information on the 80th port of the state holding unit 16B to the “end wait” state. It is changed (step S114).
[0200]
The HTTP client 18 transmits an ACK packet for the FIN to the HTTP server 17 as TCP termination processing (step S115).
[0201]
Subsequently, the HTTP client 18 transmits a FIN packet to the HTTP server 17 (Step S116). In response, the HTTP server 17 transmits an ACK packet (step S117).
[0202]
The firewall 16 detects the end of the TCP connection with the HTTP client 18 by detecting the reception of the ACK packet on the 80th port (step S118).
[0203]
The firewall 16 deletes the information on the connection of the 80th port from the state holding unit 16B (step S119). Then, the firewall 16 changes the setting of the firewall 16 so as to prohibit communication.
[0204]
The operation of the firewall 16 described with reference to FIGS. 18 and 19 can be similarly applied to all programs that wait for a connection using a connect system call. Can be dynamically changed.
[0205]
[Supplement]
The present invention has been described in detail with reference to the specific embodiments. However, it is obvious that those skilled in the art can modify or substitute the embodiment without departing from the scope of the present invention. That is, the present invention has been disclosed by way of example, and the contents described in this specification should not be interpreted in a limited manner. In order to determine the gist of the present invention, the claims described at the beginning should be considered.
[0206]
【The invention's effect】
As described above in detail, according to the present invention, it is possible to monitor a packet located at the boundary of a network and pass the packet, and appropriately perform access control such as passing or discarding the packet according to a set rule. , An excellent access control device and access control method, and a computer program can be provided.
[0207]
Further, according to the present invention, even when data communication is performed using a protocol that newly establishes a network connection using a dynamically determined port number, an excellent access control can be performed. An access control device, an access control method, and a computer program can be provided.
[0208]
Further, according to the present invention, there is provided an excellent access control device in which a firewall built in each terminal device connected to a network can perform appropriate access control in cooperation with an application of the terminal device. An access control method and a computer program can be provided.
[0209]
Further, according to the present invention, the initial setting of the firewall is set to a state where communication is not permitted, and dynamically changed when the setting of the firewall becomes necessary for the application to perform communication. An excellent access control device, an excellent access control method, and a computer program capable of changing settings can be provided.
[0210]
According to the present invention, when using a network, by dynamically changing the setting of the firewall using the contents of the parameters of the system call to be used, it is not necessary to set the firewall in advance. In addition, the network can be used while enhancing security.
[0211]
Further, according to the present invention, it is not necessary to add a special code for controlling the firewall to the application. Also, it is not necessary to incorporate a unique processing mechanism corresponding to a protocol such as ftp into the firewall.
[Brief description of the drawings]
FIG. 1 is a diagram schematically showing a configuration example of a communication system to which the present invention is applied.
FIG. 2 is a diagram schematically showing a functional configuration of a terminal device 4 operating on the network shown in FIG.
FIG. 3 is a flowchart showing an operation procedure in the terminal device 4 according to the embodiment shown in FIG.
4 is a flowchart showing an operation procedure in the terminal device 4 according to the embodiment shown in FIG.
FIG. 5 is a sequence diagram showing an operation between the terminal device 4 and the terminal device 3 according to the embodiment shown in FIG.
FIG. 6 is a diagram schematically showing another functional configuration of the terminal device 4 operating on the network shown in FIG. 1;
7 is a flowchart showing an operation procedure in the terminal device 4 according to the embodiment shown in FIG.
8 is a flowchart showing an operation procedure in the terminal device 4 according to the embodiment shown in FIG.
9 is a sequence diagram showing an operation between the terminal device 4 and the terminal device 3 according to the embodiment shown in FIG.
FIG. 10 is a diagram schematically illustrating another configuration example of a communication system to which the present invention is applied;
11 is a diagram schematically showing a functional configuration of a terminal device 7 operating on the network shown in FIG.
FIG. 12 is a flowchart showing an operation procedure in the terminal device 7 according to the embodiment shown in FIG.
13 is a sequence diagram showing an operation between the terminal device 7 and the terminal device 8 according to the embodiment shown in FIG.
FIG. 14 is a diagram schematically showing a functional configuration of a terminal device 7 operating on the network shown in FIG. 10;
15 is a flowchart showing an operation procedure in the terminal device 7 according to the embodiment shown in FIG.
FIG. 16 is a sequence diagram showing an operation between the terminal device 7 and the terminal device 8 according to the embodiment shown in FIG.
FIG. 17 is a diagram schematically showing a functional configuration of a terminal device 8 operating on the network shown in FIG. 10;
18 is a flowchart showing an operation procedure in the terminal device 8 according to the embodiment shown in FIG.
FIG. 19 is a sequence diagram showing an operation between the terminal device 7 and the terminal device 8 according to the embodiment shown in FIG.
FIG. 20 is a diagram showing a functional configuration (conventional example) of a terminal device in which packet filtering software is installed.
FIG. 21 is a sequence diagram showing an operation of a normal ftp client (conventional example).
[Explanation of symbols]
3. Terminal equipment (FTP server)
4: Terminal equipment (FTP client)
5. Network (Internet)
6. Network (LAN)
13 ... FTP server
14 ... FTP client

Claims (27)

ネットワークに接続された機器に対するアクセスを制御するアクセス制御装置であって、
ネットワーク・インターフェースへの入出力パケットを監視して、所定の制御ルールに基づいてパケットの通過の可否を制御するファイヤ・ウォールと、
アプリケーション・プログラムが通信時に呼び出す呼び出しパラメータを解釈して前記制御ルールを変更する設定部を備えたシステム・コールと、
を具備することを特徴とするアクセス制御装置。
An access control device for controlling access to a device connected to a network,
A firewall that monitors input / output packets to and from the network interface and controls whether or not packets can pass based on a predetermined control rule;
A system call comprising a setting unit for interpreting a call parameter that the application program calls during communication and changing the control rule;
An access control device, comprising:
前記ファイヤ・ウォールは、通過するパケットの属するネットワーク接続に関する通信の状態を保持する状態保持部と、前記状態保持部に保持されている通信の状態に応じてパケット通過の可否を決定する制御部と、
をさらに備えることを特徴とする請求項1に記載のアクセス制御装置。
The firewall is a state holding unit that holds a state of communication related to a network connection to which a passing packet belongs, and a control unit that determines whether or not to allow a packet to pass according to the state of communication held in the state holding unit. ,
The access control device according to claim 1, further comprising:
前記状態保持部は、通過するパケットの属するネットワーク接続に関する発信元のアドレス及びポート、宛先アドレス及びポート、通信の状態、アプリケーションIDを記録し、
前記制御部は、受信したパケットの宛先となるアプリケーションのIDの状態を参照してパケットの通過の可否を決定する、
ことを特徴とする請求項2に記載のアクセス制御装置。
The state holding unit records a source address and port, a destination address and port, a communication state, and an application ID regarding a network connection to which a passing packet belongs,
The control unit determines whether or not the packet can pass by referring to the state of the ID of the application that is the destination of the received packet.
3. The access control device according to claim 2, wherein:
前記制御部は、受信したパケットの宛先となるアプリケーションのIDから該アプリケーションと関連するアプリケーションIDの一覧を参照し、関連するアプリケーションIDによってセッション情報を検索し、該セッションの宛先とパケットの送信元が一致するかどうかを判定し、一致した場合にパケットの通過を許可する、
ことを特徴とする請求項2に記載のアクセス制御装置。
The control unit refers to a list of application IDs related to the application from the ID of the application that is the destination of the received packet, searches for session information by the relevant application ID, and determines whether the destination of the session and the source of the packet are Judge whether they match, and if they match, allow the packet to pass.
3. The access control device according to claim 2, wherein:
前記設定部は、外部からの接続要求時に元のアプリケーションから立ち上げられる子プロセスの状態を前記状態保持部に登録する、
ことを特徴とする請求項2に記載のアクセス制御装置。
The setting unit registers the state of the child process started from the original application at the time of a connection request from the outside in the state holding unit,
3. The access control device according to claim 2, wherein:
前記設定部は、元のアプリケーションから子プロセスを生成するときにその状態を前記状態保持部に登録する、
ことを特徴とする請求項2に記載のアクセス制御装置。
The setting unit, when generating a child process from the original application, to register the state in the state holding unit,
3. The access control device according to claim 2, wherein:
ネットワーク接続を開始するシステム・コールにおいて、アプリケーション・プログラムが通信時に呼び出す呼び出しパラメータにファイヤ・ウォールの制御ルールを記述するパラメータを含む、
ことを特徴とする請求項1に記載のアクセス制御装置。
In a system call for starting a network connection, a call parameter called by an application program during communication includes a parameter describing a firewall control rule,
The access control device according to claim 1, wherein:
接続を待ち受けるためのシステム・コールにおいて、アプリケーション・プログラムが通信時に呼び出す呼び出しパラメータにファイヤ・ウォールの制御ルールを記述するパラメータを含む、
ことを特徴とする請求項1に記載のアクセス制御装置。
In a system call for waiting for a connection, a call parameter called by an application program during communication includes a parameter describing a firewall control rule,
The access control device according to claim 1, wherein:
前記ファイヤ・ウォールは、通過するパケットの属するネットワーク接続に関する通信の状態が接続中である場合、アプリケーションから指定された宛先へ接続を開始するためのパケットの通過を許す、
ことを特徴とする請求項1に記載のアクセス制御装置。
The firewall allows the passage of a packet for initiating a connection to a destination specified by the application when a communication state regarding a network connection to which a passing packet belongs is being connected.
The access control device according to claim 1, wherein:
前記ファイヤ・ウォールは、通過するパケットの属するネットワーク接続に関する通信の状態が通信中である場合、指定されている発信元から宛先への双方向の通信を許可する、
ことを特徴とする請求項1に記載のアクセス制御装置。
The firewall is configured to permit two-way communication from a specified source to a destination when a communication state of a network connection to which a passing packet belongs is in communication.
The access control device according to claim 1, wherein:
前記ファイヤ・ウォールは、通過するパケットの属するネットワーク接続に関する通信の状態が待ち受けである場合、アプリケーションに対して指定されている発信元からの接続を許す、
ことを特徴とする請求項1に記載のアクセス制御装置。
The firewall allows a connection from a source specified for an application when a communication state regarding a network connection to which a passing packet belongs is a standby.
The access control device according to claim 1, wherein:
前記ファイヤ・ウォールは、通過するパケットの属するネットワーク接続に関する通信の状態が条件付待ち受けである場合、既に通信中状態にあるプログラムが動的に新たな接続をした場合のみ接続を許可する、
ことを特徴とする請求項1に記載のアクセス制御装置。
The firewall is configured to permit connection only when a communication state relating to a network connection to which a passing packet belongs is a conditional standby, and when a program already in a communication state dynamically makes a new connection,
The access control device according to claim 1, wherein:
前記ファイヤ・ウォールは、通過するパケットの属するネットワーク接続に関する通信の状態が終了待ちの場合、接続を終了させる手順の途中であることを示す、
ことを特徴とする請求項1に記載のアクセス制御装置。
The firewall indicates that the state of the communication regarding the network connection to which the passing packet belongs is waiting for termination, that the connection is in the middle of a procedure for terminating the connection,
The access control device according to claim 1, wherein:
ネットワークに接続された機器に対するアクセスを制御するアクセス制御方法であって、
ネットワーク・インターフェースへの入出力パケットを監視して、所定の制御ルールに基づいてパケットの通過の可否を制御するパケット通過制御ステップと、
アプリケーション・プログラムが通信時に呼び出す呼び出しパラメータを解釈して前記制御ルールを変更する制御ルール変更ステップと、
を具備することを特徴とするアクセス制御方法。
An access control method for controlling access to a device connected to a network,
A packet passing control step of monitoring input / output packets to / from the network interface and controlling whether or not the packet can pass based on a predetermined control rule;
A control rule change step of interpreting a call parameter called by the application program during communication and changing the control rule,
An access control method, comprising:
前記パケット通過制御ステップでは、通過するパケットの属するネットワーク接続に関する通信の状態を保持するとともに、該保持されている通信の状態に応じてパケット通過の可否を決定する、
ことを特徴とする請求項14に記載のアクセス制御方法。
In the packet passing control step, while holding the state of communication related to the network connection to which the passing packet belongs, to determine whether to allow the packet passage according to the held state of the communication,
The access control method according to claim 14, wherein:
通信の状態として、通過するパケットの属するネットワーク接続に関する発信元のアドレス及びポート、宛先アドレス及びポート、通信の状態、アプリケーションIDを記録し、
受信したパケットの宛先となるアプリケーションのIDの状態を参照してパケットの通過の可否を決定する、
ことを特徴とする請求項15に記載のアクセス制御方法。
As the communication status, the source address and port, the destination address and port, the communication status, and the application ID regarding the network connection to which the passing packet belongs are recorded.
Determine whether or not the packet can pass by referring to the state of the ID of the application that is the destination of the received packet.
The access control method according to claim 15, wherein:
保持されている通信の状態に関する情報の中から、受信したパケットの宛先となるアプリケーションのIDから該アプリケーションと関連するアプリケーションIDの一覧を参照し、関連するアプリケーションIDによってセッション情報を検索し、該セッションの宛先とパケットの送信元が一致するかどうかを判定し、一致した場合にパケットの通過を許可する、
ことを特徴とする請求項15に記載のアクセス制御方法。
From the information on the communication state held, the application refers to a list of application IDs related to the application from the ID of the application that is the destination of the received packet, and searches for session information by the relevant application ID. Determines whether the destination of the packet matches the source of the packet, and if so, allows the packet to pass.
The access control method according to claim 15, wherein:
通信の状態として、外部からの接続要求時に元のアプリケーションから立ち上げられる子プロセスの状態を保持する、
ことを特徴とする請求項15に記載のアクセス制御方法。
As the communication status, the status of the child process launched from the original application when a connection request is received from the outside,
The access control method according to claim 15, wherein:
通信の状態として、元のアプリケーションから子プロセスを生成するときにその状態を保持する、
ことを特徴とする請求項15に記載のアクセス制御方法。
As the state of communication, hold that state when creating a child process from the original application,
The access control method according to claim 15, wherein:
ネットワーク接続を開始するシステム・コールにおいて、アプリケーション・プログラムが通信時に呼び出す呼び出しパラメータにファイヤ・ウォールの制御ルールを記述するパラメータを含む、
ことを特徴とする請求項14に記載のアクセス制御方法。
In a system call for starting a network connection, a call parameter called by an application program during communication includes a parameter describing a firewall control rule,
The access control method according to claim 14, wherein:
接続を待ち受けるためのシステム・コールにおいて、アプリケーション・プログラムが通信時に呼び出す呼び出しパラメータにファイヤ・ウォールの制御ルールを記述するパラメータを含む、
ことを特徴とする請求項14に記載のアクセス制御方法。
In a system call for waiting for a connection, a call parameter called by an application program during communication includes a parameter describing a firewall control rule,
The access control method according to claim 14, wherein:
前記パケット通過制御ステップでは、通過するパケットの属するネットワーク接続に関する通信の状態が接続中である場合、アプリケーションから指定された宛先へ接続を開始するためのパケットの通過を許す、
ことを特徴とする請求項14に記載のアクセス制御方法。
In the packet passing control step, if the communication state regarding the network connection to which the passing packet belongs is connecting, allowing the passage of the packet for starting the connection to the destination specified by the application,
The access control method according to claim 14, wherein:
前記パケット通過制御ステップでは、通過するパケットの属するネットワーク接続に関する通信の状態が通信中である場合、指定されている発信元から宛先への双方向の通信を許可する、
ことを特徴とする請求項14に記載のアクセス制御方法。
In the packet passing control step, if the communication state regarding the network connection to which the passing packet belongs is in communication, permit bidirectional communication from the designated source to the destination,
The access control method according to claim 14, wherein:
前記パケット通過制御ステップでは、通過するパケットの属するネットワーク接続に関する通信の状態が待ち受けである場合、アプリケーションに対して指定されている発信元からの接続を許す、
ことを特徴とする請求項14に記載のアクセス制御方法。
In the packet passing control step, when the communication state regarding the network connection to which the passing packet belongs is a standby, the connection from the source specified for the application is permitted.
The access control method according to claim 14, wherein:
前記パケット通過制御ステップでは、通過するパケットの属するネットワーク接続に関する通信の状態が条件付待ち受けである場合、既に通信中状態にあるプログラムが動的に新たな接続をした場合のみ接続を許可する、
ことを特徴とする請求項14に記載のアクセス制御方法。
In the packet passing control step, if the communication state relating to the network connection to which the passing packet belongs is conditional waiting, only when the program already in the communication state dynamically establishes a new connection, the connection is permitted.
The access control method according to claim 14, wherein:
前記パケット通過制御ステップでは、通過するパケットの属するネットワーク接続に関する通信の状態が終了待ちの場合、接続を終了させる手順の途中であることを示す、
ことを特徴とする請求項14に記載のアクセス制御方法。
In the packet passing control step, if the state of communication related to the network connection to which the passing packet belongs is waiting for termination, it indicates that the connection is in the middle of a procedure for terminating the connection,
The access control method according to claim 14, wherein:
ネットワークに接続された機器に対するアクセスを制御するための処理をコンピュータ・システム上で実行するようにコンピュータ可読形式で記述されたコンピュータ・プログラムであって、
ネットワーク・インターフェースへの入出力パケットを監視して、所定の制御ルールに基づいてパケットの通過の可否を制御するパケット通過制御ステップと、
アプリケーション・プログラムが通信時に呼び出す呼び出しパラメータを解釈して前記制御ルールを変更する制御ルール変更ステップと、
を具備することを特徴とするコンピュータ・プログラム。
A computer program written in a computer-readable format to execute a process for controlling access to a device connected to a network on a computer system,
A packet passing control step of monitoring input / output packets to / from the network interface and controlling whether or not the packet can pass based on a predetermined control rule;
A control rule change step of interpreting a call parameter called by the application program during communication and changing the control rule,
A computer program comprising:
JP2002237259A 2002-08-16 2002-08-16 Access control device, access control method and computer program Pending JP2004078507A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002237259A JP2004078507A (en) 2002-08-16 2002-08-16 Access control device, access control method and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002237259A JP2004078507A (en) 2002-08-16 2002-08-16 Access control device, access control method and computer program

Publications (1)

Publication Number Publication Date
JP2004078507A true JP2004078507A (en) 2004-03-11

Family

ID=32021070

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002237259A Pending JP2004078507A (en) 2002-08-16 2002-08-16 Access control device, access control method and computer program

Country Status (1)

Country Link
JP (1) JP2004078507A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8126444B2 (en) 2005-09-21 2012-02-28 Nec Corporation Communication system and method for executing application program that specifies no communication parameter
JP2015222961A (en) * 2010-07-28 2015-12-10 マカフィー, インコーポレイテッド System and method for network level protection against malicious software
US9576142B2 (en) 2006-03-27 2017-02-21 Mcafee, Inc. Execution environment file inventory
US9578052B2 (en) 2013-10-24 2017-02-21 Mcafee, Inc. Agent assisted malicious application blocking in a network environment
US9594881B2 (en) 2011-09-09 2017-03-14 Mcafee, Inc. System and method for passive threat detection using virtual memory inspection
US9602515B2 (en) 2006-02-02 2017-03-21 Mcafee, Inc. Enforcing alignment of approved changes and deployed changes in the software change life-cycle
US9866528B2 (en) 2011-02-23 2018-01-09 Mcafee, Llc System and method for interlocking a host and a gateway
US9864868B2 (en) 2007-01-10 2018-01-09 Mcafee, Llc Method and apparatus for process enforced configuration management
US9882876B2 (en) 2011-10-17 2018-01-30 Mcafee, Llc System and method for redirected firewall discovery in a network environment
US10171611B2 (en) 2012-12-27 2019-01-01 Mcafee, Llc Herd based scan avoidance system in a network environment

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8126444B2 (en) 2005-09-21 2012-02-28 Nec Corporation Communication system and method for executing application program that specifies no communication parameter
US9602515B2 (en) 2006-02-02 2017-03-21 Mcafee, Inc. Enforcing alignment of approved changes and deployed changes in the software change life-cycle
US10360382B2 (en) 2006-03-27 2019-07-23 Mcafee, Llc Execution environment file inventory
US9576142B2 (en) 2006-03-27 2017-02-21 Mcafee, Inc. Execution environment file inventory
US9864868B2 (en) 2007-01-10 2018-01-09 Mcafee, Llc Method and apparatus for process enforced configuration management
US9832227B2 (en) 2010-07-28 2017-11-28 Mcafee, Llc System and method for network level protection against malicious software
JP2015222961A (en) * 2010-07-28 2015-12-10 マカフィー, インコーポレイテッド System and method for network level protection against malicious software
US9866528B2 (en) 2011-02-23 2018-01-09 Mcafee, Llc System and method for interlocking a host and a gateway
US9594881B2 (en) 2011-09-09 2017-03-14 Mcafee, Inc. System and method for passive threat detection using virtual memory inspection
US9882876B2 (en) 2011-10-17 2018-01-30 Mcafee, Llc System and method for redirected firewall discovery in a network environment
US10652210B2 (en) 2011-10-17 2020-05-12 Mcafee, Llc System and method for redirected firewall discovery in a network environment
US10171611B2 (en) 2012-12-27 2019-01-01 Mcafee, Llc Herd based scan avoidance system in a network environment
US9578052B2 (en) 2013-10-24 2017-02-21 Mcafee, Inc. Agent assisted malicious application blocking in a network environment
US10205743B2 (en) 2013-10-24 2019-02-12 Mcafee, Llc Agent assisted malicious application blocking in a network environment
US10645115B2 (en) 2013-10-24 2020-05-05 Mcafee, Llc Agent assisted malicious application blocking in a network environment
US11171984B2 (en) 2013-10-24 2021-11-09 Mcafee, Llc Agent assisted malicious application blocking in a network environment

Similar Documents

Publication Publication Date Title
EP1170909B1 (en) Quality of service definition for data streams
US8458359B2 (en) System for the internet connections, and server for routing connection to a client machine
US8683078B2 (en) Method and system for quality of service control for remote access to universal plug and play
US9160635B2 (en) Method of monitoring and configuring
JP2006523412A (en) Automatic configuration of client terminals in public hot spots
KR20050002628A (en) System and method for automatic negotiation of a security protocol
KR101898492B1 (en) Electronic device and method for controlling electronic device
JP2004078507A (en) Access control device, access control method and computer program
WO2005013553A1 (en) The method of providing reliable quality of service in the communication network
US20070234418A1 (en) Method and apparatus of remote access message differentiation in VPN endpoint routers
WO2014032536A1 (en) Service control method and service control device for convergence of cdn and network
KR100703567B1 (en) Online contents access control system and method thereof
WO2009059505A1 (en) A remote initialization method and system
CN104994158B (en) Method for safely controlling household appliances through centralized gateway
Cardoe et al. LARA: A prototype system for supporting high performance active networking
JP2004096380A (en) Path control apparatus and path control system
Cisco PPP Commands
Cisco PPP Commands
Cisco PPP Commands
Cisco PPP Commands
JP2007519356A (en) Remote control gateway management with security
JP2006025211A (en) Peer-to-peer terminal device, peer-to-peer communication system, peer-to-peer communication method, and peer-to-peer terminal program
Cisco PPP Commands
Cisco Bridging and IBM Networking Configuration Guide Cisco IOS Release 11.3
EP1168751B1 (en) Data Communications Protocol stack