Why can't I use a port with my website domain name? - dns

I have a registered domain name, www.aaaDomain.com, assigned to ip address xx.xx.xx.xx . I set up my site on IIS8 to use the ip address xx.xx.xx.xx and port 8020 for my website. I can connect to the website when I type xx.xx.xx.xx:8020 in a browser but I cannot connect to the website when I use www.aaaDomain.com:8020
Also, I have another website on this same server as my Default website. When I type just the domain name without the port number, my default website comes up (because DNS does not allow adding port numbers) just like when I type in the ip address without the port number.
What am I doing wrong?
Here is what my site binding looks like on IIS8.

As you already have an existing site running on the server you should check your security settings on both the Windows firewall and any other security/firewall settings you have - It sounds like you have not opened the additional port which you have just configured in IIS.
Check to see if you can ping the new site by its domain name - that will verify that you have the correct DNS setup, you can also try & browse to it via the server console (or remote desktop) if that works then its security setting somewhere blocking your access. Even if the ping request times out it should still resolve the name to an IP address for you to check. You may find that ICMP is also blocked.

If you just changed your dns record, be aware that you should wait up to 72 hours for the dns to replicate after changing your dns record.

Related

How to redirect a HTTP request to localhost on windows?

I've created a node.js app. When it runs my mobile phone can connect to it using address 192.168.1.5. In other words, when I open a browser on my phone and enter 192.168.1.5 I get a welcome page served by the app running on my PC.
The problem is that the IP address is not human friendly. Is there a way to access my app by an alias? For example, http://myapp or something like this?
Yes, these aliases are provided by the domain name service (DNS). You need to set up a hostname on DNS to point to your machine's local address.
Put that IP address into a DNS server.
Here's a free way to do that.
Create a FreeDNS account by visiting https://freedns.afraid.org/
Click on Subdomains.
Click the Add link.
Create a subdomain hostname under one of FreeDNS's public domains. Maybe mydev.manidos.mooo.com is a good choice
Put your machine's IP address into it.
Then, use https://mydev.manidos.mooo.com to hit your development machine's nodejs app.
You can pay FreeDNS to register your own domain name and use that if you prefer.
There are all sorts of other ways to register a domain and then add address records to it, to translate from hostnames to IP addresses.
Edit If you were connecting to and from your desktop / laptop machine, you could add a hostname to your hosts file. The hosts file is itself a little DNS registry that's local to your machine. On windows it's at C:\Windows\System32\drivers\etc\hosts. On *nix and mac it's at /etc/hosts.
But, you are connecting to your app from a mobile device. Editing the hosts file in a mobile device is unreasonably difficult.

Is it possible to query a specific DSN server for a web page?

