The original Internet creators envisioned all connected computers being able to communicate directly. The adoption of firewall routers and Network Address Translation (NAT) routers has made the original vision very difficult to achieve. Firewall routers limit or prevent inbound connections. NAT routers make a computer's network address variable and difficult to determine.
TCP is the reliable transport protocol used by most of the Internet. TCP establishes a network connection by use of a three way handshake. Data is sent in packets that are acknowledged when received and resent if they are not received.
For security reasons, most computers are connected to the Internet behind a firewall. A direct Internet connection can allow a malicious program to trick a computer into allowing unauthorized access. Firewalls allow an internetworked computer to browse Internet Web pages but restrict inbound connections.
Sophisticated firewalls inspect Internet traffic to allow only traffic that corresponds to outbound Web page requests and the corresponding responses. In the most restrictive firewalls all other network traffic is blocked.
A firewall often will include Network Address Translation (NAT) capability. NAT allows hundreds of computers behind a firewall to share the same Internet address distinguished by a port.
Most communications applications involve an originator and a destination. For example, someone originates a phone call and someone else answers at the destination. Many applications in the computer world work similarly. These applications include VoIP, videophone, games, instant messaging, and many types of groupware.
Firewalls and NAT routers greatly limit the usability of these applications.
Computers behind firewalls or NAT routers can originate outbound connections and receive information back from Web sites. Two computers behind different firewalls make outbound connections to a third computer that is not behind a firewall. The third computer can pass information from one firewalled machine to the other. The third computer is often called a “proxy.”
The disadvantage of a proxy solution is that all information between the two originating computers must also pass through the proxy. For applications such as VoIP or video, the bandwidth requirements of numerous proxied connections scale linearly with the number of proxied connections. A single 100 Kbit/sec video connection requires 100 Kbit/sec of proxy bandwidth coming and going. One hundred connections require 100*100K*2 or 20 Mbit/sec of proxy bandwidth.
Furthermore, if the proxy is located in a low cost foreign country, an unacceptable delay of several seconds will be added to all communications between the participating computers.
Several practitioners have observed that setting TCP packets to low time to live (TTL) values allows the testing of firewall performance. TTL in this context defines the duration in seconds that a record may be cached. A TTL of zero indicates the record should not be cached. These practitioners include Andrea Barisani of the University of Trieste, Lance Spitzer, and Siddhartha Jain of Bank Muscat.
A preferred embodiment of the present invention uses a trusted third computer to set up direct communications between two firewalled or NAT'd computers running the embodiment's network drivers. Network traffic appears as outbound traffic to the internetworked computer's firewalls. Following the connection setup, direct communications between the two firewalled or NAT'd computers functions in a manner almost identical to traditional TCP communications.
The benefits are that communications traffic flows directly between the originating computer and destination computer without the expense of proxy bandwidth or proxy computer processing power. In addition, the connections proceed with the same network delay that would exist in a traditional TCP direct connection.
In a preferred embodiment, the invention creates network traffic that is consistent with the TCP specification by requiring all computers to first make an outbound TCP connection to a non-firewalled computer. Firewalled computers using the invention randomly assign source ports to the outbound TCP connection packets, consistent with the TCP specification. When two firewalled computers are directly connected using the invention, the source port of one firewalled computer becomes the destination port of the other computer, consistent with the TCP specification. Thus, both source and destination port numbers preferably are random for all direct connection communications between firewalled computers using the invention. As a result, the traffic profiling by port analysis used by some networks to restrict the availability of some Internet features for some users is likely to be substantially reduced.
The system is secure since all connections require setup by a trusted third computer. All connections are logged. In addition, connections from and to particular originators or destinations may be restricted similar to that possible with firewall rules.
One embodiment of the present invention is directed to a method for connecting a first computer protected by a first firewall to a second computer protected by a second firewall using a trusted computer, the method comprising: registering the first computer with the trusted computer; receiving a connection request from the trusted computer, the connection request including an IP address and port number of the second computer; opening a plurality of ports through the first firewall; receiving an acknowledgement from the trusted computer on a penetration port, the penetration port being one of the plurality of opened ports; sending the trusted computer the port number of the penetration port; and receiving data directly from the second computer on the penetration port. In some embodiments, the first firewall is configured to block inbound connections to a port on the first computer. In some embodiments, the first firewall is configured to block all inbound connections to the first computer. A further aspect of the step of registering further comprises sending the trusted computer an IP address and port number of the first computer. A further aspect of opening further comprises receiving a guessed port number of the second computer from the trusted computer; sending a plurality of messages to the second computer's IP address and guessed port, each of the plurality of messages opening a port on the first computer. Another aspect includes sending a “blizzard sent” message to the trusted computer. In a further aspect, each of the plurality of messages has a short TTL. In some embodiments, the acknowledgement from the trusted computer is modified to indicate the second computer's IP address and guessed port as the origin of the acknowledgement.
Another embodiment of the present invention is directed to a method for assisting a first computer protected by a first firewall to connect to a second computer protected by a second firewall, the method comprising: receiving from the first computer a request to connect to the second computer; sending a connection request to the second computer; maintaining a hole through the second firewall created by the second computer; receiving a destination port number from the second computer, the receiving port number corresponding to the punched hole in the second firewall; maintaining a hole through the first firewall created by the first computer; receiving a origination port number from the first computer, the origination port number corresponding to the punched hole in the first firewall; sending a message to the second computer confirming a direct connection between the first and second computers. In some embodiments, the second firewall is configured to block inbound connections to a port on the second computer. In some embodiments, the second firewall is configured to block all inbound connections to the second computer. In some embodiments, the first firewall is configured to block inbound connections to a port on the first computer. In some embodiments, the connection request sent to the second computer comprises an IP address of the first computer. In a further aspect, the step of maintaining a hole through the second firewall further comprises: instructing the second computer to open a plurality of ports through the second firewall, the plurality of ports based, in part, on a guessed port number; receiving from the second computer a message indicating that the plurality of ports through the second firewall have been opened; and sending a plurality of messages to the second computer, each of the plurality of messages having a different port number, the different port number based, in part, on the guessed port number. In a further aspect, the step of maintaining a hole through the first firewall further comprises: instructing the first computer to open a plurality of ports through the first firewall; receiving from the first computer a message indicating that the plurality of ports through the first firewall have been opened; and sending a plurality of messages to the first computer, each of the plurality of messages having a different port number. In a further aspect, each of the plurality of messages sent to the second computer is modified to indicate the originator of the messages is the first computer. In a further aspect, each of the plurality of messages sent to the first computer is modified to indicate the originator of the messages is the second computer.
Another embodiment of the present invention is directed to a computer-readable medium having computer-executable instructions for performing a method for assisting a first computer protected by a first firewall to connect to a second computer protected by a second firewall, the method comprising: receiving from the first computer a request to connect to the second computer; sending a connection request to the second computer; maintaining a hole through the second firewall created by the second computer; receiving a destination port number from the second computer, the receiving port number corresponding to the punched hole in the second firewall; maintaining a hole through the first firewall created by the first computer; receiving a origination port number from the first computer, the origination port number corresponding to the punched hole in the first firewall; sending a message to the second computer confirming a direct connection between the first and second computers.
A preferred embodiment may be instantiated as a software driver that has a similar programming interface to existing software drivers such as those for TCP (Transmission Control Protocol).
The software drivers may therefore be easily linked to existing programs and provide existing applications with firewall traversal.
Firewalls work by inspecting each packet that comes in or goes out on the internetwork and deciding if that packet corresponds to an allowed state of an allowed connection. For example, the first packet of a TCP connection must be a SYN. If the firewall is configured to block all incoming connections, all inbound SYN packets would be blocked and a RESET sent to the sender. A “fully blocking firewall” will prevent all inbound connections.
In a preferred embodiment, packet traffic that corresponds to traffic the firewall has authorized to pass is created. In this manner, a firewalled computer may directly connect to another firewalled computer that has previously made its presence known to a non-firewalled computer.
For purposes of illustration, the system described may include one or more of the following assumptions. These assumptions are not intended to be limiting but are made to provide a basis for the description below. First, a fully blocking firewall allows outbound TCP connections. An example would be a Web page request. Second, two computers behind blocking firewalls may make outbound TCP connections to a non-firewalled third party computer, and that third party computer may pass data between the two computers behind blocking firewalls. Third, a fully blocking firewall will allow inbound packets that correspond to an existing outbound connection. An example would be packets returning from a Web page request. Fourth, all packets have a “Time to Live” (TTL) parameter that determines how many router hops a packet will travel toward its destination before it stops and returns. Fifth, a non-firewalled computer may send packets to a firewalled computer containing another computer's IP address as the source.
The operation of the state machines may be most easily understood by observing the network traffic depicted in
Protocol Profiling Mitigation: Some Internet Service Providers reduce their bandwidth requirements by throttling packets associated with particular TCP ports. This selective bandwidth reduction depends on the detection of static ports associated with particular services. The invention preferably randomizes both its source and destination ports in its TCP packets, thereby mitigating protocol profiling performed by source or destination port detection.
As shown in
As shown in
The Nonfirewalled Computer 1190 records the random source port received from the Sender. The received source port is used as the destination port for any subsequent incoming connection to the firewalled Sender Computer 1150. As a result, both source and destination ports of all communications both behind and in front of a firewall or NAT are random.
First, the Sender Computer 1150 establishes an outgoing connection to the Non-firewalled Computer 1190. This connection is used for indirectly messaging between the Sender Computer 1150 and the Receiver Computer 1170 prior to establishing a direct connection.
The first function following START on
The second function following START on
Second, an outbound TCP connection between the Receiver Computer 1170 and the Sender Computer 1150 is created by the Receiver Computer 1170 and the Non-firewalled Computer 1190. The task is initiated in response to the Sender Computer's 1150 request for connection to the Receiver Computer 1170 transmitted to the Non-firewalled Computer 1190. The connection to the Receiver Computer 1170 appears to the Receiver Firewall and NAT Router 1160 to be a permitted outbound TCP connection initiated by the Receiver Computer 1170. The IP and port necessary to directly communicate with the Receiver Computer 1170 is made known to the Non-firewalled Computer 1190.
The first line of
Sender Computer 1150 state 0 (see
Non-firewalled Computer 1150 state 3 (see
Receiver Computer 1170 state 0 (see
Upon prompting by the Non-firewalled Computer 1190, Receiver Computer 1170 state 2 (see
When the Receiver Computer 1170 has finished sending its SYN blizzard and the Non-firewalled Computer has received the “SYN blizzard sent” message from the Receiver Computer 1170, the Non-firewalled Computer 1190 state 7 (see
The Receiver Computer 1170 state 5 (see
The Receiver Computer 1170 state 6 (see
The TCP three-way handshake consisting of SYN, SYNACK, and ACK is depicted in
By Non-firewalled Computer 1190 state 9 (see
Third, an outbound TCP connection between the Sender Computer 1150 and the Receiver Computer 1170 is created by the Sender Computer 1150 and the Non-firewalled Computer 1190. The connection between the Sender Computer 1150 and the Receiver Computer 1170 appears to the Sender Firewall and NAT Router 1160 to be a permitted outgoing connection initiated by the Sender Computer 1150.
Upon prompting by the Non-firewalled Computer 1190, Sender Computer 1150 state 2 (see
When the Sender Computer 1150 has finished sending its SYN blizzard and the Non-firewalled Computer 1190 has received the “SYN blizzard sent” message from Sender Computer 1150, the Non-firewalled Computer 1190 state 11 (see
The Sender Computer 1150 state 5 (see
The Sender Computer 1150 state 6 (see
The TCP three-way handshake consisting of SYN, SYNACK, and ACK is depicted in
By Non-firewalled Computer 1190 state 13 (see
Non-firewalled Computer 1190 states 13 and 14 (see
Fourth, data may be sent and acknowledged over the direct connection between the two Firewalled Computers 11501170.
Embodiments of the present invention comprise computer components and computer-implemented steps that will be apparent to those skilled in the art. Furthermore, is should be understood that computer-implemented steps are preferably stored as computer-executable instructions on a computer-readable medium such as, for example, floppy disks, hard disks, optical disks, Flash memories, Flash ROMS, nonvolatile ROM, and RAM. For ease of exposition, not every step or element of the present invention is described herein as part of a computer system, but those skilled in the art will recognize that each step or element may have a corresponding computer system or software component. Such computer system and/or software components are therefore enabled by describing their corresponding steps or elements (that is, their functionality), and are within the scope of the present invention.
Having thus described at least illustrative embodiments of the invention, various modifications and improvements will readily occur to those skilled in the art and are intended to be within the scope of the invention. Accordingly, the foregoing description is by way of example only and is not intended as limiting.
This application claims the benefit of U.S. Provisional Application No. 60/664,508, filed Mar. 23, 2005. The entire contents of that provisional application are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
60664508 | Mar 2005 | US |