According to the routing information shown in FIG. 5, for example, if a packet received from the PPTP server 200 is addressed to the gateway A 100 a, the routing information obtaining unit 103 refers to the row indicating the destination IP address GW-A (Remote), and obtains information such as the destination netmask 255.255.255.255, the source IP address ???random???, the source netmask 0.0.0.0,