AWS Client VPN DNS Not Resolving: Why Names Fail While IPs Work, the VPC Resolver Setting, Split Tunnel, Private Hosted Zones, RDS Names and the Linux systemd-resolved Fix

Logeshwaran
—

AWS Client VPN connects, a private IP address answers a ping, and every name fails: the RDS endpoint, an internal hostname, a private hosted zone record. Nine times out of ten the cause is that your laptop is still asking its own DNS server, because the Client VPN endpoint has no DNS servers configured, so nothing told the laptop to ask the VPC's resolver instead. The fix is one setting on the endpoint: the VPC's resolver address, which is always the VPC's network address plus two (10.0.0.2 for 10.0.0.0/16), plus an authorization rule and a route that let clients reach it. The rest of the cases are the client side: Linux's systemd-resolved leaving your old DNS servers in front of the pushed ones, split-tunnel configurations that pushed no DNS server at all, and a different problem that wears the same words, the endpoint's own DNS name not resolving because the client ignores remote-random-hostname. This page takes them in order, with the exact commands to prove which one you have.

Ethan, a developer, set up AWS Client VPN so he can reach the phone repair shop's database from home. The tunnel comes up. ping 10.0.2.15 answers. psql -h shop-db.abc123.us-east-1.rds.amazonaws.com hangs, and nslookup on the same name returns an address that isn't in the VPC at all. Jake's question was whether the VPN was "half working." Ethan's answer, an hour later, was that the VPN was fine and nobody had told his laptop where the phone book was.

⚡ Quick Answer

• Names fail, IPs work: on the Client VPN endpoint, set DNS Server 1 to the VPC resolver, the VPC CIDR plus 2 (for example 10.0.0.2), then reconnect. Steps.

• Still failing after that: the client can't reach the resolver: add an authorization rule for the VPC CIDR and check the endpoint's security group. Checks.

• Linux ignores the pushed DNS: systemd-resolved keeps your old servers in front; add dhcp-option DOMAIN-ROUTE . to the first line of the .ovpn file and use the stub resolver. Fix.

• The VPN won't even connect, "DNS resolve error" on the endpoint name: prepend a random string to the hostname in the .ovpn file, or use the AWS provided client. Why.

Test from the VPN: nslookup shop-db.abc123.us-east-1.rds.amazonaws.com 10.0.0.2. If that works and the plain nslookup doesn't, the resolver is reachable and your laptop simply isn't using it.

🧭 NEW HERE? READ THESE FIRST

New to VPCs and DNS on AWS? These five pages make the rest of this one easy:

📌 Bookmark this; the resolver setting and the Linux fix are the parts you will come back for.

What is going on, in plain English

Two things happen when you connect to a Client VPN endpoint. Your laptop gets a route, so packets for the VPC travel through the tunnel, and, if the endpoint is configured for it, your laptop gets a DNS server, pushed to it by the endpoint, so that names are looked up inside the VPC. The first part is what makes ping 10.0.2.15 work. The second part is optional, and when the endpoint's DNS fields are empty, your laptop keeps using whatever DNS server it had before, your home router or your ISP.

That outside resolver can't answer for anything private. An RDS endpoint name resolves, from outside the VPC, to the database's public address if it has one and to nothing useful if it doesn't; an EC2 instance's private hostname, a Route 53 private hosted zone, and the private names of interface endpoints don't exist outside the VPC at all. So names fail or point the wrong way, while addresses work. The fix is to push the resolver that can answer: the Route 53 Resolver built into every VPC, which lives at the VPC's base address plus two. For a VPC of 10.0.0.0/16 that is 10.0.0.2; for 172.31.0.0/16 it's 172.31.0.2. (The resolver also answers at 169.254.169.253 from inside the VPC, but that link-local address is not reachable through the tunnel, so the plus-two address is the one to use.)

Jake: "So the VPN moves the packets but not the questions?"

Ethan: "Exactly that. The tunnel carried everything I sent to an address. The names were not sent to AWS at all; my laptop asked the router at home, and the router had no idea what a shop-db is."

