How to access a URL with port with out disabling firewall - asp.net

I have a server to which I connect using VPN. I have a deployed a site on this on IIS server. URL for the site is "http://localhost:8080/mysite". when I use this Url on server it is opening up.
But When I use its ip address Lets say http://172.x.x.x:8080/mysite it is not accessible. (not on the server not from my dev machine (Which uses VPN)).
But if I disable firewall on server then It is accessible using the IP and port 8080 also or if I change the port number of deployed site to 80 then also I can access it(without disabling firewall).
Is there any way so that I can use my port number 8080 and also don`t need to disable firewall on server.

Related

Why can't I access my website from the internet after setting the firewall rules and port forwarding

I created an asp.net core web app that works locally.
not configured for https if that matters.
I did the port forwarding for the app through my router in two ways
dmz way
firewall rules way
I set the firewall on the computer and router for port numbers 4999-5002
here are the settings for the firewall on the computer
inbound rule
outbound rule
Here is the console window that comes up when running the website
console window
So when I try to access the app using my IP that I get from IP chicken.com the browser will say too long to respond.
What am I missing?
My Isp is att and I do believe they allow hosting of a web server with my plan

IIS web app is not accessible on the same network but Apache app is

I have a server that has both Apache and IIS running simultaneously.
Both apps are configured on different ports and both apps use HTTPS.
The app on Apache (port 433) is accessible on any computer on the network, but I can't get the IIS app (port 4433) to work. It says: This site can’t be reached
I can ping the server.
I'm trying to access both websites with IP address of the server and port after it.
The IIS app works on the server, both with localhost address and server IP address.
I have tried all the solutions I found:
1. disabling firewall
2. allowing just the port I needed through the firewall
3. allowing anonymous access in IIS
4. different ports (4433, 7200...)
Nothing seems to work.
I will be grateful for any help.
I assume your IIS binding looks something like this:
Specifically, "All Unassigned" for the IP address, and no host name defined.
If that is what you have, then it sounds like a firewall problem. i.e. The traffic is not reaching your server.
The easiest way to check this is to turn off Apache and change the IIS binding to use port 443. If it works, then you know it's just the other port that doesn't work.
You can also use something like Wireshark to actually see if any traffic on port 4433 is making it to your server (you can use the filter tcp.port == 4433). If you don't see any traffic there even though you've made a request from another computer, then something is blocking it.
And when I say "firewall", I don't mean Windows Firewall. I mean either a router or dedicated firewall appliance that would need to be configured to allow traffic to that port.

IIS - Website at port 8080 can be accessed using localhost but not with external IP address

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

Accessing WAMP server from a different network

I was trying to setup WAMP server on my machine . Am able to access the localhost from the same PC or remotely from other devices in the same network .
However I would like to know how can I access it from a different network ?
Check the port 80 forwarding on your router. Forward port 80 of that particular machine/server to your router. That server should have a permanent local IP like 192.168.1.* or 192.168.2.*, etc whose port 80 is forwarded to the public IP of your router. This provides access to your server/machine with the set IP from outside your network!
For router settings, open a browser, in the location bar, type http://192.168.1.1 or whatever your router manual says it to be. You will need the default user/pass to login.
In order to have a permanent access to your home server with a domain, You need to get a permanent public IP for your network from your Internet service provider in order to assign a domain name to it.

How Can I Access Locally Hosted IIS WebSite from Remote Computer By My IP Address?

How Can I Access My Locally Hosted IIS WebSite from Remote Computer By My IP Address ?
You have to check you ip here, make sure that you are forwarding port 80 (especially if you're in a locale home network), and then you could access your server by http://<server_ip> e.g. http://192.168.0.6
Note that as long as you don't have a fixed (static) ip, your ip address might change, and you'll have to recheck it.
Another note- The default HTTP port is 80, and by using port 80 you could access your server via browsers without writing the port number. If for any reason you like to switch port, make sure your forward that port number and access your site by http://<server_ip>:<port_number> , e.g. http://192.168.0.6:8080
if you are using some other port. then you can go with http://<ip_address>:<port_no>

Resources