NGINX Proxy Manager is slowing down my network? reddit / selfhosted ---------------------------------------------------------------------- IGC1K · 2023-10-26 01:01 So Ive got a few services running on my home network, and i recently decided to use NPM to make it easier to access these services, but today I noticed that if download anything through the given proxy host name, the speed just kinda shits the bed I initially thought i was connected to my domain on cloudflare so test this theory i just switched my internet access off and tested it out Low and behold, the download speed is still crap, what am i missing here? ---------------------------------------------------------------------- clintkev251 · 2023-10-26 01:53 >Update: Apparently whenever i click download, it goes to my cloudflare domain to download, which makes 0 sense to me as the domain itself is still the same. Of course it does. Assuming that you have the Cloudflare proxy enabled or are using a tunnel, the DNS records for your domain point to some IP owned by Cloudflare, not your local proxy or even your public IP. So every request will go out to Cloudflare, then be proxied back in. You could set up a local DNS resolver which will resolve directly to your NPM IP therefore bypassing Cloudflare when you're local while still allowing traffic to be proxied by them when you're not. Or you can disable the proxy on the Cloudflare side entirely, at which point they're nothing more than a DNS resolver pointing to your home (this doesn't work if you're using a tunnel though). ---------------------------------------------------------------------- IGC1K · 2023-10-26 01:57 I am indeed using a tunnel, I’ve already setup pi-hole to point to npm This works perfectly for everything, until i click a link of mine that has a subdomain, Ex: Nextcloud and npm are on 192.168.9.3 Pihole is 192.168.9.2 Dns record point nxt.me.com to 192.168.9.3 and npm resolves that When i click on a link in nextcloud to download a file, it goes to cloudflare ---------------------------------------------------------------------- clintkev251 · 2023-10-26 02:00 How are you determining that the download link is sending you out to Cloudflare? As you've said, since it's the same domain the DNS should still resolve to your local IP ---------------------------------------------------------------------- IGC1K · 2023-10-26 02:01 Because i tried it with a different domain name and it worked fine lol ---------------------------------------------------------------------- clintkev251 · 2023-10-26 02:05 So the first thing would be to actually confirm your theory definitively. What you can do is go to wherever this download link is, open the developer tools in your browser (F12 generally), go to the network tab. Then click the link and (assuming you started with an empty list), that request should appear at the very top of the list. You can click on it and find the Remote Address field which will show what server you're actually connecting to. You should be able to tell if this is a private or public IP. If it's a private IP it should be that of your NPM instance. ---------------------------------------------------------------------- clintkev251 · 2023-10-26 02:08 Also, do you actually have a record that covers that subdomain? Or a wildcard? ---------------------------------------------------------------------- IGC1K · 2023-10-26 02:16 Interestingly enough it does not point to cloudflare nor my local ip, it went to my tailscale ip Apparently this seems to be the issue, this also doesn’t make sense to me lol As tailscale is meant to simulate a local ip no? ---------------------------------------------------------------------- IGC1K · 2023-10-26 02:18 I think Ive found a solution, let pihole point to tailscale ip, npm point to a local ip, keep the dns override and boom it all works Appreciate it man you were loads of help thank u ---------------------------------------------------------------------- clintkev251 · 2023-10-26 02:19 Hmmm I don't have an answer for that one. Do you have the tailscale client on your machine that you're accessing it from? Is the domain in the call correctly corresponding to your domain that points to NPM, or is maybe nextcloud doing some hostname detection and for some reason picking up the tailscale magic DNS name? At least you have a better idea of what components are involved now ---------------------------------------------------------------------- MyTechAccount90210 · 2023-10-26 03:10 Use a separate domain for internal services. so you can have home.whatever.com, your dns lookup for service.home.whatever.com points to nginxpm and then you'd use your internal IP for connection. As it stands right now, your connection is going out and back into your home, which obviously create unnecessary hops and delays. If you want to have services accessible outside your home, then you would leverage your cloudflare tunnel connection. ---------------------------------------------------------------------- IGC1K · 2023-10-26 17:37 Oh hey man, mb I literally just saw this, I actually never knew i could make wildcard records lol But nope Ive got an A record pointing to my NPM host and a AAAA record for each domain and subdomain ---------------------------------------------------------------------- IGC1K · 2023-10-26 17:38 Oh btw, the reason it got messed up is because of the derp servers, i wish i could actually turn that off since all my servers aside from one are in the same country ---------------------------------------------------------------------- IGC1K · 2023-10-26 17:42 Heyyy, so actually tailscale doesn’t send anything outside of your devices, keeping everything inside unless it suddenly gets sent through a derp, as to why I don’t use another domain, it’s mostly because of convenience, but routed every service to the internal ip, so it’s perfect Also it keeps all my services on a single Homer page and everything is super neat and tidy and accessible from one place, i add 2 dns servers to my tailscale account, one in my current house with everything routed to internal ip’s The 2nd dns is used publicly, it’s a bit slower but helps me justify having other servers outside of my house Gives me a bit of a networking troubleshooting to waste time lol ---------------------------------------------------------------------- IGC1K · 2023-10-26 17:57 Heyyy, so actually tailscale doesn’t send anything outside of your devices, keeping everything inside unless it suddenly gets sent through a derp, as to why I don’t use another domain, it’s mostly because of convenience, but routed every service to the internal ip, so it’s perfect Also it keeps all my services on a single Homer page and everything is super neat and tidy and accessible from one place, i add 2 dns servers to my tailscale account, one in my current house with everything routed to internal ip’s The 2nd dns is used publicly, it’s a bit slower but helps me justify having other servers outside of my house Gives me a bit of a networking troubleshooting to waste time lol