Prove which problem you have in three commands

Run these while connected to the VPN, before changing anything. They separate "the resolver can't be reached" from "the resolver isn't being used" from "the name doesn't exist there either":

# 1. Can the VPC resolver be reached through the tunnel? (use your VPC's +2 address)
nslookup shop-db.abc123.us-east-1.rds.amazonaws.com 10.0.0.2

# 2. Which resolver is the laptop using by default?
nslookup shop-db.abc123.us-east-1.rds.amazonaws.com

# 3. Does the name exist for the VPC resolver at all?
nslookup internal-app.shop.local 10.0.0.2
ResultMeaningGo to
1 answers with a private address, 2 answers with a public one or failsThe resolver works; your laptop isn't using itSet the endpoint's DNS servers, then the Linux or Windows section if it still ignores them
1 times outThe client can't reach the resolver through the tunnelAuthorization rule, route, security group
1 says the name doesn't exist (NXDOMAIN)The resolver is reachable but doesn't know the name: a private hosted zone not associated with this VPC, or a name from a peered VPC or on premisesPrivate zones, peered VPCs, on-prem
The VPN does not connect at all; the client logs "DNS resolve error" on cvpn-endpoint-...A different problem: the endpoint's own public nameThe random-string fix

On Windows, nslookup name 10.0.0.2 works the same; on macOS, dig @10.0.0.2 name is the equivalent and shows the answering server. The timeout in case 1 takes a while to appear; give it fifteen seconds before you decide.

The fix: set the endpoint's DNS servers to the VPC resolver

This is an endpoint setting, not a client one, and it takes effect on the next connection. In the console: VPC → Client VPN endpoints → select the endpoint → Actions → Modify Client VPN endpoint, then under DNS Server 1 IP address enter the VPC resolver's plus-two address, optionally a second server, and save. From the CLI:

# find the VPC CIDR of the endpoint's associated subnet, then add 2 to its network address
aws ec2 describe-client-vpn-endpoints --client-vpn-endpoint-ids cvpn-endpoint-0102bc4c2eEXAMPLE \
  --query 'ClientVpnEndpoints[0].{Dns:DnsServers,Vpc:VpcId,SplitTunnel:SplitTunnel,ClientCidr:ClientCidrBlock}'
aws ec2 describe-vpcs --vpc-ids vpc-0123456789abcdef0 --query 'Vpcs[0].CidrBlock'      # e.g. 10.0.0.0/16

aws ec2 modify-client-vpn-endpoint --client-vpn-endpoint-id cvpn-endpoint-0102bc4c2eEXAMPLE \
  --dns-servers Enabled=true,CustomDnsServers=10.0.0.2

Then disconnect and reconnect every client; the DNS server is pushed at connection time, not live. If you run your own DNS server inside the VPC or on premises, its address goes here instead, and it has to be reachable from the VPC's associated subnets. If you're unsure, the plus-two resolver is the right answer; it also forwards to private hosted zones and to any Route 53 Resolver rules you've set up.

Two mistakes with this field. Putting a public resolver such as 8.8.8.8 in it makes names resolve again, publicly, which looks like a fix and leaves every private name broken. And putting the plus-two address of the client CIDR (the range the endpoint hands to laptops, say 192.168.0.2 for 192.168.0.0/22) points at nothing; the resolver lives in the VPC's range, not the client range.

Still failing: the client can't reach the resolver

A DNS server pushed to the client is only useful if packets to it can cross the tunnel. Three things gate that, in the order they fail:

  1. An authorization rule. Client VPN allows nothing by default; every destination needs a rule. The resolver is inside the VPC CIDR, so a rule for the VPC's CIDR covers it: Authorization rules → Add authorization rule, destination 10.0.0.0/16, allow access to all users or to the right group. Without it, nslookup name 10.0.0.2 times out while the tunnel itself looks healthy.
  2. A route. Associating a subnet adds a route for that subnet's VPC CIDR to the endpoint's route table automatically, so this is usually present; a resolver in a peered VPC or on premises needs its own route, targeting an associated subnet.
  3. The endpoint's security group. Traffic from clients enters the VPC through the associated subnet with the security groups you attached to the endpoint. Outbound rules on those groups must allow UDP and TCP port 53 (the default "allow all outbound" does). Network ACLs can't block the VPC resolver, so they're not a suspect here.
