We have a domain, gitserver.ourdomain.com, whose DNS points to our WAN IP address. Our Juniper is then configured with NAT to send requests to our reverse proxy (Nginx). Everything works great externally. However, internally, we cannot access gitserver.ourdomain.com because of the way the NAT is set up. I'm fairly new to the Juniper world, so instead of configuring a new NAT entry, I thought I'd just use the static-host-mapping method to point gitserver.ourdomain.com to the IP address:
Thank you for the response. I'll look into DNS doctoring. The goal was to simplify management as much as possible, so I don't really want to use the local hosts file and have to keep it synced on all PCs. We are currently using DNS Forward Lookup zones, but I was hoping to manage all of this in one or two places (Nginx, Juniper).
I saw that you deleted your previous post. You were missing the interface on the dns-proxy configuration where the SRX should listen for DNS requests. Example which is copied directly from a working installation.
This example forwards all requests for somedomain.local to 10.20.30.10 and everything else to 18.104.22.168 or 22.214.171.124.
Also remember to allow dns under host-inbound-services in your zone definition.