JP3999238B2 - Address translation method and apparatus - Google Patents
Address translation method and apparatus Download PDFInfo
- Publication number
- JP3999238B2 JP3999238B2 JP2005183522A JP2005183522A JP3999238B2 JP 3999238 B2 JP3999238 B2 JP 3999238B2 JP 2005183522 A JP2005183522 A JP 2005183522A JP 2005183522 A JP2005183522 A JP 2005183522A JP 3999238 B2 JP3999238 B2 JP 3999238B2
- Authority
- JP
- Japan
- Prior art keywords
- address
- address translation
- packet
- terminal
- source
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Small-Scale Networks (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Description
本発明は、インターネットとローカルエリアネットワーク(LAN)とを相互に接続し、インターネットで使われるアドレスとLANで使われるアドレスとを相互変換して、インターネットで使われる1つのアドレスによりLAN内の複数の端末がインターネットへアクセスできるようにするアドレス変換方法及びその装置に関する。 The present invention interconnects the Internet and a local area network (LAN), mutually converts an address used in the Internet and an address used in the LAN, and uses a plurality of addresses in the LAN by one address used in the Internet. The present invention relates to an address conversion method and apparatus for enabling a terminal to access the Internet.
従来、インターネットで使われる1つ(場合によっては複数)のアドレス(グローバルアドレス)を、LAN内で使用されるアドレス(プライベートアドレス)しか持たない複数の端末で共有して、該複数の端末がインターネットにアクセスできるようにするアドレス変換装置(NAT(Network Address Translator)装置)が知られている。 Conventionally, a single address (global address) used in the Internet is shared by a plurality of terminals having only addresses (private addresses) used in the LAN, and the plurality of terminals are connected to the Internet. 2. Description of the Related Art An address translation device (NAT (Network Address Translator) device) that enables access to a network is known.
また、インターネット側からのアクセスを、TCP(Transmission Control Protocol)またはUDP(User Datagram Protocol)の宛先のポート番号により端末装置に振り分けることにより、同時に複数の端末がインターネットにアクセスできるようにするものもある。 In addition, there is also a method in which a plurality of terminals can access the Internet at the same time by allocating access from the Internet side to terminal devices by TCP (Transmission Control Protocol) or UDP (User Datagram Protocol) destination port numbers. .
このようなアドレス変換装置によりインターネットと接続されたLAN内の端末が、インターネット上の端末とIPsec(Security Architecture for Internet Protocol)により通信する場合、IPsecではポート番号が無いので、1つのグローバルアドレスに対して1つの端末を割り当てることしかできず、1つのグローバルアドレスを複数の端末で利用することができなかった。 When a terminal in a LAN connected to the Internet by such an address translation device communicates with a terminal on the Internet by IPsec (Security Architecture for Internet Protocol), since there is no port number in IPsec, one terminal is assigned to one global address. Thus, only one terminal can be allocated, and one global address cannot be used by a plurality of terminals.
このような問題を解決するため、IPsecのパケットをUDPのパケットにカプセル化して送るようにしたものもある(例えば、特許文献1参照)。
しかしながら、このような従来のアドレス変換装置では、IPsec通信を行う双方でUDPパケットへのカプセル化に対応している必要があり、UDPパケットへのカプセル化に対応していない端末とは通信することができなかった。 However, in such a conventional address translation device, it is necessary to support encapsulation in a UDP packet in both performing IPsec communication, and communication with a terminal that does not support encapsulation in a UDP packet is required. I could not.
本発明は、上記の問題点に鑑み、事前登録を行うことなく、IPsec通信を行う端末で他のプロトコル等に対応していなくても、1つのグローバルアドレスにより複数のIPsec通信を行わせることができるアドレス変換方法及びその装置を提供することを目的とする。 In view of the above problems, the present invention allows a plurality of IPsec communications to be performed by one global address without performing pre-registration, even if a terminal that performs IPsec communications does not support other protocols. It is an object of the present invention to provide an address translation method and apparatus that can perform this.
上記課題を解決するため、本発明のアドレス変換方法は、アドレス変換ルールが登録されるデータベースを有し、ローカルなネットワークとグローバルなネットワークとを相互に接続するアドレス変換装置を用いて、前記ローカルなネットワークで使用されるアドレスと前記グローバルなネットワークで使用されるアドレスとを相互に変換するアドレス変換方法であって、前記アドレス変換装置は、前記グローバルなネットワークの端末から受信したセッションを受け付け、該端末のアドレスを送信元とするパケットに対するアドレス変換ルールをデータベースに追加登録し、前記ローカルなネットワークの端末からIPsec通信の開始を示すパケットを受信したときに、該パケットの宛先アドレス及び送信元アドレスのIPsecパケットに対するアドレス変換ルールが前記データベースに登録されていなければ、該宛先アドレス及び送信元アドレスのIPsecパケットに対するアドレス変換ルールを前記データベースに追加登録し、
前記ローカルなネットワークで使用されるアドレスと前記グローバルなネットワークで使用されるアドレスとを、前記データベースに登録されているアドレス変換ルールに基づいて相互に変換することを特徴とする。
In order to solve the above problems, an address translation method of the present invention includes a database in which address translation rules are registered, and uses the address translation apparatus that connects a local network and a global network to each other. An address translation method for mutually converting an address used in a network and an address used in the global network, wherein the address translation device accepts a session received from a terminal of the global network, and the terminal When the packet indicating the start of IPsec communication is received from the terminal of the local network, the destination address of the packet and the IPsec of the source address are registered. Packet If the address conversion rule is not registered in the database for, and additionally registers the address conversion rule for IPsec packet the destination and source addresses in the database,
An address used in the local network and an address used in the global network are converted to each other based on an address conversion rule registered in the database.
また、上記課題を解決するため、本発明のアドレス変換装置は、ローカルなネットワークとグローバルなネットワークとを相互に接続し、前記ローカルなネットワークで使用されるアドレスと前記グローバルなネットワークで使用されるアドレスとを相互に変換するアドレス変換装置であって、前記ローカルなネットワークで使用されるアドレスとグローバルなネットワークで使用されるアドレスとを、データベースに登録されているアドレス変換ルールに基づいて相互に変換するアドレス変換手段と、前記データベースと、前記グローバルなネットワークの端末から受信したセッションを受け付け、該端末のアドレスを送信元とするパケットに対するアドレス変換ルールを前記データベースに追加登録する手段と、前記ローカルなネットワークの端末からIPsec通信の開始を示すパケットを受信したときに、該パケットの宛先アドレス及び送信元アドレスのIPsecパケットに対するアドレス変換ルールが前記データベースに登録されていなければ、該宛先アドレス及び送信元アドレスのIPsecパケットに対するアドレス変換ルールを前記データベースに追加登録する手段とを備えていることを特徴とする。 In order to solve the above problems, an address translation device of the present invention interconnects a local network and a global network, and uses an address used in the local network and an address used in the global network. Conversion device that mutually converts addresses used in the local network and addresses used in the global network based on address conversion rules registered in the database An address translation means; a database; means for accepting a session received from a terminal of the global network; and additionally registering in the database an address translation rule for a packet whose source is the address of the terminal; and the local network When a packet indicating the start of IPsec communication is received from a terminal of the network, if the address translation rule for the IPsec packet of the destination address and source address of the packet is not registered in the database, the destination address and source address Means for additionally registering an address translation rule for the IPsec packet in the database.
本発明により、グローバルなネットワークとローカルなネットワークとの間の通信においてアドレス変換する際に、グローバルなネットワークから受信したパケットに対する送信元アドレスに対応したアドレス変換ルールが追加されて適用される。したがって、送信元アドレスが異なっていれば、同じプロトコルやポート番号でも異なる変換ルールが適用される。さらに、ローカルなネットワークの端末からのIPsec通信の開始を示すパケット(IKEの最初のパケットや最初のIPsecパケット)により、該パケットの宛先アドレス及び送信元アドレスのIPsecパケットに対するアドレス変換ルールが追加され適用される。したがって、ローカルなネットワークの端末から開始されるIPsec通信のアドレス変換ルールは自動的に登録される。 According to the present invention, when address conversion is performed in communication between a global network and a local network, an address conversion rule corresponding to a transmission source address for a packet received from the global network is added and applied. Therefore, if the source address is different, different conversion rules are applied even with the same protocol and port number. Furthermore, an address conversion rule is added to the packet indicating the start of IPsec communication from the terminal of the local network (the first packet of IKE or the first IPsec packet) for the IPsec packet of the destination address and the source address of the packet. Is done. Therefore, the address conversion rule for IPsec communication started from the terminal of the local network is automatically registered.
また、前記セッションの切断時には、前記セッションにより追加されたアドレス変換ルールを削除するとよい。 In addition, when the session is disconnected, the address translation rule added by the session may be deleted.
これにより、セッションの切断時にはアドレス変換ルールが削除され、変更した設定による誤ったアクセスを防ぐことができる。 Thereby, the address translation rule is deleted when the session is disconnected, and erroneous access due to the changed setting can be prevented.
本発明によれば、グローバルなネットワークの端末からのセッションにより該端末のアドレスを送信元とするパケットに対するアドレス変換ルールを追加しているので、送信元アドレスが異なっているパケットには異なったアドレス変換ルールを適用させることができ、同じポート番号で複数のサーバを公開したり、ポート番号の無いプロトコルで同時に複数の通信を行わせたりすることができる。 According to the present invention, an address translation rule is added to a packet whose source is the address of the terminal by a session from a terminal on the global network, so that a different address translation is used for a packet having a different source address. A rule can be applied, and a plurality of servers can be disclosed with the same port number, or a plurality of communications can be performed simultaneously with a protocol without a port number.
また、ローカルなネットワークの端末からのIPsecパケットを受信したとき、該パケットに対するアドレス変換ルールが登録されていなければ、該パケットに対するアドレス変換ルールを追加しているので、ローカルなネットワークの端末から開始されるIPsec通信のアドレス変換ルールを自動的に登録することができ、事前のアドレス変換ルールの登録無しにIPsec通信を行わせることができる。 In addition, when an IPsec packet is received from a local network terminal, if an address translation rule for the packet is not registered, an address translation rule for the packet is added. It is possible to automatically register an IPsec communication address conversion rule, and to perform IPsec communication without registering a prior address conversion rule.
以下、本発明の一実施形態を図面を参照して説明する。 Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
図1は本発明の一実施形態のアドレス変換装置を示すブロック図である。 FIG. 1 is a block diagram showing an address translation apparatus according to an embodiment of the present invention.
図1において、1は本実施形態のアドレス変換装置で、インターネット等のグローバルなネットワークとローカルエリアネットワーク(LAN)との間に介在されてこれらに接続され、インターネットなどのWAN(Wide Area Network)とのパケットの送受信を行うWAN側ネットワークインターフェース部11と、ローカルなネットワークであるLANとのパケットの送受信を行うLAN側ネットワークインターフェース部12と、WAN側ネットワークインターフェース部11およびLAN側ネットワークインターフェース部12が受信したパケットを分析してアクセス制御を行うアクセス制御部13と、アクセス制御部13で通過が許可されたパケットおよびLAN内からWAN側へ送信されるパケットを分析してアドレス変換を行うアドレス変換部14と、アクセス制御部13の要求によりユーザの認証処理を行う認証処理部15と、アクセス制御のためのデータやアドレス変換のためのデータ及び認証のデータを蓄えているデータベース部16とを備えている。
In FIG. 1,
このアドレス変換装置1は、ファイアウォール機能を備えており、アクセス制御部13は、データベース部16に記憶されている図2に示すようなアクセス制御テーブルに基づいて、WAN側ネットワークインターフェース部11で受信したパケットをLAN側ネットワークインターフェース部12を介してLAN側に送信するか否かを決定している。
This
図2に示すアクセス制御テーブルにおいて、「ソースIPアドレス」の列は、WAN側ネットワークインターフェース部11で受信したパケットの送信元IPアドレスを示し、「プロトコル、ソースポート番号」の列は、WAN側ネットワークインターフェース部11で受信したパケットのプロトコル名および該プロトコルでポート番号を使用する場合の送信元ポート番号を示し、「ディスティネーションIPアドレス」の列は、WAN側ネットワークインターフェース部11で受信したパケットの宛先IPアドレスを示し、「プロトコル、ディスティネーションポート番号」の列は、WAN側ネットワークインターフェース部11で受信したパケットのプロトコル名および該プロトコルでポート番号を使用する場合の宛先ポート番号を示し、「動作」の列は、WAN側ネットワークインターフェース部11で受信したパケットの送信元および宛先が、当該行のそれぞれの値に一致したときに、そのパケットに対して行われる動作を示している。
In the access control table shown in FIG. 2, the “source IP address” column indicates the source IP address of the packet received by the WAN-side
なお、「プロトコル、ソースポート番号」および「プロトコル、ディスティネーションポート番号」の列で使用されるプロトコル名として、予め設定されてたプロトコル名とポート番号に対応付けられたプロトコル名を使用することができる。 As a protocol name used in the columns of “protocol, source port number” and “protocol, destination port number”, a protocol name associated with a preset protocol name and port number may be used. it can.
例えば、図2に示すアクセス制御テーブルの1行目では、送信元IPアドレス、ポート番号に関係なく、宛先IPアドレスが「111.111.111.2」でかつプロトコル名が「http(HyperText Transport Protocol、例えばTCP(Transmission Control Protocol)の80)」であるパケットは、LAN側に送信される(accept)。 For example, in the first row of the access control table shown in FIG. 2, the destination IP address is “111.111.111.2” and the protocol name is “http (HyperText Transport Protocol, eg, TCP (), regardless of the source IP address and port number. The packet “80)” of Transmission Control Protocol is transmitted to the LAN side (accept).
同様に、図2に示すアクセス制御テーブルの2行目では、送信元IPアドレスが「123.123.123.1」で、宛先IPアドレスが「111.111.111.2」でかつプロトコル名が「ssh(Secure SHell、例えばTCPの22)」であるパケットは、LAN側に送信され、3行目では、全てのパケットが廃棄される(drop)。 Similarly, in the second row of the access control table shown in FIG. 2, the source IP address is “123.123.123.1”, the destination IP address is “111.111.111.2”, and the protocol name is “ssh (Secure SHell, eg, TCP 22) ”is transmitted to the LAN side, and in the third line, all packets are dropped.
アクセス制御部13は、このようなアクセス制御テーブルの上の行から順に、受信したパケットが一致するか否かを検証し、一致すれば指定された動作を行い、そのパケットに対する処理は終了する。すなわち、図2に示したアクセス制御テーブルでは、上の行に設定された条件がより優先的に処理される条件となっている。
The
また、このアドレス変換装置1は、データベース部16に、図3に示すようなアドレス変換テーブルを記憶しており、アドレス変換部14は、このテーブルに基づいて、WAN側ネットワークインターフェース部11で受信しアクセス制御部13を通過したパケットのディスティネーションIPアドレスをLANの内部のIPアドレスに変換して、LAN側ネットワークインターフェース部12を介してLAN側に送信する。
Further, the
また、LAN側ネットワークインターフェース部12で受信したパケットのソースIPアドレスをWANのIPアドレス(グローバルアドレス)に変換して、アクセス制御部13に出力し、アクセス制御部13で許可されたパケットがWAN側ネットワークインターフェース部11を介してWAN側に送信される。
Also, the source IP address of the packet received by the LAN-side
図3に示すアドレス変換テーブルにおいて、「ソースIPアドレス」の列は、WAN側ネットワークインターフェース部11で受信したパケットの送信元IPアドレスを示し、「ディスティネーションIPアドレス」の列は、WAN側ネットワークインターフェース部11で受信したパケットの宛先IPアドレスを示し、「プロトコル、ディスティネーションポート番号」の列は、WAN側ネットワークインターフェース部11で受信したパケットのプロトコル名および該プロトコルでポート番号を使用する場合の宛先ポート番号を示し、「内部IPアドレス」の列は、WAN側ネットワークインターフェース部11で受信したパケットの送信元および宛先が、当該行のそれぞれの値に一致したときに、そのパケットの宛先IPアドレスに設定するLANのプライベートアドレスを示し、「プロトコルおよびポート番号」の列は、WAN側ネットワークインターフェース部11で受信したパケットの送信元および宛先が、当該行のそれぞれの値に一致したときに、そのパケットの宛先ポート番号に設定するポート番号を示している。
In the address conversion table shown in FIG. 3, the “source IP address” column indicates the source IP address of the packet received by the WAN-side
例えば、図3に示すアドレス変換テーブルの1行目では、送信元IPアドレスに関係なく、宛先IPアドレスが「111.111.111.2」でかつ宛先ポート番号が「TCPの80(http)」であるパケットは、宛先IPアドレスを「192.168.100.5」に書き替えられ、宛先ポート番号はそのままでLAN側に送信される。 For example, in the first row of the address conversion table shown in FIG. 3, regardless of the source IP address, a packet with a destination IP address “111.111.111.2” and a destination port number “TCP 80 (http)” The destination IP address is rewritten to “192.168.100.5”, and the destination port number is sent as it is to the LAN side.
同様に、図3に示すアドレス変換テーブルの2行目では、送信元IPアドレスが「123.123.123.1」で、宛先IPアドレスが「111.111.111.2」でかつ宛先ポート番号が「TCPの22(SSH)」であるパケットは、宛先IPアドレスを「192.168.100.5」に書き替えられ、宛先ポート番号はそのままでLAN側に送信される。 Similarly, in the second row of the address conversion table shown in FIG. 3, the source IP address is “123.123.123.1”, the destination IP address is “111.111.111.2”, and the destination port number is “TCP 22 (SSH)”. The destination IP address is rewritten to “192.168.100.5” and the destination port number is transmitted to the LAN side as it is.
このように設定することで、WAN側からの特定ポートまたはポートを持たないプロトコルへのアクセスをLAN内の端末に振り分けることができる。 By setting in this way, access to a specific port or a protocol having no port from the WAN side can be distributed to terminals in the LAN.
また、アドレス変換部14は、このようなアドレス変換テーブルの上の行から順に、受信したパケットが一致するか否かを検証し、一致すれば指定された動作を行い、そのパケットに対する処理は終了する。すなわち、図3のアドレス変換テーブルでは、上の行に設定された条件がより優先的に処理される条件となっている。
Further, the
また、図3に示したアドレス変換テーブルの状態は、初期状態で、通信中の端末が無い状態のものであり、LAN内に存在する端末からの通信要求により、また後述するWAN側の端末からの要求により、アドレス変換ルールが追加されて、WAN側からLAN内へのパケット、LAN内からWAN側へのパケットのそれぞれのアドレスが図3のアドレス変換テーブルに従って変換されて送信される。 Further, the address conversion table shown in FIG. 3 is in an initial state in which there is no terminal in communication, and a communication request from a terminal existing in the LAN causes a WAN side terminal to be described later. In response to the request, an address conversion rule is added, and addresses of packets from the WAN side to the LAN and packets from the LAN to the WAN side are converted according to the address conversion table of FIG. 3 and transmitted.
このアドレス変換装置1は、WAN側の端末からの要求により、図2のアクセス制御テーブルにアクセス制御ルールを追加し、図3のアドレス変換テーブルにアドレス変換ルールを追加できるようになっている。
The
具体的には、アクセス制御部13は、自装置のグローバルアドレス宛のhttps(HyperText Transfer Protocol Security)のアクセス要求パケットをWAN側ネットワークインターフェース部11を介して受信すると、送信元の端末とSSL(Secure Socket Layer)セッションの確立を行い、セッションが正常に確立されれば、セッション確立時に取得した送信元端末のIPアドレスを記憶し、ユーザの認証を行うためにユーザの識別情報とパスワードを入力させるHTMLファイルを暗号化して要求元の端末に対してWAN側ネットワークインターフェース部11を介して送信する。
Specifically, when the
要求元の端末から、暗号化されたユーザの識別情報とパスワードを受信すると、アクセス制御部13は、復号化を行い、ユーザの識別情報とパスワードを認証処理部15に送信しユーザの認証を要求する。
Upon receiving the encrypted user identification information and password from the requesting terminal, the
認証処理部15は、ユーザの識別情報とパスワードを受信すると、データベース部16に蓄積しているユーザの情報から、受信したユーザ識別情報と一致する識別情報を持つユーザを検索し、一致するユーザが見つかれば、蓄積しているそのユーザのパスワードと受信したパスワードを比較し、これらが一致していれば、認証正常通知をアクセス制御部13に送信する。一致するユーザが見つからなかったり、パスワードが一致しなかった場合は、認証異常通知をアクセス制御部13に送信する。
Upon receiving the user identification information and the password, the
アクセス制御部13は、認証処理部15から認証正常通知を受信すると、アクセスしたいサーバのLAN内部のプライベートアドレスやプロトコルやポート番号などを入力させるHTMLファイルを暗号化して要求元の端末に対してWAN側ネットワークインターフェース部11を介して送信する。
When the
要求元の端末から、暗号化されたプライベートアドレスやプロトコルやポート番号を受信すると、アクセス制御部13は、復号化を行い、データベース部16に蓄積しているアクセス制御テーブルに、記憶しているhttpsのアクセス要求パケットの送信元IPアドレスを「ソースIPアドレス」とし、受信したプロトコル、ポート番号を「プロトコル、ディスティネーションポート番号」としたアクセス制御ルールを追加し、アドレス変換部14に対して、httpsのアクセス要求パケットの送信元IPアドレス、受信したプライベートアドレス、プロトコル、ポート番号とともにアドレス変換ルールの追加を要求する。
Upon receiving an encrypted private address, protocol, or port number from the requesting terminal, the
アドレス変換部14は、アドレス変換ルールの追加要求を受けると、データベース部16に蓄積しているアドレス変換テーブルに、httpsのアクセス要求パケットの送信元IPアドレスを「ソースIPアドレス」とし、受信したプライベートアドレス、プロトコル、ポート番号を「内部IPアドレス」、「プロトコル、ディスティネーションポート番号」としたアドレス変換ルールを追加する。
Upon receiving an address translation rule addition request, the
例えば、送信元IPアドレスが111.222.234.123の端末からの、httpsのアクセス要求パケットにより、宛先IPアドレス111.111.111.2の宛先ポート番号が「TCPの22」のパケットの宛先IPアドレスを内部IPアドレス192.168.100.4に書き替えるようにする場合、アクセス制御テーブルは、図4に示すように、図2に示したアクセス制御テーブルの一番上の行に、httpsによりアクセスしてきた端末のアクセス制御ルールを追加したものとされる。また、アドレス変換テーブルは、図5に示すように、図3に示したアドレス変換テーブルの一番上の行に、httpsによりアクセスしてきた端末のアドレス変換ルールを追加したものとされる。
For example, an https access request packet from a terminal with a source IP address of 111.222.234.123 indicates that the destination IP address of the packet with the destination port number 111.111.111.2 and the destination port number “
これにより、送信元IPアドレスが111.222.234.123の宛先IPアドレス111.111.111.2の宛先ポート番号が「TCPの22」のパケットは、アクセス制御部13を通過し、アドレス変換部14で宛先IPアドレスを192.168.100.4に書き替えられてLANに送信され、送信元IPアドレスが123.123.123.1の宛先IPアドレス111.111.111.2の宛先ポート番号が「TCPの22」のパケットは、アクセス制御部13を通過し、アドレス変換部14で宛先IPアドレスを192.168.100.5に書き替えられてLANに送信され、それ以外の送信元IPアドレスの宛先ポート番号が「TCPの22」のパケットは、アクセス制御部13で廃棄される。
As a result, the packet with the destination IP address 111.111.111.2 with the source IP address 111.222.234.123 and the destination port number “
その後、アクセス制御部13は、端末に対して、認証が正常でアドレス変換が設定された旨と、変換先のLAN内部のプライベートアドレスとプロトコルとポート番号などを表示するHTMLファイルを暗号化して端末に送信する。
Thereafter, the
端末では、アドレス変換装置1から送信されたHTMLファイルを受信して復号化し、これを表示することにより、設定されたアドレス変換の情報を確認することができる。
The terminal receives the HTML file transmitted from the
このようにしてアクセス制御ルール及びアドレス変換ルールを設定し、LAN内の端末との通信を行ったユーザが、通信を終了するときは、アドレス変換装置1から受信したHTMLファイルで表示された画面から、通信の終了のボタンを選択するか、HTMLファイルを表示しているブラウザを閉じるか、或いはHTMLファイルを表示している端末を終了する。
When a user who has established an access control rule and an address conversion rule in this way and communicated with a terminal in the LAN ends communication, the user can use the HTML file received from the
アドレス変換装置1のアクセス制御部13は、通信終了のパケットを受信したり、端末からの信号が一定時間送信されてこないことによりブラウザが閉じられたことや端末が終了されたことを検出すると、図4のように書き替えたアクセス制御テーブルを、図2のような元の状態に戻し、アドレス変換部14に対して、ソースIPアドレス、ディスティネーションIPアドレス、プロトコルの情報を添えて、この通信が終了したことを通知する。
When the
アドレス変換部14は、通信の終了の通知を受けると、図5のように書き替えたアドレス変換テーブルを、図3のような元の状態に戻す。
When receiving the notification of the end of communication, the
このように、本実施形態においては、httpsでアクセスしてきた端末のIPアドレスをソースIPアドレスとして、指定されたアドレス変換ルールをアドレス変換テーブルに設定し、それに伴うアクセス制御ルールをアクセス制御テーブルに設定しているので、ソースIPアドレスも含んだ条件によりアドレス変換ルールを設定することができ、同じポート番号でもソースIPアドレスにより別々のサーバへ振り分けたり、ポート番号の無いプロトコルでもソースIPアドレスにより別々の端末と通信を行わせたりすることができる。 As described above, in the present embodiment, the IP address of the terminal accessed via https is set as the source IP address, the designated address translation rule is set in the address translation table, and the access control rule associated therewith is set in the access control table. Therefore, the address translation rule can be set according to the conditions including the source IP address, and the same port number is distributed to different servers by the source IP address, or the protocol without the port number is separated by the source IP address. Communication with the terminal can be performed.
なお、本実施形態においては、httpsのアクセスによりアドレス変換ルール、アクセス制御ルールの追加を受け付けるようにしたが、httpやSIP(Session Initiation Protocol)やsshやtelnetなどを使ってもよい。 In the present embodiment, addition of an address translation rule and an access control rule is accepted by https access, but http, SIP (Session Initiation Protocol), ssh, telnet, or the like may be used.
前述した構成よりなるアドレス変換装置1は、LAN内の端末からIPsec通信の最初のパケットを受信したときに、宛先IPアドレスと送信元IPアドレス(プライベートアドレス)とのアドレス変換ルールをアドレス変換テーブルに追加することで、LAN内の複数の端末がアドレス変換装置1を通してIPsec通信を行うことができるようになっている。
When the
これについて、図6に示すように、インターネット4を介して通信可能な第1のアドレス変換装置1aと第2のアドレス変換装置1bの、それぞれに接続されたLAN2,3内の端末間のIPsec通信の場合について説明する。
In this regard, as shown in FIG. 6, IPsec communication between terminals in the
まず、LAN3内の端末3aは、第1のアドレス変換装置1aに接続されたLAN2内の端末2aとIPsec通信をするのに必要なアドレス変換ルールを第1のアドレス変換装置1aに追加するため、上述したように、第1のアドレス変換装置1aに対してhttpsのアクセス要求パケットを送信する。
First, since the terminal 3a in the
第1のアドレス変換装置1aは、httpsのアクセス要求パケットを受信すると、送信元の端末3aとSSLセッションの確立を行い、ユーザの認証を行い、認証されれば、アクセスしたいサーバのLAN2内部のプライベートアドレスやプロトコルやポート番号などを入力させるHTMLファイルを要求元の端末3aに送信する。
Upon receiving the https access request packet, the first
端末3aは、受信したHTMLファイルを表示して、利用者(ユーザ)にアクセス先の情報を入力させる。この場合、接続したい端末2aのプライベートIPアドレス192.168.100.2と、プロトコルとしてIPsecが入力される。 The terminal 3a displays the received HTML file and allows the user (user) to input access destination information. In this case, the private IP address 192.168.100.2 of the terminal 2a to be connected and IPsec as the protocol are input.
端末3aは、入力されたプライベートアドレスとプロトコルを第1のアドレス変換装置1aに送信する。
The terminal 3a transmits the input private address and protocol to the first
第1のアドレス変換装置1aは、端末3aからプライベートアドレスとプロトコルを受信すると、データベース部16に蓄積しているアクセス制御テーブルに、記憶しているhttpsのアクセス要求パケットの送信元IPアドレス(第2のアドレス変換装置1bのIPアドレス111.222.234.123)を「ソースIPアドレス」とし、「プロトコル、ソースポート番号」および「プロトコル、ディスティネーションポート番号」としてIPsecとした図7に示すようなアクセス制御ルールと、記憶しているhttpsのアクセス要求パケットの送信元IPアドレスを「ソースIPアドレス」とし、「ディスティネーションIPアドレス」として自装置のグローバルアドレス211.250.250.100、「プロトコル、ディスティネーションポート番号」としてIPsec、内部IPアドレスとして192.168.100.2とした図8に示すようなアドレス変換ルールをアドレス変換テーブルに追加する。
When the first
そして、端末3aが最初のIPsecパケットを、第2のアドレス変換装置1bを通して送信するために、第2のアドレス変換装置1bに送信すると、第2のアドレス変換装置1bのアドレス変換部14は、端末3aから受信したパケットがIPsecパケットであるので、このIPsec通信に関するアドレス変換ルールがアドレス変換テーブルに登録されているか否かを調べるため、宛先IPアドレス、送信元IPアドレスを読み出し、アドレス変換テーブルにこの宛先IPアドレスがソースIPアドレスとして、かつ送信元IPアドレスが内部IPアドレスとして登録されたIPsecのアドレス変換ルールが有るか否かを検索する。
Then, when the terminal 3a transmits the first IPsec packet to the
検索の結果、この条件に合致するアドレス変換ルールがあれば、アドレス変換部14は、送信元IPアドレスをそのアドレス変換ルールのディスティネーションIPアドレスのアドレスに書き換え、書き換えたパケットをアクセス制御部13を通してWAN側ネットワークインターフェース部11を介して送信する。
If there is an address translation rule that matches this condition as a result of the search, the
この条件に合致するアドレス変換ルールが無ければ、宛先IPアドレスを「ソースIPアドレス」とし、「ディスティネーションIPアドレス」を自装置のIPアドレス(この場合、111.222.234.123)として、「プロトコル、ディスティネーションポート番号」としてIPsec、送信元IPアドレス(この場合、192.168.20.2)を「内部IPアドレス」とした図9に示すようなアドレス変換ルールをアドレス変換テーブルに追加する。 If there is no address translation rule that matches this condition, the destination IP address is “source IP address”, the “destination IP address” is the IP address of the local device (in this case, 111.222.234.123), and “protocol, destination An address conversion rule as shown in FIG. 9 is added to the address conversion table with IPsec as the “port number” and “internal IP address” as the source IP address (in this case, 192.168.20.2).
そして、アドレス変換部14は、アクセス制御部13に対して、送信元IPアドレスが211.250.250.100で、宛先IPアドレスが111.222.234.123のIPsecパケットの通過を許可するようなアクセス制御ルールの追加を要求する。
Then, the
アクセス制御部13は、アドレス変換部14からアクセス制御ルールの追加を要求されると、「ソースIPアドレス」を211.250.250.100、「ディスティネーションIPアドレス」を111.222.234.123、「プロトコル、ソースポート番号」および「プロトコル、ディスティネーションポート番号」をIPsec、動作をacceptとした図10に示すようなアクセス制御ルールをアクセス制御テーブルに追加する。
When the
また、アドレス変換部14は、アクセス制御部13のアクセス制御ルールの追加が終わると、受信したパケットの送信元IPアドレスを自装置のグローバルIPアドレス(この場合、111.222.234.123)に書き換え、書き換えたパケットをアクセス制御部13を通してWAN側ネットワークインターフェース部11を介して送信する。
In addition, after the addition of the access control rule of the
以降、端末2aと端末3aとの間でIPsecによる通信が行われる。 Thereafter, communication by IPsec is performed between the terminal 2a and the terminal 3a.
そして、IPsecによる通信が終了したら、端末3aの利用者が、第1のアドレス変換装置1aから受信したHTMLファイルで表示された画面から、通信の終了のボタンを選択するか、HTMLファイルを表示しているブラウザを閉じるか、或いはHTMLファイルを表示している端末を終了する。
When the communication by IPsec is completed, the user of the terminal 3a selects the button for ending communication from the screen displayed with the HTML file received from the first
第1のアドレス変換装置1aのアクセス制御部13は、通信終了のパケットを受信したり、端末3aからの信号が一定時間送信されてこないことによりブラウザが閉じられたことや端末が終了されたことを検出すると、図7のように追加したアクセス制御ルールを削除し、アドレス変換部14にソースIPアドレス111.222.234.123、ディスティネーションIPアドレス211.250.250.100、プロトコルIPsecの通信が終了したことを通知する。
The
第1のアドレス変換装置1aのアドレス変換部14は、通信の終了の通知を受けると、当該ソースIPアドレス、ディスティネーションIPアドレス、プロトコルに対応して図8のように追加したアドレス変換ルールを削除する。
Upon receiving the notification of the end of communication, the
第2のアドレス変換装置1bのアクセス制御部13は、通信終了のパケットを受信したり、端末3aから信号が一定時間送信されないことによりブラウザが閉じられたことや端末が終了されたことを検出すると、図10のように追加したアクセス制御ルールを削除し、アドレス変換部14にソースIPアドレス211.250.250.100、ディスティネーションIPアドレス111.222.234.123、プロトコルIPsecの通信が終了したことを通知する。
When the
第2のアドレス変換装置1bのアドレス変換部14は、通信の終了の通知を受けると、当該ソースIPアドレス、ディスティネーションIPアドレス、プロトコルの図9のように追加したアドレス変換ルールを削除する。
Upon receiving notification of the end of communication, the
このように、本実施形態においては、ソースIPアドレスも含んだ条件によりアドレス変換ルールを設定しているので、同じポート番号でもソースIPアドレスにより別々のサーバへ振り分けたり、ポート番号の無いプロトコルでもソースIPアドレスにより別々の端末と通信を行わせたりすることができる。 As described above, in this embodiment, since the address conversion rule is set according to the condition including the source IP address, the same port number is distributed to different servers according to the source IP address, or the protocol without the port number is used as the source. It is possible to communicate with different terminals by IP address.
また、LAN側から受信したIPsecのパケットの宛先IPアドレスと送信元IPアドレスの組のアドレス変換ルールが登録されていない場合、該宛先IPアドレスと送信元IPアドレスによるIPsecパケットのアドレス変換ルールを登録しているので、LAN内の端末から開始されるIPsec通信のアドレス変換ルールは自動的に登録され、事前にアドレス変換ルールの登録を行うことなくIPsec通信を行うことができる。 In addition, when an address translation rule for a destination IP address and a source IP address of an IPsec packet received from the LAN side is not registered, an address translation rule for an IPsec packet based on the destination IP address and the source IP address is registered. Therefore, the address conversion rule for IPsec communication started from a terminal in the LAN is automatically registered, and IPsec communication can be performed without registering the address conversion rule in advance.
また、図11及び図12に示すように、IPsecの通信を行う端末が複数台あるときにも通信を矛盾なく行うことができる。即ち、図11に示す構成では、図6の構成に加えてインターネット4にはIPアドレスが222.111.123.234である第3のアドレス変換装置1cを介してLAN5が接続され、LAN5内にはプライベートIPアドレスが192.168.50.2の端末5aと、プライベートIPアドレスが192.168.50.3の端末5bが存在する。
Further, as shown in FIGS. 11 and 12, communication can be performed without contradiction even when there are a plurality of terminals performing IPsec communication. That is, in the configuration shown in FIG. 11, in addition to the configuration of FIG. 6, the
このような環境で、LAN2内の端末2aがLAN3内の端末3aとIPsec通信を行い、LAN2内の端末2bがLAN5内の端末5aとIPsec通信を行う場合は、第1のアドレス変換装置1aは、上記と同様の手順により、記憶しているhttpsのアクセス要求パケットの送信元IPアドレスを「ソースIPアドレス」とし、「ディスティネーションIPアドレス」として自装置のグローバルアドレス211.250.250.100、「プロトコル、ディスティネーションポート番号」としてIPsec、内部IPアドレスとして192.168.100.2及び192.168.100.3とした図12に示すようなアドレス変換ルールをアドレス変換テーブルに追加する。これにより複数台の端末が同時にIPsec通信を行うことができる。
In such an environment, when the terminal 2a in the
なお、本実施形態においては、WAN側の端末の認証をアドレス変換装置1で行うようにしたが、WAN上のサーバを経由させ、該サーバにより認証を行わせ、該サーバからの要求によりアドレス変換装置1においてアクセス制御ルール及びアドレス変換ルールを追加或いは削除するようにしてもよい。
In the present embodiment, the
このようにすることにより、WAN上からステルス(アクセス可能なプロトコルやポート番号を隠蔽して)で運用することができる。 By doing so, it is possible to operate with stealth (accessible protocols and port numbers are hidden) from the WAN.
また、本実施形態においては、IPsec通信の最初のパケットによりアドレス変換ルール及びアクセス制御ルールを追加したが、IPsec通信の開始を示すパケットによりアドレス変換ルールとアクセス制御ルールを追加するようにしてもよく、或いはIKE(Internet Key Exchange)の最初のパケットなどによりアドレス変換ルールとアクセス制御ルールを追加するようにしてもよい。 In this embodiment, the address translation rule and the access control rule are added by the first packet of IPsec communication. However, the address translation rule and the access control rule may be added by a packet indicating the start of IPsec communication. Alternatively, an address translation rule and an access control rule may be added by the first packet of IKE (Internet Key Exchange).
11…WAN側ネットワークインターフェース部、12…LAN側ネットワークインターフェース部、13…アクセス制御部、14…アドレス変換部、15…認証処理部、16…データベース部、1a…第1のアドレス変換装置、1b…第2のアドレス変換装置、1c…第3のアドレス変換装置、2,3,5…LAN、4…インターネット、2a,2b,3a,3b,5a,5b…端末。
DESCRIPTION OF
Claims (4)
前記アドレス変換装置は、
前記グローバルなネットワークの端末から受信したセッションを受け付け、該端末のアドレスを送信元とするパケットに対するアドレス変換ルールをデータベースに追加登録し、
前記ローカルなネットワークの端末からIPsec通信の開始を示すパケットを受信したときに、該パケットの宛先アドレス及び送信元アドレスのIPsecパケットに対するアドレス変換ルールが前記データベースに登録されていなければ、該宛先アドレス及び送信元アドレスのIPsecパケットに対するアドレス変換ルールを前記データベースに追加登録し、
前記ローカルなネットワークで使用されるアドレスと前記グローバルなネットワークで使用されるアドレスとを、前記データベースに登録されているアドレス変換ルールに基づいて相互に変換する
ことを特徴とするアドレス変換方法。 An address translation device having a database in which address translation rules are registered and interconnecting a local network and a global network is used, and an address used in the local network is used in the global network. An address conversion method for converting addresses to each other,
The address translator is
Accepts a session received from a terminal of the global network, and additionally registers an address translation rule for a packet having the address of the terminal as a transmission source,
When a packet indicating the start of IPsec communication is received from a terminal of the local network, if the address translation rule for the IPsec packet of the destination address and the source address of the packet is not registered in the database, the destination address and An additional address translation rule for the IPsec packet of the source address is registered in the database,
An address conversion method, wherein an address used in the local network and an address used in the global network are converted from each other based on an address conversion rule registered in the database.
ことを特徴とする請求項1に記載のアドレス変換方法。 The address translation method according to claim 1, wherein the address translation device deletes an address translation rule added by the session from the database when the session is disconnected.
前記ローカルなネットワークで使用されるアドレスとグローバルなネットワークで使用されるアドレスとを、データベースに登録されているアドレス変換ルールに基づいて相互に変換するアドレス変換手段と、
前記データベースと、
前記グローバルなネットワークの端末から受信したセッションを受け付け、該端末のアドレスを送信元とするパケットに対するアドレス変換ルールを前記データベースに追加登録する手段と、
前記ローカルなネットワークの端末からIPsec通信の開始を示すパケットを受信したときに、該パケットの宛先アドレス及び送信元アドレスのIPsecパケットに対するアドレス変換ルールが前記データベースに登録されていなければ、該宛先アドレス及び送信元アドレスのIPsecパケットに対するアドレス変換ルールを前記データベースに追加登録する手段とを備えている
ことを特徴とするアドレス変換装置。 An address translation device that interconnects a local network and a global network and translates an address used in the local network and an address used in the global network,
An address translation unit that translates an address used in the local network and an address used in the global network based on an address translation rule registered in a database;
The database;
Means for accepting a session received from a terminal of the global network and additionally registering in the database an address translation rule for a packet whose source is the terminal address;
When a packet indicating the start of IPsec communication is received from a terminal of the local network, if the address translation rule for the IPsec packet of the destination address and the source address of the packet is not registered in the database, the destination address and Means for additionally registering an address translation rule for an IPsec packet of a source address in the database.
ことを特徴とする請求項3に記載のアドレス変換装置。 The address translation device according to claim 3, further comprising means for deleting an address translation rule added by the session from the database when the session is disconnected.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005183522A JP3999238B2 (en) | 2005-06-23 | 2005-06-23 | Address translation method and apparatus |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005183522A JP3999238B2 (en) | 2005-06-23 | 2005-06-23 | Address translation method and apparatus |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2007006109A JP2007006109A (en) | 2007-01-11 |
| JP3999238B2 true JP3999238B2 (en) | 2007-10-31 |
Family
ID=37691285
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2005183522A Expired - Fee Related JP3999238B2 (en) | 2005-06-23 | 2005-06-23 | Address translation method and apparatus |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3999238B2 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5377615B2 (en) * | 2011-11-30 | 2013-12-25 | 株式会社東芝 | Interface device, electronic apparatus equipped with the interface device, and control method used in the interface device |
| JP6908721B2 (en) | 2017-11-13 | 2021-07-28 | ヤマハ発動機株式会社 | Communication network system |
| JP7760975B2 (en) * | 2022-09-27 | 2025-10-28 | トヨタ自動車株式会社 | Information processing device |
-
2005
- 2005-06-23 JP JP2005183522A patent/JP3999238B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2007006109A (en) | 2007-01-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4362132B2 (en) | Address translation method, access control method, and apparatus using these methods | |
| US7734647B2 (en) | Personal remote firewall | |
| JP4708376B2 (en) | Method and system for securing access to a private network | |
| CN101572608B (en) | Method and device for acquiring once-login parameters | |
| JP4648148B2 (en) | Connection support device | |
| US20050160161A1 (en) | System and method for managing a proxy request over a secure network using inherited security attributes | |
| JP2009111437A (en) | Network system | |
| US10187356B2 (en) | Connectivity between cloud-hosted systems and on-premises enterprise resources | |
| EP1328105B1 (en) | Method for sending a packet from a first IPsec client to a second IPsec client through a L2TP tunnel | |
| JP2003316742A (en) | Anonymous communication method and apparatus having single sign-on function | |
| JP3999238B2 (en) | Address translation method and apparatus | |
| US8646066B2 (en) | Security protocol control apparatus and security protocol control method | |
| JP2009043043A (en) | Authentication system and authentication method using sip | |
| JP4630296B2 (en) | Gateway device and authentication processing method | |
| CN112583599B (en) | Communication method and device | |
| JP2004295166A (en) | Remote access system and remote access method | |
| JP3935823B2 (en) | HTTP session tunneling system, method thereof, and program thereof | |
| JP2010283762A (en) | Communication path setting device, communication path setting method, program, and storage medium | |
| JP5131118B2 (en) | Communication system, management device, relay device, and program | |
| JP2008199420A (en) | Gateway device and authentication processing method | |
| JP2007006108A (en) | Packet relay method, relay device, server device, and communication system including these | |
| WO2018225158A1 (en) | Communication device, relay device, information processing system, and communication system | |
| CN100470518C (en) | Address conversion method, access control method and device using these methods | |
| JP2006352710A (en) | Packet relay apparatus and program | |
| JP4789980B2 (en) | Tunnel communication system and control device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070510 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20070807 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070808 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100817 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100817 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110817 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120817 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130817 Year of fee payment: 6 |
|
| S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| LAPS | Cancellation because of no payment of annual fees |