[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 310
  • Last Modified:

DNS record to forward to a IP and a PORT

Hi all,

I want to access my mailserver via a domainname.
My mail server is running on port 9000.
When I acces my local IP 192.168.0.10:9000 I can see the correct info.
So, I forwarded my port in the router so now I can access my webserver over the internet.
using www.mydomain.com:9000

I'm looking for an option to make something like www.mydomain.com/mailserver/
Which tells the system to lookup mydomain.com:9000
How can this be done? I think it has something to do with an A record or CName but I'm not shure how to fix this.
Any ideas?

Best regards,

Osa2
0
osa2
Asked:
osa2
  • 4
  • 3
1 Solution
 
Chris DentPowerShell DeveloperCommented:

> How can this be done?

In DNS? It cannot, and that's all there is to it.

All the DNS server does it tell the Browser an IP Address for a name for browsing. It's up to the Browser to choose the port, and by default that'll be 80 for HTTP and 443 for HTTPS (and 21 for FTP).

You could potentially have the Port 9000 part load within a Frame, with the main page hosting the frame loading on Port 80. That would obscure the fact that it operates on Port 9000, but you still need something answering on Port 80 to do that.

Chris
0
 
osa2Author Commented:
I don't want to load stuff in frames. Because different browsers load the frame wrong.

So I need the .htaccess way.
I'm trying to find how to redirect a certain directory to an other url.

When I go to www.mydomain.com/mailserver I need to redirect all traffic to mydomain:9000


0
 
asanewbieCommented:
what webserver software are you using?
0
 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

 
osa2Author Commented:
Axigen = running apache
0
 
Chris DentPowerShell DeveloperCommented:

It might work with this in an htaccess:

Redirect /mailserver/ http://mydomain:9000

Hopefully :)

Chris
0
 
osa2Author Commented:
Nope I tried it but it doesn't work. I know it can be done but I'm now looking at a php approach.
Using some php redirecting file.
0
 
Chris DentPowerShell DeveloperCommented:

That will certainly work :)

Chris
0
 
osa2Author Commented:
Redirecting the webserver to other ports but also to no solution.
the php approach worked for me.

Thanks for the help!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now