Mongoku icon indicating copy to clipboard operation
Mongoku copied to clipboard

[QUESTION] Is possible to allow access to web server only from localhost?

Open pabloriera opened this issue 5 years ago • 2 comments

Basically, I don't want the server to be accessible from outside. Wondering if there is an easy way to set the IP like, 127.0.0.1 local only or 0.0.0.0 for any IP. Thanks

pabloriera avatar Apr 29 '20 16:04 pabloriera

I'm not sure what the use-case for this is, but I'm using Mongoku behind Nginx with Basic Authentication. You can allow access by IP address, too. You would just have to create a server.whitelist and put the following:

allow 127.0.0.1; # Allow only localhost.
deny all; # Deny everyone else.

I know you asked for this to be included in Mongoku itself, but I would instead suggest this solutioon. Nginx and other proxies are specifically designed for access control and provide tons of different features to do so.

appellod avatar May 16 '20 11:05 appellod

Yes I’ll second that

julien-c avatar May 16 '20 13:05 julien-c