aws ec2 authorize-client-vpn-ingress --client-vpn-endpoint-id cvpn-endpoint-0102bc4c2eEXAMPLE \
  --target-network-cidr 10.0.0.0/16 --authorize-all-groups
aws ec2 describe-client-vpn-routes --client-vpn-endpoint-id cvpn-endpoint-0102bc4c2eEXAMPLE \
  --query 'Routes[].{Dest:DestinationCidr,Target:TargetSubnet,Status:Status.Code}'

If you have several associated subnets, every route and every authorization rule must exist for each of them: clients land on any associated subnet, by DNS round robin, and a route that targets only one subnet gives intermittent failures that look exactly like flaky DNS. That's the official explanation for "it works when I reconnect".

Linux: systemd-resolved keeps your old DNS in front

On Ubuntu, Debian, Kali and most modern Linux desktops, systemd-resolved manages DNS, and it does something reasonable that breaks this case: when the VPN pushes a DNS server, it adds that server for the VPN interface but keeps your existing servers at higher priority. Queries keep going to the old server, so private names fail even though the endpoint is now configured correctly. The documented fix is two lines:

# 1. first line of the .ovpn file: send every DNS query through the tunnel's server
dhcp-option DOMAIN-ROUTE .

# 2. let systemd-resolved's stub resolver own /etc/resolv.conf
sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

If you'd rather bypass systemd-resolved's caching and per-interface logic entirely, symlink /run/systemd/resolve/resolv.conf instead; that is also the way to let a private record override a public one (a www.example.com that resolves to a private address inside the VPC and a public one outside). Check what's in effect with resolvectl status: the tunnel interface should list the VPC resolver as its DNS server, and with the DOMAIN-ROUTE line it becomes the default route for all lookups.

Using plain OpenVPN from the command line rather than the AWS provided client? Then nothing applies the pushed server unless you tell it to: install resolvconf and add the up/down hooks to the config:

sudo apt install resolvconf
# in the .ovpn:
script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

And confirm the endpoint actually pushed a server: the OpenVPN log contains the line PUSH_REPLY,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 10.0.0.2,... on a correctly configured endpoint. If dhcp-option DNS is missing from that line, the endpoint has no DNS servers set and the previous section is your fix. The AWS provided client writes its DNS setup logs to /var/log/awsvpnclient/configure-dns-up.log (version 6 and later; /var/log/aws-vpn-client/ before that), which is where a failing DNS script shows up.

Jake: "Your laptop was told the right server and still asked the wrong one?"

Ethan: "It was told, and it added the new server to the end of the list. One line in the config moves it to the front."

Windows and macOS

The AWS provided client on Windows sets the pushed DNS server on its own TAP adapter (AWS VPN Client TAP-Windows Adapter), and Windows uses it for all lookups while connected in full-tunnel mode. ipconfig /all shows the adapter and its DNS servers; if the adapter lists none, the endpoint pushed none. In split-tunnel mode Windows may prefer the adapter with the default route for DNS, which is your home network; the cleanest fix is still to set the endpoint's DNS servers, and if private names then resolve only intermittently, add the VPC's domain to the VPN adapter's DNS suffix search list or make the lookup explicit with the resolver address. The classic ipconfig /flushdns clears a cached wrong answer after you fix the endpoint; caches are why a fixed setup can look broken for a few more minutes.

On macOS the AWS provided client and Tunnelblick both apply the pushed server; scutil --dns lists the resolvers in order and the interface each applies to. A pushed server that appears only under the tunnel's scoped resolver, with no search domain, is used only for names in that domain; that is where a private hosted zone name fails while the RDS name works. Setting a second DNS server on the endpoint or adding the zone's domain to the client's search domains fixes it.

