Public IP is not reacheble from internet

0

Hi AWS! Could you pls help me. My EC2 instance is running, i can connect via ssh(port 22), everything is cool with this. But this instance is not reachable via the public ip from internet. "This site can’t be reached44.204.34.19 refused to connect.". My secure inbound rules allows to connect via 22 and 443 ports from anywhere. I configured nginx, ufw

(venv) ubuntu@ip-172-31-95-196:~/social_network/social_network$ sudo ufw status Status: active

To Action From


Nginx Full ALLOW Anywhere OpenSSH ALLOW Anywhere Nginx Full (v6) ALLOW Anywhere (v6) OpenSSH (v6) ALLOW Anywhere (v6)

ubuntu@ip-172-31-95-196:~$ sudo systemctl status nginx ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2023-06-27 05:56:35 UTC; 4min 52s ago Docs: man:nginx(8) Process: 6968 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Process: 6969 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Main PID: 7058 (nginx) Tasks: 2 (limit: 1141) Memory: 7.2M CPU: 25ms CGroup: /system.slice/nginx.service ├─7058 "nginx: master process /usr/sbin/nginx -g daemon on; master_process on;" └─7061 "nginx: worker process" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ">

What could be the problem of this? Thanks a lot! BR Andrey

Andrey
質問済み 1年前263ビュー
3回答
0
承認された回答

My secure inbound rules allows to connect via 22 and 443 ports from anywhere

Your IP 44.204.34.19 can be reached on port 80 (HTTP) and port 22 (SSH), but not 443 (HTTPS). Could you double-check your AWS Security Group rules and your Ubuntu ufw rules, and confirm that 443 is the same as 22 and 80 ?

profile picture
エキスパート
Steve_M
回答済み 1年前
profile picture
エキスパート
レビュー済み 1年前
0

Hi, your problem doesn't seem to be on AWS but rather on other end

Accessing your http://44.204.34.19/ over my browser gives this:

Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.
profile pictureAWS
エキスパート
回答済み 1年前
profile pictureAWS
エキスパート
レビュー済み 1年前
  • Thanks a lot! mb smth with my internet providers.

0

Hi there,

Here are a few troubleshooting steps you can take to resolve the issue:

Verify Security Group rules: Ensure that your EC2 instance's Security Group allows incoming traffic on port 80 (HTTP) or port 443 (HTTPS), depending on your Nginx configuration. Check both the inbound rules of the Security Group associated with your instance, as well as any network ACLs.

Check Nginx configuration: Double-check your Nginx configuration files to ensure they are correctly set up. Verify that the server block in your Nginx configuration allows traffic on the desired ports (usually 80 or 443). You can also check the Nginx error logs for any potential issues.

Check firewall settings: Since you mentioned using UFW (Uncomplicated Firewall), verify that the firewall rules are correctly configured. Ensure that UFW allows incoming connections on ports 80 and 443. You can check the UFW status using the command sudo ufw status verbose.

Verify Nginx service status: Confirm that the Nginx service is running and active. You can use the command sudo systemctl status nginx to check the status of the Nginx service. Look for any error messages or indications of issues. Verify public IP: Double-check that the public IP address associated with your EC2 instance is correct. You can find the instance's public IP address in the AWS Management Console or by using the AWS CLI.

Hope this help!

profile picture
Henry
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