Here’s what I need to do. I need to forward a URL to an IP with a port number for example 34.328.392.94:47 I cannot use just a plain ol forwarding service, because that would put display the IP in the address bar, not the URL. If I use cloaking, the URL is displayed but the page is a 100% frame (not compatible with Google and just plain horrible). So, I need some real DNS. No problem, except it seems like DNS will only forward a URL to an IP without a port specified for example 34.328.392.94 (default to port 80). I could have DNS resolve the name, then forwarding send it to the port, but then the port would show up after the address in the borwser address bar. All I want is the URL (not the IP or port) with no frames. Also if you click a link from the main page, it’s address needs to show up in the browser bar just like normal (www.somesite.com/page.html)
Is what I am in need of even possible? If not, what is the best possible solution?
I think you’ll have to give us more info. Such as is it yoru own server on yoru own modem/router? Whats the OS and is it using apache? If I recall from when I was setting up my server (mike-site.us) I had my modem/router send any requests to my IP address to my server’s ip address, then apache listened on the port which I assigned to it and voila. If I understand you correctly sounds like you want to do something like that?
Make sure you’ve read your TOS, cause you might get in a lot of trouble for running Apache (or any other type of server) on your cable modem. Not that it’s ever stopped me before, but just be careful and make sure to not completely saturate your upload stream unless your TOS says you can, and that’s usually only true if you have a business account, not a home account.
What you’re looking to do isn’t directly possible (though you can simulate it - more on that in a minute). The problem is that DNS’s only purpose is to resovle a name (www.chiefdelphi.com) into an IP address (216.7.168.120). DNS knows nothing about port numbers and doesn’t care. The key here is that the IP address tells you how to transport packets to somewhere on the Internet at the Network Layer, which doesn’t know about ports, only IP addresses. On top of the Network Layer sits the Transport Layer (which is where TCP and UDP are), and the Transport Layer protocols are responsible for knowing about port numbers. Unfortunately DNS does not have knowledge of what Transport Layer service you’re looking for, only the IP address of the host which you will find that service. This page here has a decent description of the layering approach used on the Internet.
The only way I can think of to accomplish what you want is this (which unfortunately I don’t think will help you any):
You could have a machine on the Internet that answered requests on port 80 and in turn opens up a new socket connection to your server on a different port. This machine ends up just acting like a tunnel or proxy. You’d point the DNS entry for the domain name which you want your website to appear on to the IP address of this proxy. So, what happens when someone accesses a webpage is that they do a DNS lookup on your website name and get the IP address of the proxy. They connect to the proxy on port 80, and the proxy then immediately opens up a connection to your machine at home on another port, say 1234. Now, any traffic coming from the website visitor goes to the proxy which then relays it to your home machine, and any traffic from your home machine gets relayed back to the website user. Like I said this probably doesn’t help you because it would require access to a machine on the Internet with an open port 80 where you could run a program like this.
One other idea that may accomplish what you’re after: if your ISP does not block port 443, then you can set your webserver up on that port and use a redirection service to point to https://<your ip address> The port will not appear in the URL because the use of “https” instead of “http” tells the browser to connect to the Secure HTTP port (443). You would need a secure web server to answer the requests, though. I don’t really think this is that great of a solution but I thought I’d throw it out anyway.
Thanks for all the info. I think it is pretty clear now that the exact thing I want is not available. For now, I’ve decided the easiest thing to do, is to just redirect the domain to the IP and port, and live with that until I get DSL because I don’t want frames, nor do I want to set up a proxy jsut for this. I an used outside WHM account I have, and set up a cPanel account just for the redirect because its nameservers are much faster than the free redirect services available on the web.
Hopefully my DSL will come soon. It will be 4 megs down, 400K up (with port 80 open too). It is taking a while to get but I would think it is well worth the wait. My current cable is Charter (the worst isp and service ever) with 300K down 130K up for those of you who are looking for companies to avoid.
A slightly better solution is to redirect the name to your domain and port, with a different sub-domain. For example, www.yourdomain.com and yourdomain.com would both redirect to www2.yourdomain.com:43, where www2.yourdomain.com routes to your IP address. If you have a good DNS host, this should be trivial to set up.