Solved

Online port relay / redirect

Posted on 2013-06-14
7
603 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 39

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 39

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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 4

Author Comment

by:joachimcarrein
ID: 39270613
Hey aarontomosky,

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

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 39

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

Optimum High-Definition Video Viewing and Control

The ATEN VM0404HA 4x4 4K HDMI Matrix Switch supports 4K resolutions of UHD (3840 x 2160) and DCI (4096 x 2160) with refresh rates of 30 Hz (4:4:4) and 60 Hz (4:2:0). It is ideal for applications where the routing of 4K digital signals is required.

Question has a verified solution.

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

In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
WARNING:   If you follow the instructions here, you will wipe out your VTP and VLAN configurations.  Make sure you have backed up your switch!!! I recently had some issues with a few low-end Cisco routers (RV325) and I opened a case with Cisco TA…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

624 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