logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Proxy, reverse proxy, redirect ... I just have no idea
Author
RSS_JCT



Joined: 22 Feb 2014
Posts: 2
Location: Canada, Winnipeg

PostPosted: Sat 22 Feb '14 22:44    Post subject: Proxy, reverse proxy, redirect ... I just have no idea Reply with quote

This is hopefully a very simple question but given my lack of background - I really don't know even where to start:

I have number of systems at home running various versions of Windows that are on a "normal" cable connection (read: dynamic IP from the cable provider to the router and dynamic IPs to each system on my router). In essence, I do not have a static IP at home. I have a Linux (Centos) box in a data center that has a fixed IP.

I am about to start doing a bit of development work that will issue calls to a number of services that require all of my calls to come from a whitelisted IP. I cannot whitelist my home IP since it is subject to change. I checked into getting a static IP at home but it is not something I can get done at the moment.

Eventually, my data center system (Centos system with the fixed IP) will be used to issue calls against the services but for the development stage of my efforts, I would prefer to work on my home desktop systems (all my tools exist there, familiarity, etc).

What I would like to do is have all the calls from my software I am developing sent to my Centos system which would forward them to the various services and then, of course, relay the results back to the desktop system. I have a fair bit of experience as a developer but the system end of thing was always managed by someone else.

So - I was informed of 2 possible solutions:

1.) rsync - All my changes from my local system are sync'ed up with the Centos box and I simply run everything from the Centos box. Sounds like it could work but makes it more challenging due to my tools support being on my local system. This is not really what I want (as noted above).

2.) Forwarding/proxying/redirecting (I don't even know the correct term). I set up my software on my home system to call out to the Centos system which forwards the calls to the various services and the eventually relays everything back to my system. Also I will need to issue calls from external applications (say Salesforce, RedTail, etc) to my system for certain services I am developing or for data retrieval calls.

So - in essence, I need the Centos system to act as a 2-way proxy for certain traffic (and I can specify a port number for both incoming and outgoing calls) from my various home systems and from any external tools.

The Centos box (2.6.32-431.3.1.el6.x86_64) has Apache 2.2.15 running currently. I am running Windows 7 on 2 of my home systems and Windows Vista on the last one.

So - I'll apologize in advance if I have worded this poorly, left things out that are critical to any advice that can be offered and any other omissions. I assume that I can use Apache and use redirect/proxy/?? to accomplish this but I really have no idea on even where to start. Any help is appreciated.
Back to top
Anaksunaman



Joined: 19 Dec 2013
Posts: 54

PostPosted: Sun 23 Feb '14 17:12    Post subject: Proxy, reverse proxy, redirect ... I just have no idea Reply with quote

Assuming that the calls are using http/s for transfer, it sounds like you want a reverse proxy on your CentOS system.

Quote:
I set up my software on my home system to call out to the Centos system which forwards the calls to the various services and the eventually relays everything back to my system. Also I will need to issue calls from external applications (say Salesforce, RedTail, etc) to my system for certain services I am developing or for data retrieval calls.

For the first part, your setup would likely be:

Home (dev) --> CentOS (reverse proxy) --> Services (production)

Code:
ProxyRequests Off

ProxyPass /services http://www.services.tld/url
ProxyPassReverse /services http://www.services.tld/url


For the second half:

External Site (www) --> CentOS (reverse proxy) --> Home (dev)

Code:
ProxyRequests Off

ProxyPass /home http://192.168.1.26/
ProxyPassReverse /home http://192.168.1.26/


Note that URL and IP are interchangable, and the above code is just examples.

As two side notes --

A) You may want to look into a dynamic dns service, such as http://www.noip.com/. If everything has to be done by IP, this service won't help, but if things can be done via domain name (e.g. mydomain.noip.com), this type of service will ensure that domain name is always connected to your home IP, even if your home IP changes.

B) Are you certain your home IP itself is out of the question? Running a couple small home dev servers, I have found that even though my IP is technically dynamic (cable modem, provider can change it whenever they like), since my cable modem essentially never turns off (and my router almost never), I have a pretty rock solid IP (no changes within the last 18 months or so).
Back to top
RSS_JCT



Joined: 22 Feb 2014
Posts: 2
Location: Canada, Winnipeg

PostPosted: Mon 24 Feb '14 4:14    Post subject: Re: Proxy, reverse proxy, redirect ... I just have no idea Reply with quote

Thanks so much - this points me in the right direction - I'll figure it out from there.

For some reason my cable provider is much less stable than yours. I am not sure if the IP changes but their entire system goes down roughly once a month. Totally unreliable. Hence me getting the static IP in the data center. And they only whitelist IPs, not domain names. However, the advice you provided is great and I will run with that ...

Thanks much

Joel
Back to top


Reply to topic   Topic: Proxy, reverse proxy, redirect ... I just have no idea View previous topic :: View next topic
Post new topic   Forum Index -> Apache