Facts:
I have the public ip address of my router that is static that i got from my ISP(internet service provider).
I also have a web server with windows server 2008 r2 edition.
I have my domain pointed at the public ip address of the router.
Question:
how do i set the web server up, with the router, to manage requests to the website.
Example:
i need to know how to do this:
When someone enters my domain name into their web browser , the DNS server sends them to the ip address of my router, then my router sends them to my web server to display my web site.
Go to your routers settings (most routers its 192.181.1.1 but look under your router for yours)
Type in your username and password (also located under the router) and once in find the port fowarding settings.
Have it foward all port 80 traffic to the ip address of your computer. So if your computers ip is 192.168.1.3 make it direct traffic to that ip.
Your router does port based natting for traffic from your inside 192.x.x.x network and the outside internet using your public IP.
What you want to do is called reverse NAT. For that you have to define a mapping of your internal IP and port number to an external IP and port number. It looks something like this
X.X.X.X:80 ------------> 192.168.1.x:80
X.X.X.X is your public IP and 192.168.1.x is the ip of machine where you are running webserver. Once you have this mapping it will let outside traffic to come inside using reverse NAT.
Most of the router have this feature listed as port forwarding where you have to create this type of mapping. They will ask you external port and internal ip and port to map to.
-MS
Related
Let's suppose we have the following scenario:
an on premise server with a public IP (aa.bb.cc.dd) and an application listening on a specific port (8081). port 80 is already used by another app.
an external application that send HTTP requests to an IP address. I cannot specify the port in the settings.
I would like something that forward xy.xy.xy.xy:80 to aa.bb.cc.dd:8081.
Is it possible to do it with azure? I can create a PublicIP address, but how to forward http request to azure-external ip address with different port? is there something else I can use?
Currently I have a https website setup locally on the Azure VM
with a custom hostname : <websitename>.<domainname>.com and bound to the localhost 127.0.0.2
in the hosts.etc on port 443
Consider example hostname as web.microsoft.com
Website bindings in IIS are
type:https
hostname:web.microsoft.com
port:443
IP Address:127.0.0.2
Hosts.etc
127.0.0.2 web.microsoft.com
In order to access it locally on the VM itself https://web.microsoft.com/admin/login.aspx works fine.
Port 443 is open on the Azure VM and inbound firewall rule is set in windows to allow connections on 443
If I try to access it outside of the network using the public IP address this doesn't work
eg https://45.60.200.110/admin/login.aspx.
I have other non-https websites which work fine and can be accessed through the public IP ,only difference is they are not having hostname in the IIS website bindings.
Am I missing something or do I need to make some additional config?
That's the problem.
The customized hostname cannot be accessed through the external network. Because the public network does not know this hostname, nor does it bind the hostname to your IP.
For example, you can enter other custom host names at will in the browser, and you will find the same error displayed.
The solution is that you need to purchase an available public domain name from the domain name provider and bind it to IP address.
If you insist on using custom domain name, it can only be used on the internal network. In addition to the configuration made on the server side, it is also need to add the host name and IP address in the hosts file of the client machine.
45.60.200.110 web.microsoft.com
I tried to connect to an IIS from WiFi but I couldn't although I succeeded connecting to it while that device was connecting to the router via LAN.
How should I change the router settings to connect to other devices localhost when all the devices are connected to the router via WiFi?
Router model: TP-link TD-W8901N
As far as I know, without using the DNS server, you couldn't access the web sites by using localhost url.
The only way you could access the site is using the ip address and the right port number.
You could firstly run ipconfig in the cmd tool on the IIS server.
Then you will record the IP address and the site's port number.
At last, you could use the IP address and the site prot number to access the sites.
Thr url like this: http://192.168.1.3:8098
How can I allow other users to access my application that is running on localhost? Is there any package in the npm that facilitates this access?
To access your localhost (on a home network) from the internet, you need to provide a couple things.
You need a way for your clients to contact your server. This can either be via an IP address http://xxx.yyy.xxx or a domain name http://somedomain.com/whatever. If it's an IP address, then it needs to be a public IP address (not a local network address). For a home network, you would typically use the public IP address of your router that is how you connect to the internet.
If you are going to use a domain name, then you need to actually choose a domain name, register it with a registrar and configure it to point to your router's public IP address.
If your router does not have a static IP address, then you will likely need to use a dynamic DNS service that will automatically update your DNS entry to point to your dynamic IP address whenever (or if ever) it changes. There are lots of dynamic DNS services.
Then, you need to create a "hole" in your router's firewall so that incoming connections to port 80 are port forwarded to the computer where your server is running. This will typically be done in the router's configuration/security administration UI. You will "port forward" and incoming request on port 80 to whatever IP and port your server process is running on your local network.
For a more durable server installation, you would do the following:
Buy a hosting package at a hosting site that hosts the type of application you are running at the scale you expect to run it at (storage, CPUs, bandwidth). In your case, you'd be looking for a hosting service for node.js apps.
Then, you'd buy a domain name and configure it to point to the public IP address that your hosting provider gave you for your server.
Then, you'd install your server app at the hosting site and run it according to the hosting provider's instructions.
Then, a user can access your server via an URL using your public domain http://somedomain.com/whatever.
You can do so by using ngrok. In your command prompt type npm install ngrok. Once installation finished restart your command prompt and type ngrok http 3000, here 3000 is the port on which your server is running. You will get something like http://ee309.ngrok.io which is your temporary domain. You can use it until you shut your system down or close command prompt.
I have IIS running and on my internal network it functions correctly. When trying to access it externally (either with direct IP or dyndns hostname) I always get redirected to my router log in page.
I've set up an IP on the host machine (192.168.1.29) and forwarded port 80 on my router. Also I have set an in bound rule to allow port 80 in Windows firewall.
When the router firewall is in default mode I cannot access my machine externally "Webpage not available"
Disabling the firewall gives me a HTTPS security certificate warning and when accepted directs to the router login page.
Any suggestions?
Many thanks
Sounds like your router is running its management pages on port 80. See if it has an option to change the port number for those pages.