I have 3 websites running on my server, all of them on different ports. One is on port 80 and it works fine, the other one is on port 88 and it also works fine. Today I deployed a third one on port 8080, opened the port in Firewall.
I can access it with http://localhost:8080/, with 127.0.0.1:8080 and with it's internal IP address. I can't access it using the external IP address for some reason. I tried accessing it locally using the external IP address and I tried from another computer.
It is worth noting that the website on port 8080 is almost identical to the one on port 80.
Initially I thought it was a firewall issue but I disabled the firewall and tried again and I get the same result (The website took too long to respond).
I am using Windows 10 on the server.
Any ideas as to why this is happening?
I figured out the answer. I am using an EC2 instance from Amazon Web Services for a server. I forgot to go into the console in AWS and open the port there too. I did that and now it's working as it should.
There could be couple of reasons.
Cloud Provider(AWS) Specific
Check your subnet's ACL rules. Both ingress and egress
Check the security group attached to the instance. It should allow ingress
on that port/protocol
Windows Server Firewall: All windows servers and desktops have firewall running which blocks any non-standard traffic. Make sure to add a custom rule to allow the traffic that you want to allow. I found this https://computingforgeeks.com/how-to-open-a-port-in-windows-server-firewall/ link helpful
On my computer I have deployed my web site on IIS. If I access this website locally with :8080 works perfect, but when I try to access this site from another machine or my Android phone I get 'The site can't be reached. my_ip_address took too long to respond ERR_CONNECTION_TIMED_OUT –' this error.
I have tried solutions from this question, but nothing worked for me. Need some help!
There are few factors which can affect the accessibility of the site hosted on your local computer:
Is the client machine (including your phone) in the same network as the Server (In this case your site)
Is the firewall configured to allow connections on port 8080
Have you tried accessing the server using the IP Address. For e.g. http://192.168.0.1:port
Steps to isolate
Ping the server Ip from the client machine and see if it is able to connect to it.
ping 192.168.0.1
If the above fails, then I would assume that you are not on the same network. If it succeeds then check if the port is open.
You can also use nmap to see whether the ports are open or not
nmap -p 8080 kaushal.com
If the above fails, then open the port in your Firewall configuration and then try again.
Try this and share the results.
I'm working on a website for a friend, developing using Eclipse/Tomcat. I'm running it locally and trying to open it via my internet port IP address, but I can't get it to work. The computer I am running it from is connected to a router, so it is running off of 192.168.1.4, and http://192.168.1.4:8080/Mobile_Site/index.jsp works. However when I try and open it via my internet port IP, http://67.xxx.244.xx:8080/Mobile_Site/index.jsp it doesn't find it from any device, even outside my local network. Is there a way to send the link when running locally when connected to a router?
You have to configure your router port forwarding (or virtual servers depending on the router) to forward TCP connections from 67.xxx.244.xx:NNNN to 192.168.1.4:8080.
Then you give the 67.xxx.244.xx:NNNN address to your friend.
Note: NNNN at your router doesn't need to be 8080, as long as the port forwarding is set properly.
I have a rails server that i run from Aptana Studio. I normally connect to it via localhost:300, and everyone on the network connects to it via stonecrab:3000 (stonecrab is the name of my computer). However, how do I allow people from outside the local network to connect to the server? For instance, if the IP of my internet connection is 123.456.7.8, what URL can someone use in a web browser to connect to my server? I have a linksys e1000 router and i can access it if i need to change any settings.
Thanks
By default, your machine will not be accessible from behind the router. You need to enable port forwarding in your router. You need to tell your router to forward port 3000 to the IP of stonecrab. Then you will use 123.456.7.8:3000 to access stonecrabe:3000 from outside the LAN.
I would like to test my web app in other browsers. I have installed Virtual PC to do just that. the ASP.NET development server does not allow remote connections so the virtual pc (another computer on the network) cannot access the website.
I found this post that was started but there was no solution.
I understand that using localhost will not work. I heard about using the machines ip, but how do I get that correct ip? Look at my lynksys router admin?
If I were to get as far as getting my IP, im sure that the asp.net dev server does not allow remote connections. How do I enable it to do so?
The answer is: no(*). You cannot access the ASP.NET Development Server on one machine from another, even if you open the Windows firewall TCP port.
From the MSDN article "Web Servers in Visual Web Developer":
It is specifically built to serve, or run, ASP.NET Web pages under the local host scenario (browsing from the same computer as the Web server).
In other words, the ASP.NET Development Server will serve pages to browser requests on the local computer. It will not serve pages to another computer. Additionally, it will not serve files that are outside of the application scope.
(*) You'll have to run your site from your locally installed IIS... or do the nice hack using some freeware described in this blog post:
iPhone Accessing the Visual Studio ASP.NET Development Server
Use SPI Port Forward to accept the device connections do the following:
Set "Local port" to the port number the device will connect on, I usually use 8080 out of habit
Set "Remote host" to localhost
Set "Remote port" to the ASP.NET Dev Server Port
Click the "Activate" button to start accepting connections
(note: make sure you've started the program with admin rights)
I'm making some guesses about your setup here so bear with:
If your virtual machine is XP Professional, Vista Business, Windows 7 Professional or better, then you should be able to run IIS locally on the development machine and access that webserver from another machine which is on the same network via the virtual machine's name.
Likewise, if you're doing development on a real machine and would like to use different virtual machines to access the web application, you should make sure that you have IIS installed, create a new website in IIS and you should be to browse to the web application via machine name from your virtual machines.
Either way, don't try to use the builtin web server from Visual Studio, just publish your site to IIS and work with it that way.
Good luck and hope this helps some.
Setup a portforwarding using RINETD
Deatils here: http://blog.waynehartman.com/articles/218.aspx
Another answer if you don't want to use IIS (or tunnels): https://stackoverflow.com/a/12008223/1552178
Use fiddler or similar on your host - set your browser on the client
VM to use the proxy then just use localhost:dev_port as usual on the
client.
All requests from the client goto the proxy on your dev machine which
routes to localhost on the dev machine and the ASP.net dev server
thinks the request is from your dev machine!
I am answering this old question to help people to make it work without IIS.
1. First Step
You have to download Fiddler.
Once Fiddler is downloaded and installed, open it.
Go in Tools-> Fiddler Option-> Connection tab-> And check "Allow remote computers to connect" :
Restart Fiddler.
2. Second Step
After this, in the other PC on the network OR the VM, open internet explorer-> Internet Options-> Connection Tab-> Lan Settings-> Check "Use a proxy server for your LAN" :
The adress is the IP adress of your DEV machine.
And put the port 8888
Now, you can access the ASP.NET Web Server from another PC on the network (maybe you have, more config to do, like firewall, unrestricted port, etc, but this is a good start) !
To access it -> http://localhost.:54814
Don't forget the additional point after "localhost" ! (Overwrite the local localhost)
The port, "54814" in my case, is the ASP.NET Web Server port.
NOTE :
To test if the proxy work, you can try this : http://localhost.:8888
Maybe I forgot to point out some configurations, but it always depend of the network infrastructure.
Working solution for Linux
This should work if you're running an ASP.NET Dev Server on Windows in a VM or on another host and you want to access it from Linux
On Windows machine
For some reason you cannot connect directly to the ASP.NET dev server port, you need to proxy it locally first:
Use SPI Port Forward to accept the device connections do the following:
Set "Local port" to the port number the device will connect on, such as 8089
Set "Remote host" to localhost
Set "Remote port" to the ASP.NET Dev Server Port
Click the "Activate" button to start accepting connections
(note: make sure you've started the program with admin rights)
On Linux machine
Locally forward localhost port 8089 to the windows IP (replace GUEST_IP_HERE with the correct ip):
iptables -t nat -A OUTPUT -m addrtype --src-type LOCAL --dst-type LOCAL -p tcp --dport 8089 -j DNAT --to-destination GUEST_IP_HERE:8089
iptables -t nat -A POSTROUTING -m addrtype --src-type LOCAL --dst-type UNICAST -j MASQUERADE
This is needed because the dev server specifically looks for localhost in the request and will not respond to http://GUEST_IP_HERE:8089 from the host
I tried the following that i expected to enable current .net framework [ core / x-platform ] 6.0 release provided asp.net development web server access at least from other machines on local subnet w/o needing to use any 3rd party software enable the port forwarding/proxy to localhost only exposed web server.
I was able to launch the asp.net development web server from windows wsl [ windows subsystem for linux ] distro session and access it using the windows host wi-fi adapter ip address but not from another machine on my subnet, e.g. a vmware linux install operating in bridge mode. It did work if i switched vmware linux install to nat mode.
Any thoughts on why this doesn't allow other hosts access as i expected it would?
netsh interface portproxy add v4tov4 listenport=<tcp port for non-localhost access allowed/enabled in windows firewall> listenaddress=0.0.0.0 < or windows wired/wifi ipaddress > connectport=<tcp port for localhost access to asp.net development web server> connectaddress=localhost
e.g. netsh interface portproxy add v4tov4 listenport=4430 listenaddress=0.0.0.0 connectport=7146 connectaddress=localhost & netsh interface portproxy add v4tov4 listenport=8080 listenaddress=0.0.0.0 connectport=5038 connectaddress=localhost
netsh interface portproxy show all
// for %i in ( 4430, 8080 ) do ( netsh interface portproxy delete v4tov4 listenport=%i listenaddress=0.0.0.0 )
netsh advfirewall firewall add rule name="Asp.Net Development Web Server Listeners to Expose" dir=in protocol=tcp localport=<csv list of tcp ports allowed/enabled in windows firewall> profile=private|any remoteip=localsubnet|any action=allow [ enable=yes ]
e.g. netsh advfirewall firewall add rule name="Asp.Net Development Web Server Listeners to Expose" dir=in protocol=tcp localport=4430,8080 profile=private remoteip=localsubnet action=allow
netsh advfirewall firewall show rule name="Asp.Net Development Web Server Listeners to Expose" [ or wf.msc | inbound rules ]
// netsh advfirewall firewall delete rule name="Asp.Net Development Web Server Listeners to Expose"
year 2022:
After trying everything on asp.net core .NET 6 side and failed I have found
https://mitmproxy.org/
mitmproxy --mode reverse:https://localhost:7053 --ssl-insecure
covers my use case.
on phone and other devices access with http://{your-pc-ip}:8080
Open a command prompt and type; "ipconfig" this will give you your machines IP address.
If you disable your firewall (for the asp.net dev port at least) you should be able to type into the virtual PC's browser http://192.168.1.3:3243/default.aspx