Split tunnel and DNS

With split tunnel enabled, the endpoint pushes only the routes in its route table instead of 0.0.0.0/0, so your normal internet traffic stays local. DNS servers are pushed exactly the same way; nothing about split tunnel changes that. What changes is what your operating system does with two DNS servers and two networks, which is the Linux and Windows behavior above. If you want private names to go to the VPC and everything else to stay with your home resolver, the systemd-resolved route (DOMAIN-ROUTE for the VPC's domains rather than for .) gives you that on Linux; on Windows and macOS it's a search-domain setting. Also keep in mind the official warning that adding a 0.0.0.0/0 route to a split-tunnel endpoint can break connectivity, and that any change to the route table resets every connection.

Private hosted zones, peered VPCs and on-premises names

The VPC resolver answers for three kinds of names: the VPC's own AWS-provided hostnames, every Route 53 private hosted zone associated with that VPC, and whatever forwarding rules point elsewhere. The word "associated" does the work. A private zone attached to a different VPC, even a peered one, is invisible to the VPN's VPC resolver, and the symptom is NXDOMAIN on a name you can see in the Route 53 console. The fix is to associate the hosted zone with the Client VPN's VPC too; a zone can be associated with many VPCs.

aws route53 associate-vpc-with-hosted-zone --hosted-zone-id Z0123456789EXAMPLE \
  --vpc VPCRegion=us-east-1,VPCId=vpc-0123456789abcdef0

For names that live in a peered VPC's own resolver, or in an on-premises DNS server, the pattern is forwarding: a Route 53 Resolver outbound endpoint plus a rule that forwards the domain to those servers, and the VPC resolver follows it. For the reverse direction, on-premises resolvers reaching AWS, an inbound endpoint gives them addresses in the VPC to forward to. If you'd rather not build endpoints, you can set the Client VPN's DNS servers to an on-premises or peered resolver's address directly, as long as a route and an authorization rule let clients reach it; the trade-off is that the VPC's own private names then depend on that server knowing how to forward back.

Name you're resolvingWho can answer itWhat to do over Client VPN
RDS, ElastiCache, interface endpoint private namesThe VPC resolver of the VPC they live inPush the VPC resolver (CIDR +2) from the endpoint
A Route 53 private hosted zone recordThe resolver of any VPC the zone is associated withAssociate the zone with the Client VPN's VPC
A name in a peered VPC's private zoneThat VPC's resolver, or any VPC the zone is associated withAssociate the zone with the VPN's VPC, or forward the domain with a Resolver rule
An on-premises name (corp.example.com)Your on-premises DNSResolver outbound endpoint + forwarding rule, or set that DNS server on the endpoint with a route and an authorization rule
A public name (amazon.com)Any resolverNothing; the VPC resolver forwards it for you

RDS deserves its own sentence because it's the name people hit first: an RDS endpoint resolves to the instance's private address when the query comes from inside the VPC, and to its public address (or nothing, if it isn't publicly accessible) when it comes from anywhere else. Through the VPN with the plus-two resolver set, the private address comes back and the security group, which must allow the client CIDR on the database port, is the next thing to check.

A different problem: the endpoint's own name won't resolve

This one stops the VPN from connecting at all, and the log line is unmistakable: Transport Error: DNS resolve error on 'cvpn-endpoint-xyz123.prod.clientvpn.us-east-1.amazonaws.com' for UDP session: No such host, or on OpenVPN, RESOLVE: Cannot resolve host address: cvpn-endpoint-...:443 (Name or service not known). The configuration file you export contains a remote-random-hostname parameter that tells the client to prepend a random string to the endpoint's name on every connection, to defeat DNS caching. The AWS provided client honors it. Some third-party clients ignore it and then try to resolve the bare name, which fails.

The fix is to do the prepending yourself: open the .ovpn file, find the remote line with the endpoint's DNS name, and put a random label in front of it:

# before
remote cvpn-endpoint-0102bc4c2eEXAMPLE.clientvpn.us-west-2.amazonaws.com 443
# after
remote asdfa.cvpn-endpoint-0102bc4c2eEXAMPLE.clientvpn.us-west-2.amazonaws.com 443

Any label works. This has nothing to do with the VPC resolver; it happens before the tunnel exists, using your laptop's own DNS, which is also why a laptop with broken DNS in general can't connect.

The worked example: Ethan's database that answered to a number

The endpoint had been created with the DNS fields empty. Command 1 (nslookup shop-db... 10.0.0.2) returned the private address at once, so the resolver was reachable and the authorization rule for the VPC CIDR was already in place. Command 2 returned the public address, the one his home router found. He set DNS Server 1 to 10.0.0.2, reconnected, and on his Windows PC the database connected. On his Kali laptop it still failed: resolvectl status showed the VPC resolver listed under tun0 and the home router listed first for the wireless interface. The dhcp-option DOMAIN-ROUTE . line and the stub-resolver symlink fixed that. Total changes: one endpoint field, one config line, one symlink.

Jake: "So the number worked all along, and the name needed three small things."

Ethan: "And the three were in three different places: AWS, the config file, and the laptop. That's why it took an hour and not a minute."

The checklist, in order

  1. Connected? nslookup NAME VPC_PLUS_TWO. Works: skip to 3. Times out: 2. NXDOMAIN: 5.
  2. Add an authorization rule for the VPC CIDR; confirm a route to it exists for every associated subnet; check the endpoint security group's outbound rules.
  3. Set DNS Server 1 on the endpoint to the VPC resolver (CIDR base plus 2); reconnect.
  4. Linux: dhcp-option DOMAIN-ROUTE . on the first line of the config and the stub-resolver symlink; plain OpenVPN: resolvconf hooks. Windows: ipconfig /all and /flushdns. macOS: scutil --dns.
  5. Private zone names: associate the hosted zone with the VPN's VPC; peered or on-prem names: Resolver rules or a reachable DNS server in the endpoint's DNS fields.
  6. VPN won't connect at all with a DNS error on the endpoint name: random string in front of the hostname in the .ovpn file.

Frequently asked questions about AWS Client VPN DNS

Why does AWS Client VPN connect but not resolve DNS names?

The endpoint has no DNS servers configured, so your computer keeps using its own resolver, which cannot answer for private names. Set DNS Server 1 on the endpoint to the VPC resolver, the VPC CIDR base address plus 2, and reconnect.

What DNS server should I set on a Client VPN endpoint?

The VPC's Route 53 Resolver at the VPC CIDR plus 2, such as 10.0.0.2 for 10.0.0.0/16. Use your own DNS server's address instead only if it is reachable from the associated subnets.

Why can I ping an IP through Client VPN but not a hostname?

Routes and authorization rules carry packets to addresses; names need a resolver that knows the VPC. Until the endpoint pushes the VPC resolver, lookups go to your home or office DNS.

Does Client VPN split tunnel break DNS?

No. DNS servers are pushed the same way in split-tunnel mode. What differs is how your operating system orders two DNS servers; on Linux use dhcp-option DOMAIN-ROUTE, on Windows and macOS check the adapter's DNS and search domains.

How do I fix Client VPN DNS on Ubuntu, Debian or Kali?

systemd-resolved keeps the old servers in front of the pushed one. Add dhcp-option DOMAIN-ROUTE . as the first line of the .ovpn file and symlink /etc/resolv.conf to /run/systemd/resolve/stub-resolv.conf.

Why does my RDS endpoint resolve to a public IP over Client VPN?

The lookup went to a resolver outside the VPC. With the VPC resolver set on the endpoint, the RDS name resolves to the private address; the database security group must then allow the client CIDR.

Why does a Route 53 private hosted zone not resolve over Client VPN?

The zone is not associated with the VPC the endpoint is attached to. Associate the hosted zone with that VPC; a zone can be associated with several VPCs.

How do I resolve names in a peered VPC or on premises over Client VPN?

Use Route 53 Resolver forwarding rules with an outbound endpoint so the VPC resolver forwards those domains, or point the endpoint's DNS servers at a resolver that clients can reach through a route and an authorization rule.

Why does nslookup to the VPC resolver time out over the VPN?

Clients cannot reach the resolver: a missing authorization rule for the VPC CIDR, a missing route for one of the associated subnets, or an endpoint security group that blocks outbound port 53.

What does "DNS resolve error on cvpn-endpoint" mean?

The client could not resolve the endpoint's own hostname because it ignores the remote-random-hostname parameter. Prepend a random string to the hostname on the remote line of the .ovpn file, or use the AWS provided client.

Why does Client VPN DNS work on one reconnect and fail on the next?

Clients land on any associated subnet by round robin. If a route or authorization rule exists for only one subnet, connections through the others fail. Add the same routes for every associated subnet.

Can I use 8.8.8.8 as the Client VPN DNS server?

You can, but public names are the only ones it resolves; every private name stays broken. Use the VPC resolver, and let it forward public queries itself.

Where are the AWS VPN Client DNS logs on Linux?

Version 6 and later: /var/log/awsvpnclient/, including configure-dns-up.log and configure-dns-down.log; earlier versions used /var/log/aws-vpn-client/.

How do I check which DNS server the VPN pushed?

In the OpenVPN log, the PUSH_REPLY line lists dhcp-option DNS with the server address. On Linux resolvectl status shows it per interface; on Windows ipconfig /all; on macOS scutil --dns.

Does changing the DNS servers on the endpoint disconnect clients?

Clients keep their current session; the new DNS servers apply on the next connection, so reconnect to pick them up. Route table changes on a split-tunnel endpoint reset all connections.

Can Client VPN use the 169.254.169.253 resolver address?

Not through the tunnel. That link-local address works only from inside the VPC; use the VPC CIDR plus 2 for Client VPN clients.

For readers preparing for an AWS certification

We have been covering AWS certifications alongside our fixes, so here is a short extra for readers studying for one. If you only came for the fix, you already have it; feel free to skip this part.

Exams that test this topic: Solutions Architect – Associate (SAA-C03) • Security – Specialty (SCS-C03) • Solutions Architect – Professional (SAP-C03 from November 17, 2026).

Here are the exam-style questions this topic tends to raise, with the reasoning you need to answer them:

1. Remote employees need secure access to VPC resources from their laptops. What do you use?

AWS Client VPN.

2. An office network must connect to a VPC over the internet with IPsec. What do you use?

AWS Site-to-Site VPN.

3. Servers on premises must resolve names in a Route 53 private hosted zone. What do you add?

A Route 53 Resolver inbound endpoint, with the on-premises DNS forwarding to it.

4. Resources in the VPC must resolve on-premises names. What do you add?

A Route 53 Resolver outbound endpoint with forwarding rules.

5. Only VPC traffic should go through the VPN, and the rest straight to the internet. Which setting?

Split tunnel on the Client VPN endpoint.

6. You need a private connection with consistent bandwidth, not over the internet. What do you use?

AWS Direct Connect.

Exam codes and dates change often. Our AWS certification changes page keeps track of what is current.

Ethan's endpoint now pushes 10.0.0.2, his Kali laptop puts the tunnel's resolver first, and the database answers to its name from the sofa. Jake's verdict: "So the VPN was a road and nobody had put up the signs." Ethan said that was the best description of DNS he'd heard all year.

📌 If you keep one line from this page

Set the Client VPN endpoint's DNS server to the VPC resolver (the VPC CIDR plus 2), make sure an authorization rule and a route let clients reach it, and on Linux put dhcp-option DOMAIN-ROUTE . at the top of the config so the pushed server goes first.

nslookup NAME 10.0.0.2 proves reachability · private zones must be associated with the VPN's VPC · "DNS resolve error on cvpn-endpoint" = random string before the hostname.

Revision note. Written October 15, 2026, with the AWS provided client version 6 log paths and the systemd-resolved behavior as currently documented. "Ask the right person," says the proverb; for a private name, the right person lives at the VPC's plus-two address.

Related