Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Online port relay / redirect

Posted on 2013-06-14
7
Medium Priority
?
613 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
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 
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 2000 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

Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

Question has a verified solution.

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

This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

722 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