Solved

IIS Trying to map to another port on another machine on internal lan

Posted on 2008-10-12
15
287 Views
Last Modified: 2012-06-21
I have a windows 2008 server running iis7 and exchange server.
I can only access port 80and 443 from work, so everything needs to run on port 80 and 443, Which all works fine except i wish to access remotly anywhere on another internal machine on port 2000.

how do i make iis redirect www.mydomain.co.uk/remote to the other machine
0
Comment
Question by:Adznon2
  • 6
  • 5
  • 2
15 Comments
 
LVL 4

Expert Comment

by:palner
ID: 22697590
There are 2 ways to do this.... One is a simple .asp page that you can put in the directory called remote... the other is to redirect the remote directory to your new resource.

The code for the .asp is listed below.

The redirect method would be to:

1. Right click the properties of the directory in the IIS manager
2. In the home field, choose redirect to another URL
3. add the port number to the URL, ie:
    http://www.mysite.com:2000
4. Ok it out.


<%
 

response.redirect "http://www.mysite.com:2000"
 

%>

Open in new window

0
 
LVL 12

Expert Comment

by:Pugglewuggle
ID: 22697794
Yes that would indeed work, but there are two thigs palner had wrong and not there:
1) The part that's wrong is that you can't just make an ASP page and access it without typing .asp at the ent of the URL.
The best way to redirect this is simply to create an empty folder in your site root and go to IIS Manager and tell with the Home Directory tab to Redirect to Another Resource (check the exactly box).
2) The one thing not mentioned though is that you must have port forwarding on your router/firewall setup to forward port 2000 to that other machine.
Cheers! Let me know if you have any questions!
Let me know if you have any questions!
0
 
LVL 4

Expert Comment

by:palner
ID: 22697825
1) The part that's wrong is that you can't just make an ASP page and access it without typing .asp at the ent of the URL....

I assume you mean end... and it's called a default document. If you use a default document, you don't need to write .asp at the end.

2) The one thing not mentioned though is that you must have port forwarding on your router/firewall setup to forward port 2000 to that other machine.

Clearly if the firewall wasn't allowed, it wouldn't work. That's like saying the computer must be on or there must be Internet access.

0
 
LVL 12

Expert Comment

by:Pugglewuggle
ID: 22700180
Yes, the concept is called default document, but it only with a directory - you can't access a document in the directory with no extension - there must be a directory named what you want to access. Feel free to try it and see. Do know what you're talking about before trying to defend it.
www.domain.com/stuff
You need a directory called stuff with a default document in it for this URL to work... just having a file in the root called stuff won't do the job. And if you enable the default document on the root of the site for that page, you just changed the home page of the site.
While it is obvious to us that the port needs to be opened, it doesn't hurt to point it out and I've seen many instances when even highly skilled users and technicians miss a detail such as that. Just mentioning it to eliminate that possible point of failure.
Cheers!
0
 
LVL 4

Expert Comment

by:palner
ID: 22700220
Clearly he would need to make a directory. It's called context. Before you get on a high horse, proof what you post so you don't sound like an egotistical bully.
0
 
LVL 4

Expert Comment

by:palner
ID: 22700323
Also, your tone is just unprofessional. I clearly say:

"One is a simple .asp page that you can put in the directory called remote"

Your tangent below is simply uncalled for:

"You need a directory called stuff with a default document in it for this URL to work... just having a file in the root called stuff won't do the job. And if you enable the default document on the root of the site for that page, you just changed the home page of the site."

I understand you want to help people. Me too. Try being constructive and if you're going to say someone is wrong... I'd re-read their post if I were you.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 12

Expert Comment

by:Pugglewuggle
ID: 22703922
Ummm Palner? I'm pretty sure I did say directory...
And why complicate things with creating and putting an ASP file in a directory to do the redirection when you can simply used IIS's integrated server-redirection by redirecting the folder instead?
Also, if you look back (in your first post) you failed to mention the need to define that ASP page as the default document if that path is taken. I simply informed the asker of this in my next post.
As far as the unprofessional tone goes, what's with the attack? Did I insult you in some way by correcting something you forgot and then offering a simpler solution that will get the job done just the same?
If you truly want to provide the best solution, make it simple.
Cheers!
0
 
LVL 4

Expert Comment

by:palner
ID: 22703983
asp page offers many advantages that some people like, for example, being able to change the redirect via FTP and not the IIS Admin. Also, yes, your tone was insulting. On this site, if you say someone is "wrong" and "Do know what you're talking about before trying to defend it" you are throwing a gauntlet down that is basically saying I am both incorrect and have no knowledge in this area.

You are incorrect on both counts. Let's drop this.
0
 
LVL 12

Expert Comment

by:Pugglewuggle
ID: 22704229
This is true, it does allow one to upload a file via FTP to do it.
And no, my tone was not insulting. Stop being a baby. And let's do drop this.
Any other questions Adznon2?
0
 

Author Comment

by:Adznon2
ID: 22705478
the problem is, i am not able to use any port other than 80 or 443. i dont believe that this will solve the problem

Adz
0
 
LVL 12

Expert Comment

by:Pugglewuggle
ID: 22708124
If that's the case, then no it won't solve the problem.
Why can't you use any ports other than 443 and 80?
The only way to do this if that's the case is to use one of those ports and forward it to the PC at 2000 on the inside, but then HTTPS and HTTP won't work...
Can you please check and make sure there's no way to use port 2000?
Cheers!
0
 

Author Comment

by:Adznon2
ID: 22709423
no there is no way of using any other ports, they are the onl two open from my company network
0
 
LVL 12

Accepted Solution

by:
Pugglewuggle earned 500 total points
ID: 22709472
Hmmm.... well in that case it's not going to be possible. Maybe you can see about getting them to open the port for you?
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
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.

706 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now