pfsense DNS Host Overrides

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024
  • Connecting With Us
    ---------------------------------------------------
    + Hire Us For A Project: lawrencesystem...
    + Tom Twitter 🐦 / tomlawrencetech
    + Our Web Site www.lawrencesy...
    + Our Forums forums.lawrenc...
    + Instagram / lawrencesystems
    + Facebook / lawrencesystems
    + GitHub github.com/law...
    + Discord / discord
    Lawrence Systems Shirts and Swag
    ---------------------------------------------------
    ►👕 lawrence.video...
    AFFILIATES & REFERRAL LINKS
    ---------------------------------------------------
    Amazon Affiliate Store
    🛒 www.amazon.com...
    UniFi Affiliate Link
    🛒 store.ui.com?a_aid=LTS
    All Of Our Affiliates that help us out and can get you discounts!
    🛒 lawrencesystem...
    Gear we use on Kit
    🛒 kit.co/lawrenc...
    Use OfferCode LTSERVICES to get 5% off your order at
    🛒 lawrence.video...
    Digital Ocean Offer Code
    🛒 m.do.co/c/85de...
    HostiFi UniFi Cloud Hosting Service
    🛒 hostifi.net/?v...
    Protect you privacy with a VPN from Private Internet Access
    🛒 www.privateint...
    Patreon
    💰 / lawrencesystems
    #pfsense #Firewalls

