JP2004252877A - Communication system, server device, and socket communication method - Google Patents
Communication system, server device, and socket communication method Download PDFInfo
- Publication number
- JP2004252877A JP2004252877A JP2003044725A JP2003044725A JP2004252877A JP 2004252877 A JP2004252877 A JP 2004252877A JP 2003044725 A JP2003044725 A JP 2003044725A JP 2003044725 A JP2003044725 A JP 2003044725A JP 2004252877 A JP2004252877 A JP 2004252877A
- Authority
- JP
- Japan
- Prior art keywords
- port number
- number information
- key data
- computer
- setting
- 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
Links
Images
Landscapes
- Computer And Data Communications (AREA)
- Communication Control (AREA)
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、例えばTCPポート番号を使用する通信システム、サーバ装置およびソケット通信方法に関する。
【0002】
【従来の技術】
図7は、従来の通信システムによるソケット通信の概要を示す図である。
複数の、例えば2台のコンピュータ4,5間でソケット通信をする場合には、ソケット通信に対応する共通のアプリケーションプログラムをコンピュータ4,5にそれぞれインストールして、これらのアプリケーションプログラムに予め付与されたソケット通信用のポート番号、例えばTCPポート番号“A”をアプリケーションプログラムに定義付けて、コンピュータ4,5間でソケット通信をする(例えば、特許文献1、特許文献2参照。)。
【0003】
【特許文献1】
特開平11−175439号公報
【0004】
【特許文献2】
特開平7−21724号公報
【0005】
【発明が解決しようとする課題】
しかしながら、設定したTCPポート番号“A”を他者により知られてしまうと、コンピュータ4,5が不正アクセスの対象となる危険性がある。定義付けされたTCPポート番号“A”は、固定されたものであるため、TCPポート番号“A”が一旦知られてしまうとコンピュータ4,5が常に不正アクセスの対象であり続けることになる。
【0006】
本発明は、上記課題に鑑みなされたもので、コンピュータに対する、特定のポート番号に基づいた不正アクセスを防止することが可能になる通信システム、サーバ装置およびソケット通信方法を提供することを目的とする。
【0007】
【課題を解決するための手段】
すなわち、本発明の請求項1に係わる通信システムは、第1のコンピュータと第2のコンピュータとで構成される通信システムにあって、前記第1のコンピュータは、ソケット通信用のポート番号情報に対応するキーデータを設定するキーデータ設定手段と、このキーデータ設定手段により設定したキーデータを当該キーデータ設定手段に再設定させるキーデータ再設定手段と、このキーデータ再設定手段にしたがって前記キーデータ設定手段により設定した新たなキーデータを前記第2のコンピュータに送信するキーデータ送信手段と、前記キーデータ再設定手段にしたがって前記キーデータ設定手段により設定したキーデータに基づいて前記第2のコンピュータと共通のポート番号情報を設定するポート番号情報設定手段と、このポート番号情報設定手段により設定したポート番号情報を記憶させるポート番号情報記憶手段と、このポート番号情報記憶手段により記憶したポート番号情報に基づいて、このポート番号情報と共通のポート番号情報が記憶された前記第2のコンピュータと通信する通信手段とを備え、前記第2のコンピュータは、前記第1のコンピュータにより送信されたキーデータを受信するキーデータ受信手段と、このキーデータ受信手段により受信したキーデータに基づいて前記第1のコンピュータと共通のポート番号情報を設定するポート番号情報設定手段と、このポート番号情報設定手段により設定した新たなポート番号情報を記憶させるポート番号情報記憶手段と、このポート番号情報記憶手段により記憶したポート番号情報に基づいて、このポート番号情報と共通のポート番号情報が記憶された前記第1のコンピュータと通信する通信手段とを備えたことを特徴とする。
【0008】
つまり、本発明の請求項1に係わる通信システムでは、第1のコンピュータに設定されるキーデータをキーデータ再設定手段により再設定させると、このキーデータをキーデータ送信手段により第2のコンピュータに送信して、このキーデータを受信すると、ポート番号情報設定手段により第1のコンピュータと共通のポート番号情報を設定するとともに、第1のコンピュータのポート番号情報設定手段により共通のポート番号情報を設定する。そして、それぞれ設定したポート番号情報が第1および第2のコンピュータのポート番号情報記憶手段により記憶させ、このポート番号情報に基づいて、通信手段により第1のコンピュータおよび第2のコンピュータ間のソケット通信を実行することになる。
【0009】
また、本発明の請求項2に係わる通信システムは、請求項1に記載の通信システムであって、前記第1のコンピュータは、さらにカウント手段を備え、前記キーデータ再設定手段は、前記カウント手段により所定の時間をカウントするごとに、前記キーデータ設定手段により設定したキーデータを再設定させることを特徴とする。
【0010】
つまり、本発明の請求項2に係わる通信システムでは、第1のコンピュータのカウント手段により所定の時間をカウントするごとに、キーデータ再設定手段によりキーデータが再設定する。そして再設定したキーデータをキーデータ送信手段により第2のコンピュータに送信して、このキーデータを受信すると、ポート番号情報設定手段により第1のコンピュータと共通のポート番号情報を設定するとともに、第1のコンピュータのポート番号情報設定手段により共通のポート番号情報が設定する。そして、それぞれ設定したポート番号情報を第1および第2のコンピュータのポート番号情報記憶手段により記憶させ、このポート番号情報に基づいて、通信手段により第1のコンピュータおよび第2のコンピュータ間のソケット通信を実行することになる。
【0011】
【発明の実施の形態】
以下図面により本発明の実施形態について説明する。
図1は、本発明の実施形態に係わる通信システムの概要を示す図である。
複数のコンピュータ、例えば同期サーバ1(以下、サーバ1と称する)および同期クライアント2(以下、クライアント2と称する)の間でソケット通信をする場合には、まず、ソケット通信に対応する共通のアプリケーションプログラム(以下、アプリケーションと称する)をサーバ1およびクライアント2にそれぞれインストールする。アプリケーションには、ソケット通信用のTCPポート番号を対応付ける必要がある。サーバ1にインストールされたアプリケーションに対応付けるTCPポート番号と、クライアント2にインストールしたアプリケーションに対応付けるTCPポート番号は共通したのもでなければならない。
【0012】
そこで、アプリケーションに対応する共通のソケット通信用のポート番号を、例えばサーバ1およびクライアント2に備えた通信情報管理テーブル(図示せず)にそれぞれ記憶させる。この通信情報管理テーブルは、アプリケーションがソケット通信に使用するTCPポート番号を管理する。以後は、アプリケーションに対応するTCPポート番号を通信情報管理テーブルに記憶させる処理をアプリケーションに対してTCPポート番号を定義付ける処理と言い換える。これによりサーバ1およびクライアント2間でアプリケーションを用いたソケット通信を実行する。
また、サーバ1およびクライアント2に対して複数種類のアプリケーションをインストールした場合には、それぞれのアプリケーションの種類ごとにTCPポート番号をそれぞれ定義付ける。
【0013】
本実施形態では、このサーバ1およびクライアント2のアプリケーションに対して定義付けたTCPポート番号を、サーバ1およびクライアント2間の同期をとった上で自動的に異なるTCPポート番号、例えば“B”に変更する。そしてTCPポート番号を所定時間が経過するごとに例えば“C”や“D”に自動的に変更する。これにより他者に特定のTCPポート番号が知られた場合でも、サーバ1およびクライアント2に対する継続的な不正アクセスを実行することが出来なくなる。
【0014】
図2は、前記実施形態に係わる通信システムの構成を示すブロック図である。
図2に示した通信システムは、サーバ1とクライアント2が通信ケーブル3を介して接続されて構成される。通信ケーブル3は、例えばイーサネット(登録商標)のケーブルである。
【0015】
サーバ1は、TCPポート番号に対応付けたキーデータを予め記憶させたキーデータ群のなかから少なくとも1つを抽出し、この抽出したキーデータに対応するTCPポート番号をアプリケーションに対して定義付ける。そしてこのTCPポート番号に基づいてクライアント2との間でソケット通信を実行する機能を有する。また、所定時間が経過するごとに異なるTCPポート番号を抽出し定義付けする機能をも有する。
【0016】
クライアント2は、サーバ1が抽出したTCPポート番号と共通のTCPポート番号をアプリケーションに対して定義付けてサーバ1とソケット通信を実行する機能を有する。
【0017】
図2に示したように、サーバ1は、CPU11に、記憶部12および通信インタフェース13が接続されて構成されている。通信インタフェース13は通信ケーブル3と接続される。
【0018】
CPU11は、TCPポート番号変更処理を実行する。このTCPポート番号変更処理は、サーバ1において記憶部12のキーデータ記憶エリア12aに記憶されるキーデータから少なくとも1種類のキーデータをランダムに抽出してクライアント2に送信し新たなTCPポート番号を抽出させてアプリケーションに定義付けさせる処理、また抽出したキーデータに基づいてTCPポート番号を抽出する処理および抽出したTCPポート番号をクライアント2とのソケット通信に使用する新たなTCPポート番号としてアプリケーションに対して定義付ける処理である。
【0019】
記憶部12は、内部に記憶する情報の書き換えが可能なメモリである。
この記憶部12には、キーデータを記憶するキーデータ記憶エリア12a、キーデータとTCPポート番号とを対応付けたキーデータ・TCPポート番号変換テーブルを記憶するキーデータ・TCPポート番号変換テーブル記憶エリア12b、作業中のデータを一時的に記憶するバッファメモリ12c、およびTCPポート番号変更処理により抽出したTCPポート番号を記憶するTCPポート番号記憶エリア12dが設けられる。また、ソケット通信用のアプリケーションを記憶するエリア(図示せず)が設けられる。アプリケーションを記憶するエリアには複数種類のアプリケーションを記憶させることができる。
【0020】
図3は、図2に示したキーデータ記憶エリア12aに記憶されるキーデータの内容を示す図である。
キーデータ記憶エリア12aには、図3に示すように複数の文字、例えばアルファベット6文字で構成されたキーデータが記憶される。このキーデータの数は、アプリケーションに対して定義付けが可能なTCPポート番号の数と同じである。
【0021】
また、キーデータに対応するTCPポート番号には、サーバ1およびクライアント2にインストールされたアプリケーションが既に使用している番号が存在する。これらのTCPポート番号を変更先のTCPポート番号として指定してはならない。そこで、既に使用しているTCPポート番号に対応するキーデータには禁止フラグ“1”を、その他のキーデータには禁止フラグ“0”を対応付けて設定する。禁止フラグ“1”が設定されたキーデータは、変更先のTCPポート番号に対応するキーデータとして抽出されない。
【0022】
図4は、図2に示したキーデータ・TCPポート番号変換テーブル記憶エリア12bに記憶されるキーデータ・TCPポート番号変換テーブルの内容を示す図である。
キーデータ・TCPポート番号変換テーブルには、図4に示すように所定の範囲、例えば0〜255までの256種類のTCPポート番号にキーデータがそれぞれ対応付けられて記憶される。
【0023】
TCPポート番号記憶エリア12dには、現在サーバ1およびクライアント2間のソケット通信に使用されているTCPポート番号およびTCPポート番号変更処理において抽出したTCPポート番号が記憶される。
【0024】
通信インタフェース13は、クライアント2を通信ケーブル3により接続するためのもので、CPU11により入力された制御信号および各種データをクライアント2に送信する。また、クライアント2から送信された制御信号および各種データを受信してCPU11に出力する。
【0025】
図2に示したように、クライアント2は、CPU21に、記憶部22および通信インタフェース23が接続されて構成される。通信インタフェース23は通信ケーブル3と接続される。
【0026】
CPU21は、TCPポート番号の変更に係る制御処理を実行する。つまり、サーバ1により送信されたキーデータを受信する処理、受信したキーデータに基づいて、TCPポート番号を抽出する処理および抽出したTCPポート番号をアプリケーションに対して定義付ける処理を実行する。
【0027】
記憶部22は、記憶部12と同様に、内部に記憶する情報の書き換えが可能なメモリである。
記憶部22は、キーデータとTCPポート番号とを対応付けて記憶する、キーデータ・TCPポート番号変換テーブル22a、TCPポート番号記憶エリア22bおよび作業中のデータを一時的に記憶するバッファメモリ22cが設けられる。また、サーバ1と共通するアプリケーションを記憶するエリアが設けられる。
【0028】
キーデータ・TCPポート番号変換テーブル記憶エリア22aには、サーバ1のキーデータ・TCPポート番号変換テーブル記憶エリア12bに記憶された内容と同一のキーデータ・TCPポート番号変換テーブル(図4参照)が記憶される。
【0029】
TCPポート番号記憶エリア22bには、サーバ1のTCPポート番号記憶エリア12dと同様に、サーバ1およびクライアント2間のソケット通信に使用されているTCPポート番号およびTCPポート番号変更処理において抽出した変更先のTCPポート番号が記憶される。
【0030】
通信インタフェース23は、サーバ1を通信ケーブル3により接続するためのもので、CPU21により入力された制御信号および各種データをサーバ1に送信する。また、サーバ1から送信された制御信号および各種データを受信してCPU21に出力する。
【0031】
次に、前記構成による通信システムのTCPポート番号自動変更処理について説明する。
図5は、前記実施形態に係わる通信システムのTCPポート番号自動変更処理の概要を示す図である。
サーバ1は、旧TCPポート番号つまり変更前のTCPポート番号に基づいてクライアント2とソケット通信を実行している。
サーバ1は、256種類のTCPポート番号に対応するキーデータから変更対象のTCPポート番号の数つまりクライアント2とのソケット通信に使用しているTCPポート番号の数と同数のキーデータを抽出する(ステップS1)。次に、この抽出したキーデータをクライアント2に送信する。クライアント2は、キーデータを受信すると、キーデータを受信した旨を示す受信確認信号をサーバ1に送信する(ステップS12)。サーバ1は、受信確認信号を受信すると、キーデータ・TCPポート番号変換テーブルを読み出して(ステップS4)キーデータに対応するTCPポート番号を抽出する(ステップS5)。
【0032】
一方、クライアント2は、キーデータの受信確認信号をサーバ1に送信するとキーデータ・TCPポート番号変換テーブルを読み出して(ステップS14)、キーデータに対応するTCPポート番号をサーバ1と同様に抽出する(ステップS15)。これにより、サーバ1およびクライアント2に対して共通のTCPポート番号が生成される。
【0033】
そして、新TCPポート番号つまり新たに生成したTCPポート番号に基づいてサーバ1およびクライアント2間のソケット接続を実行する。このソケット接続は、サーバ1およびクライアント2間のソケット通信に先立って、このソケット通信に用いる回線を確保する処理である。
【0034】
次に、サーバ1は、タスクへの割り付け変更処理を実行する(ステップS8)。この割り付け変更処理は、新たに生成したTCPポート番号を、TCPポート番号記憶エリア12dおよび22bに記憶させた上で、サーバ1およびクライアント2にインストールされたアプリケーションが使用する新たなTCPポート番号として定義付ける処理である。割り付け変更処理はクライアント2も実行する(ステップS18)。この割り付け処理は従来から適用される手順を用いることができ、その種別は問わない。
【0035】
そして、旧TCPポート番号に基づいたサーバ1およびクライアント2間のソケット切断を実行する。このソケット切断は、サーバ1およびクライアント2間のソケット通信のために確立されていた回線を切断する処理である。
【0036】
サーバ1は、所定の時間をカウントするとキーデータを再び抽出し、以後は図5に示した処理を繰り返す(ステップS11)。これにより、サーバ1およびクライアント2にインストールされたアプリケーションに対して共通して定義付けされるTCPポート番号が所定時間ごとに変更されることになる。
【0037】
次に、前記構成による通信システムのTCPポート番号自動変更処理の詳細について説明する。
図6は、前記通信システムのTCPポート番号自動変更処理を示すフローチャートである。
まず、サーバ1およびクライアント2との間では、例えば0〜255までの256種類のTCPポート番号のうち1種類または複数種類のTCPポート番号に基づいたソケット通信を実行している。
TCPポート番号記憶エリア12dには、現在ソケット通信に使用中のTCPポート番号、例えば”2”と“255”が記憶される。
【0038】
サーバ1のCPU11は、まず、TCPポート番号記憶エリア12dにアクセスし、現在使用されているTCPポート番号の数を確認する。そして、キーデータ記憶エリア12aに記憶される256種類のキーデータの中から、TCPポート番号記憶エリア12d記憶されるTCPポート番号の数と同数のキーデータを抽出する(ステップS1)。ただし、禁止フラグ“1”が対応付けられたキーデータ、例えば“NHCZSP”および“ZAUCVL”は、既にソケット通信に使用しているTCPポート番号“2”と“255”に対応するキーデータであるので抽出しない。抽出するキーデータは例えば“GGDRME”および“ASOIGY”である。
【0039】
なお、キーデータ記憶エリア12aからキーデータを抽出する方法は、ここで説明した方法に限らず、現在ソケット通信に使用しているTCPポート番号に対応するキーデータと異なるキーデータを抽出する方法であれば、種別は問わない。
【0040】
そして、抽出したキーデータ“GGDRME”および“ASOIGY”を、通信インタフェース13および接続ケーブル3を介してクライアント2に送信する(ステップS2)。
【0041】
このキーデータの送信に係る処理は、例えば、サーバ1の記憶部12およびクライアント2の記憶部22に別途記憶させるIPアドレスに基づいて実行しても良いし、その他の通信プロトコルに基づいて実行しても差し支えない。
【0042】
クライアント2のCPU21は、サーバ1から送信されたキーデータ“GGDRME” および“ASOIGY”を、通信インタフェース23を介して受信すると、これらのキーデータを受信した旨をサーバ1に伝えるキーデータ受信確認信号をサーバ1に送信する(ステップS12,S13)。
【0043】
サーバ1のCPU11は、通信インタフェース13を介してキーデータ受信確認信号を受信すると、記憶部12のキーデータ・TCPポート番号変換テーブル記憶エリア12bに記憶されるキーデータ・TCPポート番号変換テーブルを読み出す(ステップS3,S4)。このキーデータ・TCPポート番号変換テーブルにおいて、前記受信したキーデータ“GGDRME”および“ASOIGY”を検索し、これらのキーデータに対応付けられるTCPポート番号“100”および“254”を抽出する(ステップS5)。これにより、サーバ1およびクライアント2間のソケット通信に使用する新たなTCPポート番号が生成されることになる。
【0044】
一方、クライアント2は、ステップS13によりキーデータ受信確認信号をサーバ1に送信すると、サーバ1と同様にキーデータ・TCPポート番号変換テーブル記憶エリア22aからキーデータ・TCPポート番号変換テーブルを読み出して、キーデータ“GGDRME”および“ASOIGY”に対応するTCPポート番号“100”および“254”を抽出する(ステップS14,S15)。これにより、サーバ1およびクライアント2に対して新規且つ共通のTCPポート番号が生成されることになる。
【0045】
サーバ1のCPU11は、ステップS5により抽出した新TCPポート番号“100”および“254”をTCPポート番号記憶エリア12dに記憶させる(ステップS6)。
【0046】
また、クライアント2のCPU21は、ステップS15により抽出した新TCPポート番号“100”および“254”をTCPポート番号記憶エリア22bに記憶させる(ステップS16)。
【0047】
ステップS6およびステップS16において記憶させた新TCPポート番号“100”および“254”は、既にTCPポート番号記憶エリア12dおよびTCPポート番号記憶エリア22bに記憶される旧TCPポート番号“2”および“255”と、例えばフラグにより区別する。
【0048】
そして、サーバ1およびクライアント2との間では、TCPポート番号記憶エリア12dおよび22bにそれぞれ記憶されたTCPポート番号“100”および“254”に基づいたソケット接続を実行する(ステップS7,S17)。このソケット接続は現在アプリケーションに対して定義付けられているTCPポート番号に関係なく実行される。
【0049】
そして、CPU11は、記憶部12にインストールされたアプリケーションに対するタスクへの割り付け変更処理を実行する。つまり、旧TCPポート番号に代わって、TCPポート番号記憶エリア12dに記憶された新TCPポート番号“100”および“254”をソケット通信に用いるTCPポート番号としてアプリケーションに定義付ける(ステップS8)。この割り付け変更処理は、クライアント2のCPU21も実行する。つまり、記憶部22にインストールされたアプリケーションに対して、TCPポート番号記憶エリア22bに記憶されたTCPポート番号“100”および“254”を旧TCPポート番号に代わって定義付ける(ステップS18)。
そして、サーバ1およびクライアント2間の旧TCPポート番号“2”および“255”によるソケット切断を実行する(ステップS9,S19)。
【0050】
そして、サーバ1は、TCPポート番号記憶エリア12dに記憶されるTCPポート番号の中から、旧TCPポート番号“2”および“255“を削除する(ステップS10)。また、クライアント2では、TCPポート番号記憶エリア22bに記憶されるTCPポート番号の中から、旧TCPポート番号“2”および“255“を削除する(ステップS20)。
【0051】
これに伴い、サーバ1のCPU11は、キーデータ記憶エリア12aに記憶されるキーデータに対応する禁止フラグの書き換えに係る処理を実行する。つまり割り付け変更処理で定義付けた新TCPポート番号に対応するキーデータに対して禁止フラグ“1”を設定し、その他のキーデータに対して禁止フラグ“0”を設定する。
【0052】
なお、TCPポート番号の抽出、ソケット接続、ソケット切断およびTCPポート番号の定義付け処理までの処理に係る手順は、前記示した手順に限らず、旧TCPポート番号のソケット通信への使用を中止し、ステップS5およびステップS15により抽出した新TCPポート番号を新たにソケット通信に使用する手順であれば、その種別は問わない。
【0053】
そして、サーバ1のCPU11は、所定の時間をカウントすると(ステップS11)ステップS1以降の処理を再び実行する。これにより異なるTCPポート番号を定期的に生成してアプリケーションに定義付けることができる。
【0054】
したがって、前記構成の通信システムによれば、サーバ1によりキーデータを抽出すると、このキーデータをクライアント2に送信する。次に、サーバ1およびクライアント2において、キーデータに対応したTCPポート番号を抽出して、サーバ1およびクライアント2間のソケット通信を実行する。そして一定の時間が経過するごとにTCPポート番号を新たに抽出するので、他者の、特定のTCPポート番号に基づいたサーバ1およびクライアント2に対する継続的な不正アクセスの実行を防止することができる。
【0055】
なお、前記実施形態では、サーバ1によりキーデータをランダムに抽出し、このキーデータに基づいてTCPポート番号を抽出し、クライアント2は、サーバ1より受信したキーデータに基づいてサーバ1と共通のTCPポート番号を抽出する構成としたが、キーデータの代わりに、サーバ1において記憶部12に記憶させた例えば256種類のTCPポート番号から所望の数のTCPポート番号をランダムに抽出する。そして、このTCPポート番号をクライアント2に送信するもしくはサーバ1で設定したTCPポート番号と同一のTCPポート番号を設定する旨をクライアント2に指示し、クライアント2はサーバ1が送信したTCPポート番号を受信するもしくはサーバ1と共通のTCPポート番号を生成する構成としてもよい。
【0056】
本発明は前記実施形態に限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で種々に変形することが可能である。更に、前記実施形態には、種々の段階の発明が含まれており、開示される複数の構成要件における適宣な組み合わせにより種々の発明が抽出され得る。例えば、実施形態で示される全構成要件から幾つかの構成要件が削除されても、「発明が解決しようとする課題」で述べた課題が解決でき、「発明の効果」の欄で述べられている効果が得られる場合には、この構成要件が削除された構成が発明として抽出されうる。
【0057】
【発明の効果】
以上のように、本発明の請求項1に係わる通信システムによれば、第1のコンピュータに設定されるキーデータをキーデータ再設定手段により再設定させると、このキーデータをキーデータ送信手段により第2のコンピュータに送信して、このキーデータを受信すると、ポート番号情報設定手段により第1のコンピュータと共通のポート番号情報を設定するとともに、第1のコンピュータのポート番号情報設定手段により共通のポート番号情報を設定する。そして、それぞれ設定したポート番号情報が第1および第2のコンピュータのポート番号情報記憶手段により記憶させ、このポート番号情報に基づいて、通信手段により第1のコンピュータおよび第2のコンピュータ間のソケット通信を実行するようになるので、第1および第2のコンピュータ間の同期をとった上でこれらに共通に設定されるポート番号情報を変更することができる。
【0058】
また、本発明の請求項2に係わる通信システムによれば、第1のコンピュータのカウント手段により所定の時間をカウントするごとに、キーデータ再設定手段によりキーデータが再設定する。そして再設定したキーデータをキーデータ送信手段により第2のコンピュータに送信して、このキーデータを受信すると、ポート番号情報設定手段により第1のコンピュータと共通のポート番号情報を設定するとともに、第1のコンピュータのポート番号情報設定手段により共通のポート番号情報が設定する。そして、それぞれ設定したポート番号情報を第1および第2のコンピュータのポート番号情報記憶手段により記憶させ、このポート番号情報に基づいて、通信手段により第1のコンピュータおよび第2のコンピュータ間のソケット通信を実行するようになるので、ポート番号情報を定期的に変更することができる。
【0059】
したがって、本発明は、コンピュータに対する、特定のポート番号に基づいた不正アクセスを防止することが可能になる。
【図面の簡単な説明】
【図1】本発明の実施形態に係わる通信システムの概要を示す図。
【図2】前記実施形態に係わる通信システムの構成を示すブロック図。
【図3】図2に示したキーデータ記憶エリア12aに記憶されるキーデータの内容を示す図。
【図4】図2に示したキーデータ・TCPポート番号変換テーブル記憶エリア12bに記憶されるキーデータ・TCPポート番号変換テーブルの内容を示す図。
【図5】前記実施形態に係わる通信システムのTCPポート番号自動変更処理の概要を示す図。
【図6】前記通信システムのTCPポート番号自動変更処理を示すフローチャート。
【図7】従来の通信システムによるソケット通信の概要を示す図。
【符号の説明】
1・・同期サーバ
2・・同期クライアント
3・・接続ケーブル
11・・CPU
12・・記憶部
12a・・キーデータ記憶エリア
12b・・キーデータ・TCPポート番号変換テーブル記憶エリア
12c・・バッファメモリ
12d・・TCPポート番号記憶エリア
13・・通信インタフェース
21・・CPU
22・・記憶部
22a・・キーデータ・TCPポート番号変換テーブル
22b・・TCPポート番号記憶エリア
22c・・バッファメモリ
23・・通信インタフェース[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a communication system, a server device, and a socket communication method using, for example, a TCP port number.
[0002]
[Prior art]
FIG. 7 is a diagram showing an outline of socket communication by a conventional communication system.
In the case of performing socket communication between a plurality of, for example, two
[0003]
[Patent Document 1]
JP-A-11-175439
[0004]
[Patent Document 2]
JP-A-7-21724
[0005]
[Problems to be solved by the invention]
However, if the set TCP port number “A” is known by others, there is a risk that the
[0006]
The present invention has been made in view of the above problems, and has as its object to provide a communication system, a server device, and a socket communication method that can prevent unauthorized access to a computer based on a specific port number. .
[0007]
[Means for Solving the Problems]
That is, a communication system according to
[0008]
That is, in the communication system according to
[0009]
The communication system according to
[0010]
That is, in the communication system according to
[0011]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram illustrating an outline of a communication system according to an embodiment of the present invention.
When performing socket communication between a plurality of computers, for example, a synchronization server 1 (hereinafter, referred to as a server 1) and a synchronization client 2 (hereinafter, referred to as a client 2), first, a common application program corresponding to the socket communication (Hereinafter, referred to as an application) are installed in the
[0012]
Therefore, a common socket communication port number corresponding to the application is stored in a communication information management table (not shown) provided in the
When a plurality of types of applications are installed in the
[0013]
In the present embodiment, the TCP port number defined for the application of the
[0014]
FIG. 2 is a block diagram showing the configuration of the communication system according to the embodiment.
The communication system shown in FIG. 2 is configured by connecting a
[0015]
The
[0016]
The
[0017]
As shown in FIG. 2, the
[0018]
The
[0019]
The storage unit 12 is a memory in which information stored therein can be rewritten.
The storage unit 12 has a key
[0020]
FIG. 3 shows the contents of the key data stored in the key
As shown in FIG. 3, the key
[0021]
Further, among the TCP port numbers corresponding to the key data, there are numbers already used by the applications installed in the
[0022]
FIG. 4 is a diagram showing the contents of the key data / TCP port number conversion table stored in the key data / TCP port number conversion
In the key data / TCP port number conversion table, key data is stored in association with a predetermined range, for example, 256 types of TCP port numbers from 0 to 255, as shown in FIG.
[0023]
The TCP port
[0024]
The
[0025]
As shown in FIG. 2, the
[0026]
The
[0027]
The
The
[0028]
In the key data / TCP port number conversion table storage area 22a, the same key data / TCP port number conversion table (see FIG. 4) as the contents stored in the key data / TCP port number conversion
[0029]
Like the TCP port
[0030]
The
[0031]
Next, the TCP port number automatic change processing of the communication system having the above configuration will be described.
FIG. 5 is a diagram showing an outline of a TCP port number automatic change process of the communication system according to the embodiment.
The
The
[0032]
On the other hand, when the
[0033]
Then, the socket connection between the
[0034]
Next, the
[0035]
Then, socket disconnection between the
[0036]
When the
[0037]
Next, the details of the TCP port number automatic change processing of the communication system according to the above configuration will be described.
FIG. 6 is a flowchart showing a TCP port number automatic change process of the communication system.
First, the socket communication is performed between the
In the TCP port
[0038]
First, the
[0039]
The method of extracting key data from the key
[0040]
Then, the extracted key data “GGDRME” and “ASOIGY” are transmitted to the
[0041]
The processing related to the transmission of the key data may be executed based on, for example, an IP address separately stored in the storage unit 12 of the
[0042]
When the
[0043]
When receiving the key data reception confirmation signal via the
[0044]
On the other hand, when the
[0045]
The
[0046]
Further, the
[0047]
The new TCP port numbers “100” and “254” stored in step S6 and step S16 correspond to the old TCP port numbers “2” and “255” already stored in the TCP port
[0048]
Then, a socket connection is performed between the
[0049]
Then, the
Then, the socket is disconnected between the
[0050]
Then, the
[0051]
Accordingly, the
[0052]
Note that the procedures related to the processing up to TCP port number extraction, socket connection, socket disconnection, and TCP port number definition processing are not limited to the above-described procedures, and the use of the old TCP port number for socket communication is stopped. The type does not matter as long as the procedure uses the new TCP port number extracted in steps S5 and S15 for a new socket communication.
[0053]
Then, when the
[0054]
Therefore, according to the communication system having the above configuration, when key data is extracted by the
[0055]
In the above-described embodiment, the
[0056]
The present invention is not limited to the above-described embodiment, and can be variously modified in an implementation stage without departing from the gist of the invention. Further, the embodiment includes inventions at various stages, and various inventions can be extracted by appropriate combinations of a plurality of disclosed constituent elements. For example, even if some components are deleted from all the components shown in the embodiments, the problem described in “Problems to be Solved by the Invention” can be solved, and the problem described in the “Effect of the Invention” section can be solved. In the case where a certain effect can be obtained, a configuration from which this configuration requirement is deleted can be extracted as an invention.
[0057]
【The invention's effect】
As described above, according to the communication system of the first aspect of the present invention, when the key data set in the first computer is reset by the key data resetting means, the key data is transmitted by the key data transmitting means. When the key data is transmitted to the second computer and received, the port number information setting means sets port number information common to the first computer, and the port number information setting means of the first computer sets common port number information. Set the port number information. Then, the set port number information is stored in the port number information storage means of the first and second computers, and based on the port number information, socket communication between the first computer and the second computer is performed by the communication means. Is executed, the port number information commonly set for the first and second computers can be changed after the synchronization between the first and second computers.
[0058]
Further, according to the communication system of the second aspect of the present invention, the key data is reset by the key data resetting unit each time the predetermined time is counted by the counting unit of the first computer. Then, the reset key data is transmitted to the second computer by the key data transmitting means, and when the key data is received, the port number information setting means sets the common port number information with the first computer, Common port number information is set by the port number information setting means of one computer. Then, the set port number information is stored in the port number information storage means of the first and second computers, and based on the port number information, socket communication between the first computer and the second computer is performed by the communication means. , The port number information can be changed periodically.
[0059]
Therefore, the present invention can prevent unauthorized access to a computer based on a specific port number.
[Brief description of the drawings]
FIG. 1 is a diagram showing an outline of a communication system according to an embodiment of the present invention.
FIG. 2 is a block diagram showing a configuration of a communication system according to the embodiment.
FIG. 3 is a view showing contents of key data stored in a key
FIG. 4 is a diagram showing contents of a key data / TCP port number conversion table stored in a key data / TCP port number conversion
FIG. 5 is a view showing an outline of a TCP port number automatic change process of the communication system according to the embodiment.
FIG. 6 is a flowchart showing a TCP port number automatic change process of the communication system.
FIG. 7 is a diagram showing an outline of socket communication by a conventional communication system.
[Explanation of symbols]
1 ... Synchronization server
2. Synchronous client
3. Connection cable
11 CPU
12. Memory unit
12a Key data storage area
12b Key data TCP port number conversion table storage area
12c buffer memory
12d TCP port number storage area
13. Communication interface
21 CPU
22..Storage unit
22a Key data TCP port number conversion table
22b TCP port number storage area
22c buffer memory
23 Communication interface
Claims (8)
前記第1のコンピュータは、
ソケット通信用のポート番号情報に対応するキーデータを設定するキーデータ設定手段と、
このキーデータ設定手段により設定したキーデータを当該キーデータ設定手段に再設定させるキーデータ再設定手段と、
このキーデータ再設定手段にしたがって前記キーデータ設定手段により設定した新たなキーデータを前記第2のコンピュータに送信するキーデータ送信手段と、
前記キーデータ再設定手段にしたがって前記キーデータ設定手段により設定したキーデータに基づいて前記第2のコンピュータと共通のポート番号情報を設定するポート番号情報設定手段と、
このポート番号情報設定手段により設定したポート番号情報を記憶させるポート番号情報記憶手段と、
このポート番号情報記憶手段により記憶したポート番号情報に基づいて、このポート番号情報と共通のポート番号情報が記憶された前記第2のコンピュータと通信する通信手段と
を備え、
前記第2のコンピュータは、
前記第1のコンピュータにより送信されたキーデータを受信するキーデータ受信手段と、
このキーデータ受信手段により受信したキーデータに基づいて前記第1のコンピュータと共通のポート番号情報を設定するポート番号情報設定手段と、
このポート番号情報設定手段により設定した新たなポート番号情報を記憶させるポート番号情報記憶手段と、
このポート番号情報記憶手段により記憶したポート番号情報に基づいて、このポート番号情報と共通のポート番号情報が記憶された前記第1のコンピュータと通信する通信手段と
を備えたことを特徴とする通信システム。In a communication system including a first computer and a second computer,
The first computer comprises:
Key data setting means for setting key data corresponding to port number information for socket communication,
Key data resetting means for resetting the key data set by the key data setting means to the key data setting means;
Key data transmitting means for transmitting new key data set by the key data setting means to the second computer according to the key data resetting means;
Port number information setting means for setting port number information common to the second computer based on key data set by the key data setting means according to the key data resetting means;
Port number information storage means for storing the port number information set by the port number information setting means,
Based on the port number information stored by the port number information storage means, a communication means for communicating with the second computer in which the port number information and the common port number information are stored;
The second computer comprises:
Key data receiving means for receiving key data transmitted by the first computer;
Port number information setting means for setting port number information common to the first computer based on the key data received by the key data receiving means;
Port number information storage means for storing new port number information set by the port number information setting means;
Communication means for communicating with the first computer in which the port number information and the common port number information are stored based on the port number information stored by the port number information storage means. system.
前記キーデータ再設定手段は、前記カウント手段により所定の時間をカウントするごとに、前記キーデータ設定手段により設定したキーデータを再設定させることを特徴とする請求項1に記載の通信システム。The first computer further includes a counting unit,
2. The communication system according to claim 1, wherein the key data resetting means resets the key data set by the key data setting means every time a predetermined time is counted by the counting means.
前記第1のコンピュータは、
ソケット通信用のポート番号情報を設定するポート番号情報設定手段と、
このポート番号情報設定手段により設定したポート番号情報を当該ポート番号情報設定手段に再設定させるポート番号情報再設定手段と、
このポート番号情報再設定手段にしたがって前記ポート番号情報設定手段により設定したポート番号情報を記憶させるポート番号情報記憶手段と、
前記ポート番号情報再設定手段にしたがって前記ポート番号情報設定手段により設定したポート番号情報と共通のポート番号情報を設定する旨を前記第2のコンピュータに指示する共通ポート番号情報設定指示手段と、
前記ポート番号情報記憶手段により記憶したポート番号情報に基づいて、このポート番号情報と共通のポート番号情報が設定されて記憶された前記第2のコンピュータと通信する通信手段と
を備え、
前記第2のコンピュータは、
前記第1のコンピュータによる指示にしたがって、前記第1のコンピュータと共通のポート番号情報を設定する共通ポート番号情報設定手段と、
この共通ポート番号情報設定手段により設定したポート番号情報を記憶させるポート番号情報記憶手段と、
このポート番号情報記憶手段により記憶したポート番号情報に基づいて、このポート番号情報と共通のポート番号情報が設定されて記憶された前記第1のコンピュータと通信する通信手段と
を備えたことを特徴とする通信システム。In a communication system including a first computer and a second computer,
The first computer comprises:
Port number information setting means for setting port number information for socket communication;
Port number information resetting means for resetting the port number information set by the port number information setting means to the port number information setting means,
Port number information storage means for storing the port number information set by the port number information setting means according to the port number information resetting means,
Common port number information setting instructing means for instructing the second computer to set common port number information with the port number information set by the port number information setting means according to the port number information resetting means;
Based on the port number information stored by the port number information storage means, comprising communication means for communicating with the second computer in which the port number information and the common port number information are set and stored;
The second computer comprises:
Common port number information setting means for setting port number information common to the first computer in accordance with an instruction from the first computer;
Port number information storage means for storing the port number information set by the common port number information setting means,
Communication means for communicating with the first computer in which port number information common to the port number information is set and stored based on the port number information stored by the port number information storage means. Communication system.
前記ポート番号情報再設定手段は、前記カウント手段により所定の時間をカウントするごとに前記ポート番号情報設定手段により設定したポート番号情報を再設定させることを特徴とする請求項3に記載の通信システム。The first computer further includes a counting unit,
4. The communication system according to claim 3, wherein said port number information resetting means resets the port number information set by said port number information setting means every time a predetermined time is counted by said counting means. .
このキーデータ設定手段により設定したキーデータを当該キーデータ設定手段に再設定させるキーデータ再設定手段と、
このキーデータ再設定手段にしたがって前記キーデータ設定手段により設定した新たなキーデータを他のコンピュータに送信するキーデータ送信手段と、
前記キーデータ再設定手段にしたがって前記キーデータ設定手段により設定したキーデータに基づいて前記他のコンピュータと共通のポート番号情報を設定するポート番号情報設定手段と、
このポート番号情報設定手段により設定したポート番号情報を記憶させるポート番号情報記憶手段と、
このポート番号情報記憶手段により記憶したポート番号情報に基づいて、このポート番号情報と共通のポート番号情報が記憶された前記他のコンピュータと通信する通信手段と
を備えたことを特徴とするサーバ装置。Key data setting means for setting key data corresponding to port number information for socket communication,
Key data resetting means for resetting the key data set by the key data setting means to the key data setting means;
Key data transmitting means for transmitting new key data set by the key data setting means to another computer according to the key data resetting means;
Port number information setting means for setting port number information common to the other computer based on the key data set by the key data setting means according to the key data resetting means,
Port number information storage means for storing the port number information set by the port number information setting means,
Communication means for communicating with the other computer storing the port number information and the common port number information based on the port number information stored by the port number information storage means. .
前記キーデータ再設定手段は、前記カウント手段により所定の時間をカウントするごとに、前記キーデータ設定手段により設定したキーデータを再設定させることを特徴とする請求項5に記載のサーバ装置。Furthermore, it has a counting means,
6. The server device according to claim 5, wherein the key data resetting unit resets the key data set by the key data setting unit every time a predetermined time is counted by the counting unit.
前記第1のコンピュータは、
ソケット通信用のポート番号情報に対応するキーデータを設定するキーデータ設定ステップと、
このキーデータ設定ステップにより設定したキーデータを当該キーデータ設定ステップに再設定させるキーデータ再設定ステップと、
このキーデータ再設定ステップにしたがって前記キーデータ設定ステップにより設定した新たなキーデータを前記第2のコンピュータに送信するキーデータ送信ステップと、
前記キーデータ再設定ステップにしたがって前記キーデータ設定ステップにより設定したキーデータに基づいて前記第2のコンピュータと共通のポート番号情報を設定するポート番号情報設定ステップと、
このポート番号情報設定ステップにより設定したポート番号情報を記憶させるポート番号情報記憶手段と、
このポート番号情報記憶手段により記憶したポート番号情報に基づいて、このポート番号情報と共通のポート番号情報が記憶された前記第2のコンピュータと通信する通信ステップと
を有し、
前記第2のコンピュータは、
前記第1のコンピュータにより送信されたキーデータを受信するキーデータ受信ステップと、
このキーデータ受信ステップにより受信したキーデータに基づいて前記第1のコンピュータと共通のポート番号情報を設定するポート番号情報設定ステップと、
このポート番号情報設定ステップにより設定した新たなポート番号情報を記憶させるポート番号情報記憶手段と、
このポート番号情報記憶手段により記憶したポート番号情報に基づいて、このポート番号情報と共通のポート番号情報が記憶された前記第1のコンピュータと通信する通信ステップと
を有したことを特徴とするソケット通信方法。A socket communication method used in a communication system including a first computer and a second computer,
The first computer comprises:
A key data setting step of setting key data corresponding to port number information for socket communication,
A key data resetting step of resetting the key data set by the key data setting step to the key data setting step;
A key data transmitting step of transmitting new key data set in the key data setting step to the second computer according to the key data resetting step;
A port number information setting step of setting common port number information with the second computer based on the key data set in the key data setting step according to the key data resetting step;
Port number information storage means for storing the port number information set in the port number information setting step;
Based on the port number information stored by the port number information storage means, a communication step of communicating with the second computer in which the port number information and the common port number information are stored,
The second computer comprises:
A key data receiving step of receiving key data transmitted by the first computer;
A port number information setting step of setting port number information common to the first computer based on the key data received in the key data receiving step;
Port number information storage means for storing new port number information set in the port number information setting step;
A communication step for communicating with the first computer in which the port number information and the common port number information are stored based on the port number information stored by the port number information storage means. Communication method.
前記キーデータ再設定ステップは、前記カウントステップにより所定の時間をカウントするごとに、前記キーデータ設定ステップにより設定したキーデータを再設定させることを特徴とする請求項7に記載のソケット通信方法。The first computer further includes a counting step,
8. The socket communication method according to claim 7, wherein in the key data resetting step, the key data set in the key data setting step is reset every time a predetermined time is counted in the counting step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003044725A JP2004252877A (en) | 2003-02-21 | 2003-02-21 | Communication system, server device, and socket communication method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003044725A JP2004252877A (en) | 2003-02-21 | 2003-02-21 | Communication system, server device, and socket communication method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004252877A true JP2004252877A (en) | 2004-09-09 |
Family
ID=33027338
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003044725A Pending JP2004252877A (en) | 2003-02-21 | 2003-02-21 | Communication system, server device, and socket communication method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004252877A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007072856A (en) * | 2005-09-08 | 2007-03-22 | Nippon Telegraph & Telephone East Corp | Network service security system and network service security method |
JP2007081971A (en) * | 2005-09-15 | 2007-03-29 | Matsushita Electric Ind Co Ltd | Ip communication apparatus and ip phone |
-
2003
- 2003-02-21 JP JP2003044725A patent/JP2004252877A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007072856A (en) * | 2005-09-08 | 2007-03-22 | Nippon Telegraph & Telephone East Corp | Network service security system and network service security method |
JP4647440B2 (en) * | 2005-09-08 | 2011-03-09 | 東日本電信電話株式会社 | Network service security system and network service security method |
JP2007081971A (en) * | 2005-09-15 | 2007-03-29 | Matsushita Electric Ind Co Ltd | Ip communication apparatus and ip phone |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102288521B1 (en) | Apparatus and method for storing data based on blockchain | |
CN109189749A (en) | File synchronisation method and terminal device | |
CN106571942B (en) | Configuration data updating method, client and server | |
WO2016173194A1 (en) | Updating method, device and system for information about resources | |
CN107766127A (en) | Transaction message processing method, device, equipment and system | |
CN106533976B (en) | data packet processing method and device | |
CN107277163B (en) | Equipment remote mapping method and device | |
CN113038192A (en) | Video processing method and device, electronic equipment and storage medium | |
CN112039876A (en) | Data ferrying method, device, equipment and medium | |
JP2004252877A (en) | Communication system, server device, and socket communication method | |
CN106487884A (en) | Data transmission method and client | |
CN106331051A (en) | File transmission method and system, file receiving device and file transmission device | |
JP6742847B2 (en) | Server device, detoxification method, and program | |
CN101662368A (en) | Network data filtering device capable of fighting against Trojan horse programs and corresponding method | |
CN104065511A (en) | Zoning method and system for automatic deployment of SAN switch | |
CN113037696B (en) | Data transmission method, system server, storage medium and computer equipment | |
CN111736859B (en) | Version updating method of operating system, server and terminal | |
CN112350982B (en) | Resource authentication method and device | |
CN113852624A (en) | Data cross-network transmission method, device and computer medium thereof | |
CN105933352A (en) | Data synchronization method and system between servers based on client and client | |
US9184996B2 (en) | Thin client system, management server, client environment management method and program | |
JP3965774B2 (en) | Network system | |
JP2007156644A (en) | Authentication system | |
CN113014610A (en) | Remote access method, device and system | |
CN103685510A (en) | Service-side-based-operating multi-terminal-oriented media resource synchronization method and system |