Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to communicate with a httpS SOAP server on a different port than the standard 443. The client app doesn't work (because of restrictions) with different ports than the standard ones for HTTP and HTTPS

How can I setup my linux server running Apache to tunnel all these requests coming in at soap.domain.com to https://soapserver.otherdomain.com:1234/Service.asmx ?

share|improve this question
add comment

2 Answers

I'm not clear where you need to do this - on the SOAP client? On the SOAP server? somewhere in between? The approach is the same regardless - there are multiple ways of doing this.

  • You could use iptables to rewrite the packet addresses.
  • Run a packet proxy daemon (e.g. netcat) to listen on port 443 and connect to port XXX
  • Configure [x]inetd to listen on port 443 and run a generic socket client (e.g. netcat again) connecting to port XXX

The first method would allow you to preserve the client address seen by the server.

share|improve this answer
    
Thanks, I will look into this; I need to do this in between, since the SOAP client is unable to connect to a different port than the standard available ones and the SOAP server is beyond my control and is running on another port. So therefore I have a need to place one in the middle that basically just answers the requests from the client to (https)soap.serverinthemiddle.com with the actual answer of (https)soap.server.com:1234/Service.asmx –  jrnk Dec 7 '10 at 8:23
    
You probably don't need a seperate machine - all three approaches would work deployed on either the client or the server - but since I assume that the soap service runs on a MSWindows box, it's rather difficult to implement there. –  symcbean Dec 8 '10 at 10:40
add comment

A reverse proxy will help you.

You can use apache mod_proxy to help you. By using mod_proxy apache will receive the request on the standard HTTP/HTTPS ports and then internally redirect it to the SOAP server.

http://httpd.apache.org/docs/2.0/mod/mod_proxy.html

Read up on reverse proxy. It will help you understand better.

share|improve this answer
    
Thanks, but is it going to be a problem that I will be running this through a self-signed SSL certificate on the proxy? –  jrnk Dec 5 '10 at 20:46
    
That won't be a problem! Remember that specifying HTTPS without a port in a URL says two things. One, that you're using a secure channel. Two, that you're using port 443. By specifying an alternate port, you're still using an encrypted stream. –  Andrew M. Dec 6 '10 at 3:08
add comment

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.