Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm thinking of developing a proxy-like program to forward ports on a remote PC to a local PC (for example SSH). Assume that both local and remote PCs are running behind typical firewalls (i.e. consumer broadband router firewall, Windows firewall or corporate firewalls).

The program will be a Java program which the user will run on both the remote and local PC. The remote client will periodically poll a central server to determine whether there are pending client connections. A session could be initiated as follows:

  1. The local client contacts the central server and request the current connection details for a specific remote client.
  2. The central server responds with the remote server's last received IP address and port.
  3. The next time the remote server polls the central server, the client's IP address and port are returned. The remote server initiates a connection to the local client using the IP address and port returned by the central server and listens for a response on a random port. The remote server will pass the value of the port it's listening on to central server.
  4. Goto 1, if client fails to connect to server.

All coomunication with the central server will be via HTTP/HTTPS on ports 80 & 443.

Would this work or will a typical firewall block the interactions.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

A typical corporate firewall will block outgoing requests on all but ports 80 and 443 (even those may need NTLM authentication or something similar) and ALL incoming requests.

So no, that won't work.

share|improve this answer
    
All communication with the central server will be via HTTP/HTTPS on ports 80 & 443. –  auser Oct 1 '12 at 5:58
    
Right. But how is the client supposed to communicate with the "remote" server on its random port? –  pdr Oct 1 '12 at 10:12

In addition to pdr's answer, some firewalls are capable of packet inspection. Just because you are using 80 / 443 doesn't mean that you are replicating http(s) traffic.

share|improve this answer
    
What if you encrypt all messages? –  Pacerier May 13 at 1:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.