OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 18.7 Legacy Series »
  • Unbound DNS Help?
« previous next »
  • Print
Pages: [1]

Author Topic: Unbound DNS Help?  (Read 1932 times)

cclloyd

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
    • View Profile
Unbound DNS Help?
« on: September 06, 2018, 12:51:28 pm »
First of all, does anyone know of a good unbound DNS tutorial that will work well with OPNSense?

My goal: to get vpn.example.com to resolve to lan address when querying from home network, and to public IP when querying externally.

I use Unbound DNS as it was the default.

I'm sort of new to OPNSense and don't understand how exactly to set it up.

The host has a hostname `vpn.example.com` and an IP 10.0.0.11.

How can I be able to access it by 10.0.0.1 when querying vpn.example.com on my home network, and have it show `xx.xx.xxx.xxx` when querying from another network, yet still resolve to the proper host?
Logged

marjohn56

  • Hero Member
  • *****
  • Posts: 1676
  • Karma: 168
    • View Profile
Re: Unbound DNS Help?
« Reply #1 on: September 06, 2018, 02:59:50 pm »
Just use a host override in Unbound. Just go to Services->Unbound DNS->Overrides.


Enter the Hostname, Domain and IP address. Save it.


Remember to flush the dns cache on your PC, windows it's ipconfig /flushdns




For external you'll need to add it as an A or AAAA record at your domain host.
Logged
OPNsense 21.7 - Qotom Q355G4 - ISP - Community Fibre 1Gbps.

Team Rebellion Member - If we've helped you remember to applaud

cclloyd

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
    • View Profile
Re: Unbound DNS Help?
« Reply #2 on: September 07, 2018, 12:52:24 am »
I do have that.  Under host overrides I have:

Host: vpn (hostname on VM is just vpn)
Domain: vpn.example.com
Type: A
Value: 10.0.0.11

I can ping it from inside my network only, and it shows my external IP, but I can't connect to it at all externally, and can't ssh internally using the hostname.


EDIT:  Fixed it. 

The issue was the domain should just be `example.com` instead of `vpn.example.com`. 
« Last Edit: September 07, 2018, 04:50:43 am by cclloyd »
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 18.7 Legacy Series »
  • Unbound DNS Help?
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2