Nginx Webserver not available outside lan http only https works - http

Im having a strange issue, I have a Nginx webserver running with valid ssl certs on it. On LAN i can access it at http://192.xxx.x.xxx and https://192.xxx.x.xxx no issue but when i go to outside my network i can only access https://example.com the regular http:// connection times out and cant connect.
here is my router port forwards
(name - remote port - lan ip - local port - protocol)
(Webserver80 - 80 - 192.xxx.x.xxx - 80 - TCP)
(Webserver443 - 443 - 192.xxx.x.xxx - 443 - TCP)
I dont get why i can see the http on lan but not wan, and https works fine.
I Did some open port checks and both are seen by the internet
Success: I can see your service on xx.xx.xx.xx on port (80)
Your ISP is not blocking port 80
Success: I can see your service on xx.xx.xx.xx on port (443)
Your ISP is not blocking port 443

Think I fixed it.
Deleted the port entry in firewall port forward. Rebooted the router and reapplied the port 80... Working now. Odd.

Related

accessing my local site from a remote computer

I have IIS 7.5 installed on my computer.
I have one site configured on it.
It has binding on port 80 with IP all unassigned.
I want to reach that site from a remote computer i.e. not inside the LAN.
I also configured port forwarding to my LAN IP but I still can't reach it.
Is there something else I need to do in order to achieve it?
telnet from computer to port 80 succeed but from a remote it doesn't succeed.
These are the configurations in my router:
10.0.0.2
External Port Start
1
External Port End
65000
Internal Port Start
80
Internal Port End
80
Ok - it was a problem with my router configurations:
I set port 80 for both external and internal and no I reached my computer

Default port not 80 when I go to a web page?

So I have this little add on in Chrome called Live HTTP Headers.
There is this one url I go to, lets say "www.example.com"
When I inspect the headers I see:
GET / HTTP/1.1 Host: www.example.com:443
So port 443 is directly being asked for, but how come? Should not it be :80 ?
Port 443 is default port number for HTTPS, so
http://www.example.com comunicates on port 80, but
https://www.example.com comunicates on port 443.
Of course, you could always have a different port number and in this case is mandatory to explicitly show the port number in use, i.e.:
https://www.example.com:1443
You can actually run a webserver on any port within the valid range of 0 to 65535.
Internet Assigned Numbers Authority (IANA) do have port recommendations for serving and receiving different types of network traffic which you can read about here https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt
But technically I think you can do whatever you like.
As others pointed out 443 is the default https port. But this just means example.com have configured their webserver to serve secure http (https) content on port 443. They could if they wanted to, serve it on 8443. Most browsers however are configured to automatically send https traffic to 443 if no port is specified in the url. This means if you wanted to server https traffic on port 8443 the user would have to put in the address https://example.com:8443 explicitly.

How to hide web application port in reverse proxy

I have use nginx for reverse proxy which listen on port 80. and I have a web application listen on port 9999, I config nginx with reverse proxy to redirect client request from port 80 to port 9999.
Now I found that when access 80 port, browser will show web application response (this is correct.), however, if browser directly access 9999 port, it will also show web application response.
So, How can I configure nginx that browser can only access port 80, not port 9999. Thanks!
i will recommend you two solutions:
You can bind your application to listen on localhost:9999 rather than *:9999
you can edit your firewall to don't allow traffic for 9999 port and only allow for port 80. for that you can edit iptables by going to /etc/sysconfig/iptables

How do I forward TCP port 80 to web server (using nginx)?

I am following this tutorial and I made the server work in the local network. Now I want to open to the internet. The tutorial does not go into details, except saying that "you need to forward TCP port 80 to your Web server". I did some research to understand what this means, but could not find a good step by step instructions. Can you direct me to any material that I can read to set up the server for the internet?
EDIT
As instructed here I connected to the router with 192.168.1.1 and opened the Port Forwarding/Port Triggering tab and I entered the following information:
Service Name HTTP
Start Port: 80
End Port: 80
Server IP Address: ServerIPAddress
Is this correct?
That means that you have to forward http request coming to your public_ip:80 to your private_ip:80.
This is usually done with proxies or firewalls.
As we are talking about home network here, i think you have a home box/router that provides you internet access.
So you have to login to your box/router and searh for a feature like routing/port-forwarding configuration settings.
Then configure it to forward port 80 to your web server private ip on port 80.

Cannot host website on my personal server

I am not able to host my website on my personal server. I am using IIS7. I have already forwarded the port number 80 on my router and configured my firewall to allow incoming connections on port 80. The strange thing is that I am able to access SQL Server databse from outside which is running on port number 1433 but not my website. Please help.
I finally solved my problem.....i was having an issue with port forwarding thing...Earlier i opened up port number 1433 first then port 80 second the port 27015 third...in this order...now i channged the order ie 80 first then 1433 then 27015....strange but it worked...!!

Resources