Solved

Online port relay / redirect

Posted on 2013-06-14
7
568 Views
Last Modified: 2013-06-28
Hi,

Does anyone know if there is some sort of script that allows to redirect a port?

Basically, my home ISP does not allow ports below 1024 to be forwarded by their router.
My work blocks almost every port.
I do have a VPS where I would like to run something that listens let's say on some specific subdomain on port 80, but basically "proxies" all traffic to another IP and another port.

I tried a php proxy script, but it doesn't really do the job.

the vps is a windows machine with php support.
there are also some other sites already running on that machine, listening to specific subdomains, so these must keep working.
0
Comment
Question by:joachimcarrein
  • 4
  • 3
7 Comments
 
LVL 38

Expert Comment

by:Aaron Tomosky
ID: 39249093
0
 
LVL 4

Author Comment

by:joachimcarrein
ID: 39257093
Hey aarontomosky,

I started looking into the iis Application Request routing. It does seem promising, but I seem unable to set it up correctly without messing up all my other websites.

When I want to create an URL rewrite, I need to enable the mark on "Use URL Rewrite to inspect incoming requests" which means I need to supply a reverse proxy. But I have no idea what that is...
If I set the reverse proxy to my destination, every site hosted on the machine gets redirected there...

I tried adding a rewrite module like this:
rewrite ^subdomain.domain.com(.*) to someotherdomain.com:8081
but this seems to have no effect.

Would you be able to assist me in further setup of this?
0
 
LVL 38

Expert Comment

by:Aaron Tomosky
ID: 39257180
I have this exact setup at my office. Ill be there tomorrow and can give you exact directions if no one else pops up first.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 4

Author Comment

by:joachimcarrein
ID: 39270613
Hey aarontomosky,

Did you find the time to check your setup yet :)
0
 
LVL 38

Expert Comment

by:Aaron Tomosky
ID: 39272177
sorry about the delay, It completely slipped my mind.
Here is my web.config that takes whatever comes to this site (it's bound to company.com:8081) and sends it out company.com:8080 which is another site on the same box

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="ReverseProxyInboundRule1" stopProcessing="true">
                    <match url="(.*)" />
                    <action type="Rewrite" url="http://company.com:8080/{R:1}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

Open in new window

0
 
LVL 4

Author Comment

by:joachimcarrein
ID: 39277216
Hey aarontomosky,

I changed the rewrite url to my remote url, but nothing seems to happen actually.
is this an address rewrite rule or an internal request routing?

Regards
0
 
LVL 38

Accepted Solution

by:
Aaron Tomosky earned 500 total points
ID: 39278369
Make a new site in IIS. Bind it to whatever you want as the face of the proxy. Lets call it proxy.company.com:8081
Put that web.config in that site with the URL changed to let's call it remote.company.com:8080

So if you can't hit 8080, you can go to proxy.company.com:8081 and get the other site, effectively bypassing the port block.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question