I have the IP address of the DNS server from the WebHost. Since we do not own the Domain Name (Its the client's DN) I would like to query the WebHost DNS directly to see if it works before asking the client to point his DN to the WebHost DNS.
Am I missing something here? I'm kinda confused when it comes to configures online services.
From Windows Command Prompt:
nslookup
server x.x.x.x (put the WebHost DNS IP address there)
www.yourdomain.com (type the name of the domain you want resolved)
quit

Is DNS server And Host file Are different?

I am unsure Whether both DNS server and Host file are the same or different.
I Hosted an application in IIS and created A host name as website1.domain.com and tried to browse it and it didn't work.
When searching on net i found that we need to make entry in DNS server or Host file.
As in most of the sites that I saw mentioned DNS server or host file. I am unsure Whether the both are same or they both are different.
A hosts file is used by Operating Systems to manually specify the IP addresses for specific domains/subdomains - think of it as an override.
DNS however is a server - think of it as a registry - that keeps track of records pertaining to domains, such as A records, MX records etc.
For the purposes of a local test site, an entry in your hosts file would be sufficient, however for a live site, a DNS entry relating to the domain you wish to have your site hosted on would be required.
Choosing which to use comes down to a few things. Does the server upon which your hosting the site use its own DNS server, i.e. a DNS server on the same network, which the connections to the server will be using as well? Does the domain name the site uses have its nameserver set to one that is externally available (i.e. 123-reg.co.uk). If either of these cases are true, you could probably use a DNS server.
If not, is the server hosting the site running on the same machine as the client that will be viewing the site? If so, you can probably use a hosts file, pointing your domains to the localhost IP of 127.0.0.1, ensuring the domains match the bindings in IIS.
Dns server is a server that will help to resolve dns names. ie when you type google.com in your browser , the name will be passed to the dns server provided by your isp. then it will be resolved to ip address by the dns server and your request will be routed to the google ip address by isp network. host file is different one. if you add www.mydomian.com entry in your host file and map it to an ip address 192.168.0.1 then your computer will check ion your host file when you type www.mydomain.com, whether there is any entry for mydomain.com in your host file, and if exists it will be routed to that ip address. in case if there is dns server and you set that server ip in your hnetwork configuration in your pc, then all the domain name request will be sent to that dns server(if there is no host entry exists)

how to set an ip address as the host header in IIS 7.5 bindings

I am having an issue getting an IIS 7.5 website to answer when I connect to it using an IP address.
I have a Win2008 Server set up with IIS 7.5. It has only one IP address bound to it (10.10.10.10), and IIS listens on it just fine. I have IIS hosting two websites: defaultsite and mysite. Both of these two are necessary to be present. (To be fair, I have many more sites, but 2 will simplify things.)
Defaultsite is your typical IIS default site and has an IIS binding of "*:80:"
I want to access "mysite" via the DNS name but also the public IP address 1.1.1.1. So I've added the appropriate bindings:
":80:1.1.1.1"
":80:mysite.com"
My DNS and load balancer are moving traffic just fine to the IIS server. Everything works fine when hitting the server via "mysite.com" and I get the defaultsite if I try other ways to get to the server.
The problem is when I use 1.1.1.1 to get to the server, I get there, but I'm still sent over to the "defaultsite" rather than "mysite." My IIS logs and the file contents I retrieve verify this behavior.
Any ideas on how to get an IP address set as the host header on a site binding? (Searching for this situation is vexing; since all my key terms are present any time you work with host headers/bindings.)
Remove the binding for *.80 from the default site and make it respond to 10.10.10.10 and then your other site will get picked up when you type the 1.1.1.1 site. IIS is responding to the request but the rule states 'If any site comes through on port 80, respond to the default site'. The DNS name works because you are going by name and the lookup is not there on the default site.

DNS not resolving outside intranet

We are installing a security camera system in our company which comes with a DVR that hosts a website on which you can view the cameras via the web.
I have setup the DVR with a static IP of 192.168.120.199 on our network and can view the website while on our network (either when at work or logged in via VPN). The camera DVR uses port 80 for viewing the webpage and port 9000 for Media Port.
We use GoDaddy to host our DNS info and I have added an Host(A) record of 'cameras' that points to the address of our server. I have also added a forward lookup Host(A) to our domain's DNS manager of 'cameras' that points to 192.168.120.199. When I use the address 'cameras.mysite.com' within our domain the website displays properly, but when I try the same address from outside our domain (ie, at home) it displays the default IIS 7 page (from our domain server).
Two questions about this setup:
Why does the forward lookup work when inside our domain but not outside (why does it go to the IIS default page when outside the network)?
How do I get this to forward correctly if not via the forward lookup host?
Because internally you're looking it up on your internal DNS server and you get the right 192.168.x.x machine. When you look it up externally GoDaddy is giving you back the 192.168.x.x, but that's not a publicly routable IP, so doesn't go anywhere. If you really want to be able to connect to your security cameras from outside your facility then I suggest setting up a VPN for security reasons. But if you want GoDaddy to directly route to your internal machine from the public internet then you'll have to give it a publicly routable IP.
As a further note on that - 10.x.x.x, 192.168.x.x and 172.16-31.255.255 are not publicly routable. They're called private IP blocks.

Resources