Patent ID: 8082324
Filing Date: 2011-12-20
Classification: H04L

Abstract:
1. A method of establishing a tunnel between network terminal devices passing through a firewall applied to a network system having at least two private networks and the Internet, wherein each of said private networks comprises at least a Network Address Translation (NAT) router and at least one network terminal device of the network terminal devices, and each said network terminal device connects to the Internet through said NAT router corresponding thereto respectively, at least one network terminal device of a first private network of the at least two private networks performing the steps of: sending a plurality of detecting signals to said NAT router corresponding thereto and then detecting detect firewall policy of said corresponding NAT router; determining whether said corresponding NAT router allows said network terminal device to directly connect to the Internet according to a response received from said corresponding NAT router after the firewall policy of said corresponding NAT router is detected; determining whether said corresponding NAT router allows said network terminal device to connect to the Internet by using a User Datagram Protocol (UDP) according to said response when it is determined that directly connecting to the Internet directly is allowed; determining whether said corresponding NAT router allows said network terminal device to connect to the Internet by using a Universal Plug and Play Internet Gateway Device (UPnP IGD) according to said response when it is determined that connecting to the Internet by using the UDP is allowed; mapping a Transmission Control Protocol (TCP) port when it is determined that connecting to the Internet by using the UPnP IGD is allowed; determining whether said corresponding NAT router allows said network terminal device to connect to the Internet by using a Simple Traversal of UDP over NAT (STUN) according to said response; connecting to the Internet directly by using a peer-to-peer (p2p) when it is determined that connecting to the Internet by using the STUN is allowed, whereby said network terminal device is able to pass through the firewall installed in said corresponding NAT router and establish a tunnel with a network terminal device of a second private network of the at least two private networks over the Internet for communication and data access by using the p2p; determining whether said corresponding NAT router allows said network terminal device to connect to the Internet by using a TCP port according to said response when it is determined that connecting to the Internet using the STUN is prohibited; determining whether said corresponding NAT router allows said network terminal device to connect to the Internet by using a TCP tunnel according to said response when it is determined that connecting to the Internet using the TCP port is allowed; and connecting to the Internet through a remote relay when it is determined that connecting to the Internet by using the TCP tunnel is allowed.