Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    LAN Client to resolve locally?

    Scheduled Pinned Locked Moved Cache/Proxy
    9 Posts 3 Posters 929 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      luckyal
      last edited by

      First time posting on this forum and relatively new homelabber, so go easy on me.

      I've set up HAProxy to point to my Nextcloud from outside the LAN. I've had some similar problems, as @VioletDragon describes his issues here, however, I was able to modify my Nextcloud config file to operate over HTTPS and those issues were resolved. That said, I noticed that most of my devices on my local LAN take a long time to upload files. After running ```
      nslookup mydomain.com

      johnpozJ 1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator @luckyal
        last edited by johnpoz

        @luckyal well yeah bouncing file transfers off a proxy is going to be performance hit vs just directly connecting. If you access your nextcloud with your local IP and don't proxy - is your speed normal?

        Even if proxy wasn't a performance hit - you would have the hit of just doing hairpin from your pc to pfsense, back to your machine. Unless your netcloud is on a different connection than your pc getting to pfsense.

        Is your question how to get your pc to resolve whatever your local nextcloud is via fqdn, vs hitting the proxy?

        Prob not going to be an issue remotely because of limited bandwidth vs local say gig speeds. Also keep in mind your prob not going to see same performance as file transfer using smb, etc.

        What speed do you get when you just hit your nextcloud its local IP, vs what you see when you hit via your fqdn sending you to your wan IP to be proxied?

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.7.2, 24.11

        L 1 Reply Last reply Reply Quote 0
        • L
          luckyal @johnpoz
          last edited by

          @johnpoz thanks for the reply. For whatever reason my post didn't come through in its entirety. Here's the complete version


          First time posting on this forum and relatively new homelabber, so go easy on me.

          I've set up HAProxy to point to my Nextcloud from outside the LAN. I've had some similar problems, as @VioletDragon describes his issues here, however, I was able to modify my Nextcloud config file to operate over HTTPS and those issues were resolved. That said, I noticed that most of my devices on my local LAN take a long time to upload files. After running

          nslookup mydomain.com
          

          I can see that my local nextcloud server ip resolves as my cloudflare address, not my local IP. I suspect that this is the reason for the delay as the photo upload goes through my cloudflare only to come back through my pfSense/HAProxy and back to my Nextcloud. Is there a way to set it up in such a way that avoids routing extrernally? I know that I can set this up in the nextcloud app to and point it directly to the local IP instead of my domain, but I'd like to have it "auto-detect" when I'm on my local LAN.

          johnpozJ 1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator @luckyal
            last edited by

            just setup a host override to resolve whatever fqdn your using for your nextcloud to point to your local IP.

            This assumes your clients are actually using pfsense as their dns.

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.7.2, 24.11

            L 1 Reply Last reply Reply Quote 0
            • L
              luckyal @johnpoz
              last edited by

              @johnpoz yes, all clients are using pfsense DNS. Any documentation/tutorials on how to set up host override? Sorry, I'm new at this.

              NogBadTheBadN johnpozJ 2 Replies Last reply Reply Quote 0
              • NogBadTheBadN
                NogBadTheBad @luckyal
                last edited by NogBadTheBad

                @luckyal You could try the following if you’re using dns resolver and you only want some of the hosts to resolve external hosts to local ip addresses:-

                https://forum.netgate.com/topic/158427/solved-multi-homed-host-question?_=1627815337292

                Andy

                1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

                1 Reply Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator @luckyal
                  last edited by

                  @luckyal

                  https://docs.netgate.com/pfsense/en/latest/nat/reflection.html#dns-resolver-forwarder-overrides

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                  L 1 Reply Last reply Reply Quote 1
                  • L
                    luckyal @johnpoz
                    last edited by

                    @johnpoz this method seems to work (partially). After implementing Split DNS I have no issues accessing the server from my desktop. I can't access the server from my iPhone running iOS 14.7. If I kill wifi and connect through LTE (from outside my LAN), no problems, but it doesn't work from within the LAN. Both, my desktop and my iOS are on the same LAN subnet.

                    johnpozJ 1 Reply Last reply Reply Quote 0
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator @luckyal
                      last edited by

                      Your phone prob not using your local dns would be my guess.. Make sure you phone is using your dns - and it is no different than any other client on your lan.

                      Prob has doh turned on in whatever browser your using, etc.

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.