pirateMonkey

joined 2 months ago
[–] pirateMonkey@lemmy.world 2 points 13 hours ago

I know this is a week old, but thanks for your input. I hadn't seen Avahi before, and that's a cool option, so thanks for sharing it. Part of why I wanted to do things this way was an excuse to practice with running a web server before setting up Foundry, so it's mostly just testing things out. Of course, if it was just a regular web server, I wouldn't have had this issue because DNS rebind protection on my router ended up being the problem.

[–] pirateMonkey@lemmy.world 1 points 6 days ago

Part of the idea here is to get comfortable with what's happening here in a safe/unexposed environment before trying something that I would expose to the internet, and I'm of the understanding that you can do it this way (pass it to the internet, which will then return that internal IP that Nginx should route appropriately.

[–] pirateMonkey@lemmy.world 2 points 6 days ago

Yes, I'm using this container: https://github.com/NginxProxyManager/nginx-proxy-manager using the compose file as written (except I'm naming it nginx instead of app). It maps ports 80 and 443 for traffic and 81 for the manager, which is running.

[–] pirateMonkey@lemmy.world 1 points 6 days ago

Yep, that makes sense. Thank you!

[–] pirateMonkey@lemmy.world 1 points 6 days ago* (last edited 6 days ago) (1 children)

Thanks for that flow on how to troubleshoot.

When I try nslookup on the server, it doesn't seem to be working at all (nslookup google.com returns ** server can't find nslookup: NXDOMAIN). On Windows, it doesn't return any IP (*** No internal type for both IPv4 and IPv6 Addresses records available). Looking at my Pi-hole query log, I do see that address was queried and allowed. *ETA - I do notice that the Windows nslookup returns a URL for Server and my router's IP address for Address, while Linux returns the router's IP address for Server and that address with #53 appended for Address.

How can I check what Cloudflare is seeing (because as I understand that's the next link in the chain)? I'm not seeing any logs there, but only created my account Saturday... *edit to add it's obviously in the link in the sidebar that says analytics and logs, but not seeing any activity on any of those, so it seems to not be getting past the Pi-hole?

[–] pirateMonkey@lemmy.world 1 points 6 days ago (2 children)

Even without full understanding, I think you're a few steps ahead of me! I was also under the impression that it would be fairly straightforward, but getting lessons in how to troubleshoot (and I appreciate them!)

I was testing with 127.0.0.1 earlier, so that's makes sense on one level, but not port 3000.

Is my understanding correct that the upstream connection was refused means that it went to Cloudflare who then sent it back to my server, and it was rejected there?

[–] pirateMonkey@lemmy.world 1 points 6 days ago (6 children)

I'm still very much in a learning mode here, so forgive my ignorance - which logs? Nginx? I'm seeing a fallback_error and fallback_access (which has nothing interesting). There are also some empty files for the host I have set up (proxy-host-1_access/error)

2025/09/01 12:34:54 [error] 193#193: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.181, server: nginxproxymanager, request: "GET /api/ HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "192.168.1.196:81", referrer: "http://192.168.1.196:81/nginx/certificates"

Where, presumably obviously, 196 is the server and 181 is a laptop. FWIW I don't see the directory it's mentioning, /nginx/certificates, but I'm looking at the host's directory rather than in the container.

[–] pirateMonkey@lemmy.world 1 points 6 days ago (3 children)

Yeah, just looking for internal access right now so I don't have to remember the correct port for every service. Will use a VPN (leaning toward Tailscale) for remote access once I get this set up.

23
submitted 6 days ago* (last edited 13 hours ago) by pirateMonkey@lemmy.world to c/selfhosted@lemmy.world
 

I'm trying to set up a domain to more easily access my services on my home network, using a vanity URL instead of IP:port. With my current setup, my browser is not able to see the server ('we can't connect to the server' at e.g. plex.mydomain.xyz).

I registered the domain through Cloudflare. In Cloudflare, I set up my DNS records (A - mydomain.xyz - content = 192.168.x.x; A - www; CNAME - *), and got my API token. Nginx is running in Docker (as are the services I am trying to access), using the jc21 container and their docker compose template. I used the API token to generate an SSL certificate in NPM with *.mydomain.xyz as the domain, then added a proxy host using the URL mentioned above as the Domain Name, the IP of the server that's running all my containers for the forward hostname/IP, and the appropriate port for forward port. Then in the SSL tab told it to force SSL and HTTP/2.

I'm not sure what I'm doing incorrectly, the only thing I have running that might interfere with the network service is a PiHole, and it appears to be sending the request on. Also tried using localhost (127.0.0.1) to no avail. I've seen some others say they had to restart NPM a few times, so I've tried that as well. Thanks for any help!

*Edit: My router had DNS rebind protection enabled which was blocking the local address. I discovered this by using NSLOOKUP on my home network, where I got a 'No internal type for both IPv4...' error (in Windows command prompt) and outside my home network, where it resolved correctly. Thanks to those who commented, appreciate your time.