Cannot Connect to Https - amazon-web-services

Hello Guys I have trouble connecting my site to https,, it always says ERR_CONNECTION_TIMED_OUT, the weird part is I have allowed my server and firewall to open port 443,
I have windows server 2016 Datacenter,
i netstat -a and i found port 443 listening,
I have Apache 2.4,
I thought it was ok because on my testing server, https is working with the same setup
but on this I cannot find the answer, My server is on AWS, with ports 443, 22 and 80 open on security group
I been struggling for 1 week, please someone help, I can provide any information

Related

how to expose a specific https port on ec2

i want to open up port 8080 to https connections.
but the port number is locked at 443 for all https connections. http is also locked at 80 and ssh at 22.
the reason i want to do this is because the image below shows a dockerized django project working on my machine
but the image below shows the docker container not connecting in my ec2 container
how can i open up port 8080 to connect to my ec2 container from my browser.
update
evidence below of of it not connecting still
Port numbers are just conventions (or 'standards') used for particular protocols. You can certainly use different port numbers for your services.
If you have a web server running on 8080 that is expecting HTTPS connections, you would need to:
Select "Custom TCP" and port 8080 in the Security Group, then add the appropriate IP address range (such as 0.0.0.0/0 for the whole Internet, or perhaps just your specific IP address) -- you can ignore the 'protocol' field since is simply listing the 'standard' uses for each port number
Point your web browser to port 8080, such as:
https://ec2-54-91-36-1.compute-1.amazonaws.com:8080

I cannot connect to my AWS EC2 url and I have a feeling it has something to do with my security group settings

I am very new to coding so trying to figure this out was very hard for me. I'm trying to deploy my code with docker and running my code inside the EC2 cloud. But I can't seem to get the instance's url to work. I set my inbound (security group) HTTP (80) => 0.0.0.0/0, HTTPs (443) => 0.0.0.0/0, and SSH(22) => my ip. I read that setting my SSH to 0.0.0.0/0 was a bad idea, so I went with my ip (there was an option called 'my ip'). Also, I am using ubuntu for my AMI.
While successfully docker using (docker-compose up), I used curl http://localhost:3001 (3001 is my exposed port inside my code) and it works fine. But when I used curl ec2-XX-XXX-XXX-XXX.us-west-1.compute.amazonaws.com, it outputs:
curl: (6) Could not resolve host: ssh and
curl: (7) Failed to connect to ec2-XX-XXX-XXX-XXX.us-west-1.compute.amazonaws.com port 80: Connection refused
Curl ec2-xxx-xx-amazonaws.com send request on port 80 , while you are docker is running at port 3001.
First verify that you have exposed some host port to docker. Something like this should come in docker ps -a
0.0.0.0/3001--> 3001 . the first 3001 can be any host port
Next make sure that the first port whichever you used is there in security group and opened for your ip.
Hopefully if all good at vpc and route tables settings then :3001(use whatever host port you gave if used anything apart of 3001) all should work

Ports 80 and 443 Closed

I'm currently attempting to setup a jupyterhub instance on AWS using a Ubuntu 14.04 machine.
I have been using this tutorial https://gist.github.com/widdowquinn/e91b9bb850ece8873bbd084944798fe2 and for some reason when trying to access jupyter.uiuc-bdeep.org using a browser the connection is always refused/unable to connect. Further snooping has revealed using TCP scanning sites that ports 80 and 443 are closed.
I'm not sure what is going on due to my EC2 security group inbound rules being open to all connections on port 80 and 443. Please let me know what is possible to solve this issue.
Snapshot of current security group configuration

Telnet to a specific port on my ec2 instance

I need to telnet to my ec2 instance on port 2222. I have included it in the security groups with source as Anywhere and Custom TCP Rule. It is a 64 bit Linux Machine. I am able to connect via port 22 but when I try with 2222, it shows telnet: Unable to connect to remote host: Connection refused. Also I need to skip the login/password prompt if connected successfully.
Try changing the port the Telnet server is listening on in it's configuration file.

Changing the default ports on WSO2 API manager

Hi there I hope you can help.
We are currently investigating the use of WSO2 API Manager and we have spun up the AMI image on a EC2 instance. The product works fine for carbon and store on the default port on 9443, however our security guys would rather us try and move it on to more standard ports that they have already have configured.
I have found a previous article WSO2 Api Manager - Deploy in EC2 and change default ports and followed the instructions but it fails.
I have tried modifying the API MANAGER HOME/am160/wso2am-1.6.0/repository/conf/tomcat/catalina-server.xml and changed the port from 9443 to either 8443 or 443 (this would be perfect if it is possible).
If I set the port to 8443, restart the instance and issue a netstat -a I do see the port 8443 listening but I am unable to connect. If I set the port to 443 then I see nothing listening.
If I set the port back to 9443 it still fails. I have to replace the catalina-server.xml with a copy of the untouched version. I have checked permissions and they look fine to me, but to be fair I am not an Linux expert by any means.
I have checked the security group in EC2 and even set one that had all TCP ports open but still no luck.
Any help/advice or a starter for 10 would be much appreciated.
Regards and thanks
Carl.
OK, I have managed to figure this one out myself, so for anyone else faced with the same problem this is what i did.
Firstly I modified the WSO2 HOME/am160/wso2am-1.6.0/repository/conf/tomcat/catalina-server.xml file. In the section that contains port="9443" I modified this to port="8443" and also added the proxyport="443" to the line below.
I restarted WSO2 using sh ../../../bin/wso2server.sh --restart
I then added a port redirection using IPTABLES. The command I ran was sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 8443
Now I can access WSO2 API manager on either port 8443 or 443. I could have even left it on port 9443 if I wanted.
As this is a ami image hosted on EC2 make sure the security group for the instance allows https on port 443.
Hope this helps anyone else.
Carl.