How to add country blocking to unraid using the Nginx Proxy Manager

After looking into this I have decided that the amount of effort would not be worth it. Instead I’ve implemented a firewall rule at Cloudflare which challenges any traffic that does not come from the US or Canada. This will stem the tide of bot traffic without blocking legitimate traffic.

Down the line I’ll set up country blocking in opnSense…..

 

 

SSL Failures Behind NPM

The title says it all. Occasionally when working on sites I host behind NPM (Nginx Proxy Manager) from the LAN I will have a failure owing to the fact that the SSL cert on the local server is: missing, expired, etc… Running certbot to create certs can be preoblematic behind NPM and would create a different cert than the proxy is serving up, so…. I got the idea to create a cron job on the web server that would;

1) ssh into unraid
2) rsync the SSL files down to the appropriate webserver instance
3) reload nginx

This will keep the certs in sync and eliminate the pesky SSL issues I was seeing on when accessing sites from behind NPM

 

SSL Renewal Mysteries of Nginx Proxy Manager (NPM)

+

Using unRAID server to do a ton things…. from running some server VMs to a bunch of Dockers All the web facing bits are being routed through a Docker of NginxProxyManager (NPM).

NPM takes care of requesting and renewing the SSL certs using LetsEncrypt. However I noticed that there was an issue with them not renewing correctly.

This story will need to wait for the next auto renewal before I can dig deeper into the issue (should it be unresolved).

My first steps looking at this I opened the NPM console and did:
# certbot certificates
This lists all the certs NPM is managing. I noticed that there was one that was no longer listed in the GUI and thought it could be messing things up…. To remove the cert I did:
# certbot delete
This lists all the certs in a numbered list and you can choose a number to delete a single cert, hit ‘c’ to cancel, or just hit enter and delete them all. BE CAREFUL HERE!

I deleted the offending cert and manually invoked the renewal from the GUI, success!

So now I’m waiting to see if this was the culprit and if the next renewal goes smoothly… I’ll update in < 90 days…..