Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] HTTP Basic password auth need extra port for nginx #66

Open
yevdev opened this issue Jun 20, 2021 · 0 comments
Open

[Suggestion] HTTP Basic password auth need extra port for nginx #66

yevdev opened this issue Jun 20, 2021 · 0 comments

Comments

@yevdev
Copy link

yevdev commented Jun 20, 2021

While i'm not sure what monster would port scan, and find the feeder service if it is publicly accessible and dispense all food! However, I figured adding nginx passwords using a .htpasswd was sufficient enough.

I solved this ultimately by allowing a 3rd port, 8443 that is an exact copy of the :443 server binding, with just a small edit of

location / {
auth_basic "Dragons Ahead";
auth_basic_user_file /data/.htpasswd;

Small notes

  • Looks like the feeder uses the API :443 for health checks? Adding a password directive here seems to cause the feeder to stop phoning home and become unresponsive.
  • I run petnet on my local network, however, I use DynamicDNS and port forwarding (custom port -> 8443 exposed to the world) to allow access from my mobile phone. I have two cats, and a Nest cam to monitor the bowl and I like the ability to just manually feed based on how much is visible.

The system runs great on Ubuntu 18.04 on a small VM, and Raspberrypi pi-hole to intercept DNS and reroute to the VM.

@yevdev yevdev changed the title HTTP Basic password auth need extra port for nginx [Suggestion] HTTP Basic password auth need extra port for nginx Jun 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant