Access IIS 8 Localhost from internet
Solution 1
Assuming that you have configured IIS correctly, you will need to do the following:
First and foremost - ensure that your ISP allows those ports on your internet connection. Most do, but some do not - this is because web hosting is often considered a breach of ToS on domestic internet connections. Ports 8081 and 8082 should be OK, but ports 80 and 443 are sometimes blocked. Your ISP may allow you to unblock the ports.
Secondly, you will need to forward those ports to your webserver's private IP address. Do this by going to the configuration page on your router titled "port forwarding". From here you will need to specify all the ports you wish to forward. Ensure that you set them to TCP, and that you set the destination address to be your webserver's private IP - this is what you see in ipconfig.
Next, ensure that your webserver's firewall (e.g. windows firewall) allows these incoming ports - or simply disable the firewall altogether (not recommended).
Lastly, ensure that you test your setup by using a computer that is external to your local network.
Solution 2
its depend upon your ISP provider,most the ISP provider won't allow you to set dynamic ip address for webserver purpose.Beacuse dynamic ip changes thus for testing webpage we need a static address.
Related videos on Youtube
Yohanim
Updated on September 18, 2022Comments
-
Yohanim over 1 year
i want access my localhost(IIS 8 On Windows 8) from outside using internet access.
I get my
public ip
from whatismyip.org (202.67.xx.xx) and follow this link to open a port(80,443,8081-8082). So i created 3 new rules for port that allowed all program using UTP Protocol in inbound rules on firewall settings.My Connection : PC -> Modem -> Internet. My Public IP : 202.67.xx.xx My IP Get from IPconfig : 10.216.xx.xx
Then i using another computer(laptop) with browser to access my PC public Ip address. I Type in browser 202.67.xx.xx:80 or 202.67.xx.xx:8081 or 202.67.xx.xx:8082, and get result
Oops! Google Chrome could not connect to 202.67.xx.xx:8081
.Even i turn off all my firewall, i couldn't connect. I'm Stuck here, can somebody help me please? I'm really appreciate it.
Thanks.
-
vic about 10 yearsPlease give more details (like error logs of iis). And in ip setting please configure ip address 202.67.xx.xx (needs static ip address).
-
Snowlockk about 10 yearsYou're not going to be able to test outside connectivity from inside your LAN. You're going to have to test it from another connection, but note that most ISPs don't allow you to host web servers on residential/dynamic IPs and it is most likely against the ToS.
-
pauska about 10 yearsWhy are you pretending to be Jeff Atwood?
-
Yohanim about 10 years@vic it seems my IIS not error, i've tested it in local connection and it fine. My Ip Address dynamic and i need this solution to test my ASP.NET website in several hours, not for published.
-
Yohanim about 10 years@jacob how to know? how about using another port? whether there are other ways that can be used?
-
-
Yohanim about 10 yearsHi, thanks for your reply, but i don't use any router, just my pc connected to GSM modem and then connect to the internet, just it. I've turned off all my firewall(i think rule that i created in inbound connection to be useless). Then i open the browser in another computer with different connection, enter my public IP in there using port 8081 or 8082 and nothing happened, what i miss? thanks
-
blacklight about 10 years@CodingHorror Sorry but you won't be able to do this with a GSM modem. This is because your modem doesn't actually have a public IP Address. The public IP address you're seeing will be on a gateway device owned by your ISP. Your modem (and subsequently your PC) will both have private addresses (Think of it like a LAN network). You NEED some way of instructing the gateway to forward traffic on port 80 to your PC. But unfortunately this is impossible with a GSM modem as the gateway is out of your control.
-
Yohanim about 10 yearsIn my house, I've ISP that using fiber optic cable. My ISP using modem CISCO model DPC2100r3 that have RJ45 port and fiber optic port(to connect ISP). My ISP is First Media, they provided a modem-router Cisco DPC2100R3 for the internet connection.Can i use it? thanks for your help.
-
Yohanim about 10 yearsso what should I have to be able to create a temporary web server at home? thanks
-
blacklight about 10 years@CodingHorror Do you have the Cisco modem connected directly to a computer? Or do you have it plugged into a router? If you're using a router then you will have to set up port forwarding as explained in my first post. If it's plugged straight into a PC then you should be good to go - providing you allow the traffic on your windows firewall.
-
Yohanim about 10 yearsit's plugged straight into a PC (MODEM -> PC), but I've read through the internet that any type/kind of modem does not support "PORT FORWARDING". So any solution? thanks
-
Yohanim about 10 yearsfor information my ISP using Dynamic IP, any solution?
-
blacklight about 10 yearsYou shouldn't need to do port forwarding if the modem is plugged straight into the PC - almost all cable / DSL modems will provide the connected device with a public IP address. Do you get a public IP address on the PC that is connected to the Cisco modem?
-
Yohanim about 10 yearsHey, its worked :), now i can access my local server. Actually, i just access my Apache server not my IIS server, 8081 port for Apache server. I've read from this link stackoverflow.com/questions/19312136/… about change the port of IIS. I change my IIS port to 8080, but when i accessed, nothing happened, Any idea? thanks very much
-
Yohanim about 10 yearsI forget create inbound rule for port 8080 in firewall. So my problem solved now. Many Thanks @blacklight PS. Sorry i cannot vote up u'r answer because my reputation :)