Hi, everyone, and welcome back.
Now, in today's video, we are going to discuss about the workflow associated with the outbound endpoints.
And we'll also have a quick demo to understand this in a better way.
Now, at this stage we have already discussed that the outbound resolver endpoints allows the DNS queries
from your VPC to your on premise network or another VPC.
So at this stage it is assumed that the DNS server, the authoritative DNS server, is not residing
within the VPC.
It can be at the on premise level or maybe at a different VPC level.
So this is one important part.
Second important part is that there should be a connectivity between the VPC and the on premises data
center or any other location where the DNS server is present.
So before we go ahead and look into the workflow, let's go and have a quick demo.
Now for the demo, what we are going to have, we have an easy two instance in a VPC and we have a DNS
server which is again hosted in an easy to instance in a different account altogether.
And there is a VPC peering between both of these accounts and we'll look into how the traffic through
outbound endpoints is resolvable.
So this is the account one EC two instance that wants to resolve a specific query and the DNS server
is hosted in another account altogether.
So this is the account number two.
And in this account you see we have the custom DNS server and this custom DNS server has a specific
domain that should be resolvable from the account number one EC two instance now from the EC, two instance
in the account.
One if we do a lookup on a domain of FTP dot labs dot internal, again, this is not a public domain.
Now at this stage you see we are getting a response of 190 to 160 0.50.
And in fact this response is coming from our custom DNS server.
Now if you look into the result conf associated with this EC two in the result conf, our name server
is 1077 0.2 which is associated with the Route 53 resolver.
So even though the query is going to the Route 53 resolver, the query is in turn being forwarded to
our custom DNS server running in a different account altogether through the outbound endpoints.
Now let me also quickly show you how the outbound endpoints are configured.
So if I quickly open up the Route 53 service.
Within doubt.
53 if we'll open up the outbound endpoints.
You see, there is one outbound endpoint that is currently running.
And within here we also have a rule that is configured.
If you look into the outbound rule, what it states that any time a query is made to the domain of KP
Labs dot internal forward that query to this specific IP address.
This IP address is nothing but the IP of the custom DNS server, which is hosted in a second account.
So let's also verify.
So you have 38.1 75 and if you'll verify the IP of the custom DNS server, it is 38.1 75.
All right.
Now, again, depending upon the domains, you can go ahead and add the appropriate target address of
a different DNS server.
Now, again, note that the VPC peering is already in place, and this is the reason why the outbound
endpoint is able to connect to the private IP address of easy to in a different account altogether.
So before we conclude, let's also look into the outbound endpoint workflow.
The first one is that the EC2 instance needs to resolve the DNS query to the domain, and in this case
the domain is internal dot example.com.
For our demo, we had used the domain of dot internal.
So the alternative DNS server is in the on premise data center, and this DNS query is sent to VPC plus
to address in the VPC that connects to the Route 53 resolver.
Now, this specific description is associated with this specific diagram where the EC two instance wants
to resolve a domain that is hosted at the DNS server of the on premise data center on the left.
So the step one is that the easy to instance will send the query to the VPC plus two address, which
is associated with the resolver.
The second part is that the Route 53 resolver forwarding rule is configured to forward the queries to
internal example.com in the on premise data center.
This is something that we have already seen on how the rule gets created and within the rule you can
specify the target IP address of your DNS server.
Now the query is forwarded to the outbound endpoint.
The outbound endpoint in turn forwards the query to the on premise DNS resolver.
Through the overall connection.
It can be VPN, it can be direct connect, etc. The on premise DNS resolver will resolve the DNS query
and it will return the answer to the AC two instance in the same path in reverse.
So this is a very high level overview about the outbound endpoints and with this will conclude today's
video.