Skip to content

vpn ip is blocked from access my ec2 server

0

Hi, I have an ec2 server1 in us-west1 running. I can access the port 2101 from my local computer fine. However, when I connected to a VPN, I could not access the server1. I tried telnet server1 2101 it stuck at connecting to server1 ... could not open connection to the host, connect failed.

However, I can access the second ec2 server2 in EU zone fine. Only this vpn ip to the server1 is blocked.

Any ideas?

Thanks. David

asked a year ago273 views

2 Answers
0

Based on the information you've provided, it seems that there might be a specific issue with the security configuration for your EC2 instance in us-west-1 (server1) that's preventing access from your VPN IP. Here are some potential reasons and solutions to consider:

  1. Security Group Configuration: The security group associated with server1 may not be allowing inbound traffic on port 2101 from your VPN's IP range. Double-check the inbound rules of the security group and ensure that it allows traffic from your VPN's IP address or CIDR range on the required port.

  2. Network ACLs: If you're using custom Network ACLs in your VPC, verify that they're not blocking incoming traffic from your VPN's IP range to port 2101.

  3. VPC Route Tables: Ensure that the route tables in your VPC are correctly configured to route traffic from your VPN to the subnet where server1 is located.

  4. Firewall on the EC2 Instance: If you have a firewall configured on the EC2 instance itself (e.g., iptables), make sure it's not blocking incoming connections from your VPN IP.

  5. VPN Configuration: Verify that your VPN is correctly configured to route traffic to the us-west-1 region. Since you can access server2 in the EU zone, it's possible that there's a specific routing issue for the us-west-1 region.

  6. Region-Specific VPN Restrictions: Some organizations implement region-specific access controls. Check if there are any policies in place that might be restricting VPN access to specific AWS regions.

To troubleshoot:

  1. Review and update the security group rules for server1 to explicitly allow traffic from your VPN IP range.
  2. Check the Network ACLs and route tables in your VPC.
  3. Temporarily disable any host-based firewall on server1 to test if it's the cause.
  4. Try connecting to other ports or services on server1 from your VPN to see if the issue is specific to port 2101.
  5. Compare the network configurations between server1 and server2 to identify any differences that might explain the discrepancy in access.

If these steps don't resolve the issue, you may need to engage with your network team or AWS support for more in-depth troubleshooting, as there could be complex networking or VPN configuration issues at play.
Sources
Suddenly I can't connect to my ec2 server | AWS re:Post
Remote Desktop Connection failure | AWS re:Post

answered a year ago

EXPERT

reviewed a year ago

0

Hello, I suggest you check first for any blocked traffic in AWS from another public IP (your VPN). Check the NACLs and security groups. If it’s still not working, it’s probably not related to AWS but rather to your VPN configuration.

Are you trying to connect to your EC2 instance using a public or private IP? It could be a split tunneling issue for a specific CIDR.

answered a year ago

EXPERT

reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.