0

Question:

I have configured a Jenkins server within a private subnet of my AWS VPC, accessible through a Pritunl VPN jump server. To enable internet access for the Jenkins server, I have set up a NAT Gateway. Currently, I can access the Jenkins server by connecting to the VPN and using its private IP address along with port 8080 (e.g., http://<privateIp>:8080).

However, I would like to access the Jenkins server using a custom domain name instead of the IP address and port. To achieve this, I have created a private hosted zone in Route 53 and I'm trying to map the domain name to the Jenkins server. I'm encountering some difficulties, and I'm looking for guidance on the steps and configurations required to make this work.

Here are the steps I've taken so far:

  1. Set up a Jenkins server in a private subnet.

  2. Configured a Pritunl VPN jump server to access the private resources.

  3. Created a NAT Gateway to allow internet access for the Jenkins server.

  4. Created a private hosted zone in Route 53 and added The A record for the my jenkins.mydomain.com and it is pointing to the private IP when I did the nslookup jenkins.mydomain.com for confirmation.

I'm now unsure about the specific configurations needed to associate the custom domain with the Jenkins server's URL. What are the expectations for achieving this? Are there additional configurations required within Jenkins, Route 53, or my VPC to make this work seamlessly?

I'm seeking a solution that allows me to access the Jenkins server using a domain name like http://jenkins.mydomain.com while connected to the Pritunl VPN server. I believe this involves configuring the DNS settings within the Route 53 private hosted zone. However, I'm uncertain about the specific steps required to achieve this setup while keeping the Jenkins server private and not exposing it to the public internet.

I'm hopeful that someone with experience in networking, VPN setups, and Amazon Route 53 could provide me with clear steps or guidance on how to properly configure the DNS settings in Route 53. Additionally, any insights into potential adjustments needed on the Jenkins server itself or within the Pritunl VPN configuration would be greatly appreciated.

Thank you in advance for any assistance or advice you can provide!

  • Where did you make the `nslookup` from? – Andres Bores Aug 27 '23 at 03:04
  • Hello @AndresBores hope you are well and good. Thanks for noticing the problem. I did the nslookup in the jumpserver. There I am getting the proper response. and For proxy redirection I also setted the nginx webserver in the private app server ,where I have configured the redirection to my jenkins webpage. when i did **curl jenkins.mydomain.com** in both of the servers I was able to get the response but I am unable to access in the browser. Thanks – ashutosh Mohanty Aug 27 '23 at 05:21
  • You don't need to associate the custom domain to your Jenkins server. When you create a private hosted zone in Route53 you attach it to a VPC. From inside that VPC you can resolve the records that live in that private hosted zone. That's why you were able to resolve your Jenkins name from the Jump server. Now, if you are connecting from your local machine to the Jump server through a browser, bear in mind that the DNS resolve process takes place in your local machine, which doesn't have access to the private hosted zone and therefore is unable to resolve you Jenkins name. Continues... – Andres Bores Aug 27 '23 at 12:59
  • So, you don't need to configure anything else on Route53 but in your VPN client/server. I don't know about Pritunl VPN. You should look for a solution there in case you don't receive any response here. – Andres Bores Aug 27 '23 at 13:13

0 Answers0