Public subnet not reacheable with my aws client vpn endpoint

0

Hello,

I'm encountering an issue with my VPN connection; I can access my EC2 instances within the private subnet via the VPN, but I'm unable to connect to instances in the public subnet.

I've tried adding authorization rules to permit access to the public subnet's destination CIDR. Additionally, I've configured the route table to redirect my VPN client CIDR to 'local'.

I believe it's a DNS issue, but I'm uncertain about how to fix it.

Thanks for help

已提问 1 年前473 查看次数
3 回答
0

Am I correct in understanding that you cannot access the private IP address of EC2 in the public subnet? Or does it mean that the public domain of EC2 is not accessible?

profile picture
专家
已回答 1 年前
  • So, my public domain of EC2 isn't accessible when I'm using client vpn endpoint

  • understood. Try adding a route to the NAT Gateway to the route table of the private subnet that the ClientVPN endpoint is associated with.

    By setting the route table of the private subnet to which the ClientVPN endpoint is linked as shown below, you will be able to access the public domain from NAT Gateway. https://repost.aws/knowledge-center/client-vpn-static-ip-address

    desttarget
    0.0.0.0/0NAT Gateway
    VPC CIDRlocal

    Alternatively, I think it is possible to perform DNS name resolution by setting up a split tunnel. By setting up a split tunnel, you can access the public domain without going through Client VPN. In this case, make sure to only configure the VPC CIDR in the AWS Client VPN route table. However, when using split tunnels, please note that setting "0.0.0.0/0" in the AWS Client VPN route table is not recommended. https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html

  • Yes my private subnet has already NAT gateway (inside public subnet + elastic IP)

    With my VPN I can reach internet google.com etc.. but not my ec2 instance in public subnet.

    This is very strange...

  • Or, can I connect if I link the AWS Client VPN endpoint to a public subnet and configure it to go directly to the Internet from the Internet gateway? https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/scenario-internet.html

  • Currently my endpoint vpn are associated to private subnet..

    Something strange, when I ping my domain (blabla.com) I don't have my dns A, i have something else, even for preprod.blabla.com I have host not found ...

    Looks like DNS isn't resolving when I am using VPN

0

Any idea ? I'm still stuck on this topic ..

已回答 1 年前
0

I need Expert AWS I think, 2 days i am on it and still nothing

已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则