Комментарии • 66

  • @LAWRENCESYSTEMS
    @LAWRENCESYSTEMS  3 года назад +3

    pfsense DNS Resolver Documentation
    docs.netgate.com/pfsense/en/latest/services/dns/resolver.html
    My latest pfsense tutorials can be found here:
    lawrence.technology/pfsense/

  • @aaronater1088
    @aaronater1088 3 года назад +13

    @Lawrence Systems , Working as an IT Engineer with a great company now and I just want to say thanks for your knowledge and videos teaching a lot of concepts. You have helped me a lot in my career. Been watching you for years. Thanks for what you do.

  • @Hossimo
    @Hossimo 3 года назад +1

    I had this exact problem a few weeks back, being new with pfsense and after a fair amount of Wiresharking and Googleing I found a post on the pfsense forums that explained it. Great you make all these videos!

  • @davidsackenheim5046
    @davidsackenheim5046 2 года назад

    Thank you for doing this video! No one else seems to want to explain how to do a host override and the documentation is way over my head. I see now it is super simple. Thanks again!

  • @vinayrathod
    @vinayrathod 3 месяца назад

    Don't usually comment, I am more of a 'like' and 'save to playlist' kinda guy... But this damn thing was irritating me for so long... and it turned out to be so SIMPLE! Thanks alot... btw, your channel (along with a few others) are the backbone of my homesever setup... soon would be launching my own MSP from it... so yeah... Thanks again!

  • @bluebeeryale
    @bluebeeryale 3 года назад +21

    Will you please put out a video with the right way to do NAT Reflection as I’ve never been able to make that work. Thanks!!!

    • @Clarence-Homelab
      @Clarence-Homelab 3 года назад

      Does DNS rebinding protection maybe also play a role?

    • @YeOldeTraveller
      @YeOldeTraveller 3 года назад

      @@Clarence-Homelab Shouldn't as the address returned is the public one. NAT reflection will grab the packet at the external interface and remap it as any other inbound packet. Return path is to the external interface as well to be remapped to the internal client.

  • @samo9288
    @samo9288 3 года назад +4

    Thanks for this, actually helped an issue I was having!

  • @KenPryor
    @KenPryor 4 месяца назад

    Thank you so much for this video!!! I've been struggling with setting up my internal DNS and you showed me how to fix it.

  • @cougarmain
    @cougarmain 3 года назад +3

    This is also known as split dns which we use mainly for email servers.

    • @LAWRENCESYSTEMS
      @LAWRENCESYSTEMS  3 года назад +2

      Yes, I had meant to say "Split DNS" in the video but it slipped my mind. Thanks

  • @stevedixon921
    @stevedixon921 3 года назад +1

    Another DNS/Firewall trick is to configure the firewall "DNS forward" or "DNS Redirection" (the term varies by platform) to use your internal DNS servers for your private domain. Example: forward myoffice.lan to your internal servers. Two benefits: your ISP (or upstream dns proxy) no longer gets requests for a non public domain name and you can still use your firewall as a DNS proxy (internet resolution works if your internal DNS is down), presuming your set your DHCP DNS settings to permit this.

  • @citypavement
    @citypavement 3 месяца назад

    0:08 I am convinced that most home lab users go through the same arch while setting up pfsense, wireguard or some other tunnel, externally exposing servers with your own domain and certificate, and then exposing them again internally to work again.

  • @BlitzFingers
    @BlitzFingers 8 месяцев назад

    It's an older post, but still works! Thank you Lawrence for creating this information.

  • @PhilipBonev
    @PhilipBonev 3 года назад +2

    I have more complex chain, but it does the same. My Active directory has forwarders to my Bind DNS server then they point to forwarders to pfSense SSL unbound, because bind does not support TLS. All computers point to active directory dns. Bind has two views for internal network(resolves internal queries) and external(resolves internet queries), they point to pfSense for internal queries for external addresses this works over TLS.

  • @pepeshopping
    @pepeshopping 3 года назад +8

    It is called:
    Split DNS!!
    Dah!!

    • @LAWRENCESYSTEMS
      @LAWRENCESYSTEMS  3 года назад +1

      Yes, I had meant to say "Split DNS" in the video but it slipped my mind. Thanks

  • @nickswebtsv
    @nickswebtsv 3 года назад +2

    That’s a great way to get the SSL via OpenSSL client in cmd line. I think I’ll have to use that more often.

  • @Charlie8913
    @Charlie8913 3 года назад +1

    Those DNS Host Overrides are very useful when having a reverse proxy or a web server with multiple sites when they should only be available inside the local network. Without it the web interfaces of most of my docker containers wouldn't be accessible.

    • @jdurbois56
      @jdurbois56 2 года назад

      Can you elaborate on how you got this working? Im using Nginx proxy manager to make some of my dockers accessible from the outside and I want to use it internally. When I make the host overide entry using my domain name and the IP of my docker it still comes back with a suspected DNS rebind attack.

  • @volodumurkalunyak4651
    @volodumurkalunyak4651 3 года назад +1

    How about just using dual-stack (ipv4 and ipv6) network? Internal and external connecrions to internal resources will automatically be correctly routed on ipv6 without any intervention into DNS. Furthermore DOT/DOH on clients within internal network won't break anything

  • @joepalovick1915
    @joepalovick1915 3 года назад

    Great video, thanks Tom! I've also found that you can set the DHCP Registration and Static DHCP options in the DNS Resolver configuration section so you if you create static DHCP mappings or if your server has a hostname during DHCP then those entries would automatically get entered as DNS overrides. It's amazing to me how powerful pfSense is and this is just another area. I would also like to see a video on NAT Reflection. I know you had set in a haproxy video but I can't seem to get it working correctly.

  • @pieter-yt
    @pieter-yt 3 года назад +2

    Thank you so much

  • @deafno
    @deafno 3 года назад +1

    I use host override DNS for VPN clients so that remote work clients can access haproxy frontends through VPN LAN IP and avoid exposing HTTP services to whole world. The requirement is though that the remote worker connects to VPN and their DNS is forced through the VPN (which you can do with OpenVPN).

  • @BradleeEdmondson
    @BradleeEdmondson 3 года назад +2

    What would you say best practice is for service CNAMEs? Things like syslog.example.com --> hostname1.example.com, zabbix.example.com --> hostname2.example.com, etc.
    Currently I have some local-data fields added to the advanced/custom field in Unbound config, but is there a simpler way to do this? PfSense is my dhcp and DNS server, as well as primary router.

    • @LAWRENCESYSTEMS
      @LAWRENCESYSTEMS  3 года назад

      I simply add host overrides as I show in the video.

    • @Monsieur2068
      @Monsieur2068 3 года назад

      Adding to unbound i think is still considered best practice.

    • @BradleeEdmondson
      @BradleeEdmondson 3 года назад

      @@LAWRENCESYSTEMS Thanks Tom! But if you do "all A records, all the time" (which it seems is what host overrides does), wouldn't you have to change each override individually in order to do an update? For example, logger-->host1ip, syslog-->host1ip, zabbix-->host2ip, monitor-->host2ip etc. would require hand-updates to each mapping, I believe, whereas CNAMEs let you just update the hostname IP once.
      A bit out there for pfSense at home, maybe, but trying to identify best practice here nonetheless.

  • @salaciouscreations4323
    @salaciouscreations4323 2 года назад

    Using pfsense direct to fibre I get issues with jetpack. Not able to loopback. I wondering if this could be to do with this.

  • @hayzeproductions7093
    @hayzeproductions7093 2 года назад

    do you have to open ports and point them to pfsense ip?
    following steps and not seeing anything over browser.

  • @muhammadaamir566
    @muhammadaamir566 Год назад

    I have configured OpenDNS Server on LAN with DHCP... I want to by pass an Alias from OpenDNS Server.... I wan to direct that Alias through GoogleDNS? How to do it sir

  • @mveldt
    @mveldt 3 года назад

    Is NAT Reflection mode for port forwards, not doing the same when setting it to pure NAT or NAT + proxy?

  • @FinderX
    @FinderX 3 года назад

    I overthink-ed too much and before this I make Hairpin NAT for the same results.
    Gonna test this method.

  • @gerardlunow567
    @gerardlunow567 2 года назад

    I have a two PFsense running, one at home and one at our remote small office. I have IP cameras on both locations. I port-forwarded them and they work. They will be on a VLAN soon. I can watch the cameras on my mobile (Android using IP CAM Viewer - doing this for years) However, when I am home I cannot see them over my own LAN. Is there a video that addresses that? Thank you.

  • @troller4jesus
    @troller4jesus 3 года назад

    Thanks for video. If I have a site that uses AD joined computers but there's no on-prem AD, and the AD server is in the cloud, is there a way to get the computers to talk to AD that way still over an IPSec tunnel? Would that require this DNS override?

  • @cluelessfish
    @cluelessfish 2 года назад

    Thanks this helped on an single IP tho but not across the board I don't know what ive done but ive done or enable something for my noip address to on the pfsense to stop it communcatting correctly port fwd rules use to work but now they dont and now dont resolve or just gives that error is there an way to revert as this is starting to anny me i dont want to have to be filling out lots of host overrides vpn works fine but this rebound thing is starting to get annoying where do you think you can point me towards a fix if possible

  • @leeblack2103
    @leeblack2103 3 года назад +1

    Nice!!!! Thanks bro

  • @homeassistantiptv8068
    @homeassistantiptv8068 3 года назад

    I am not able to access my host overrides via vpn.. I have searched for hours and i am hoping someone is able to help thanks!

  • @CasualtyGaming
    @CasualtyGaming 3 года назад

    does this work the same for windows machines wherein you edit the host file under system32>drivers>etc?

  • @KyleBTech
    @KyleBTech 3 года назад

    I use this with ha proxy. I run two frontends with a wild card certificate. I use one that all my overrides point to so I can navigate to all of my docker containers internally with https. The other I use to only expose services I want remote access to without a vpn (plex, channels dvr, etc...).

  • @salvadormartins4413
    @salvadormartins4413 2 года назад

    Hi Tom, thanks for your videos, they've helped me a lot so far in my pfSense journey.
    Question: is there a reason why you leave "Outgoing Network Interfaces" at the default "all"?
    I have a couple of pi-holes as DNS servers on my LAN DHCP server and Cloudflare servers defined under System/General Setup.
    The thing is that every once in a while I get loads of concurrent DNS queries which always lead to my LAN (including pfSense) beeing unreachable.
    I can reach pfSense via Wireguard from my phone and do a pfsense reboot after which everything returns to normal.
    I thought maybe the "Outgoing Network Interfaces" setting is causing somehow a conflict.
    ps. i just now increased some of the buffer settings under advanced settings from the DNS resolver to see if it helps.

  • @benhvienakhoatrungtamangia4373
    @benhvienakhoatrungtamangia4373 3 года назад

    how to use pfblockng (dnsbl) for all ip with routed? please help me bro

  • @YehudaKatz1
    @YehudaKatz1 3 года назад

    dnsmasq has a feature called IP aliasing (evidently Cisco calls it DNS Doctoring) which allows you to provide a map of all your NAT IPs and it will automatically replace any returned results, so no manual override required. It would be cool if unbound had the same option and pfSense would automatically load the values from the NAT configuration. I thought there was a similar feature in unbound, but I can't find it now.

  • @kyannic
    @kyannic 3 года назад

    Is there an easy way to override all google.* to the google-safe-search ip?

  • @VioletDragonsProjects
    @VioletDragonsProjects 3 года назад +1

    Other method is to use VIP for haproxy

  • @DoozyBytes
    @DoozyBytes 3 года назад

    not sure why I would need to do this if using HAproxy package on pfsense. Yes the address would be resolved to my pfsense wan address but then the router would just do its job and re-route to correct server. On top of that, since you're doing it this way, you know your ssl will be correct since you're hitting the wan ip.

  • @tundrastreaming
    @tundrastreaming 3 года назад

    If you're connected via VPN (for example OpenVPN) to your network, how does the OS know which DNS server to use? I know there is 'block-outside-dns' for OpenVPN in windows, but not for Linux. Blocking other DNS-servers also tunnels everything through the VPN

    • @LAWRENCESYSTEMS
      @LAWRENCESYSTEMS  3 года назад

      The server side config can not force settings on the clients for Linux

    • @tundrastreaming
      @tundrastreaming 3 года назад

      @@LAWRENCESYSTEMS yes, but I mean just generally.
      How does a VPN-client know when to ask the VPN's DNS-server and when to ask his own DNS server?

    • @LAWRENCESYSTEMS
      @LAWRENCESYSTEMS  3 года назад +1

      When you set the OpenVPN settings to point to a different DNS server the should override the default when connected.

    • @tundrastreaming
      @tundrastreaming 3 года назад

      @@LAWRENCESYSTEMS thank you

  • @profwael2339
    @profwael2339 3 года назад

    Thank you boss for that video but i need to ask you my problem for local dns i have active directory domain in windows server when i enable dns resolve in pfsense i can't join any pc clients to my domain and if i disabled dns resolve in pfsense i can join any pc clients to domain but no internet connection can you tell me how i fix that problem step by step i have to much problem for that issue thank you again and best regards, wael

    • @LAWRENCESYSTEMS
      @LAWRENCESYSTEMS  3 года назад

      If you are using Active Directory it needs to be the DNS.

  • @charlesyoung4589
    @charlesyoung4589 3 года назад

    Are TNSR tutorials in your future channel pipeline? If so, when would it be?

  • @TheJoBlackos
    @TheJoBlackos 3 года назад

    Just to mention that the CN is not always honored, you need to add the name you are covering with the certificate on the SAN section, Chrome, Firefox and probably others does not honor the CN section, that's why you have the little yellow warning. IE still does, but in few months he will be EOL :)