![]() |
webserver (nginx) security
Hi Guys,
I am looking for some help. I have installed nginx and PHP to my n810 and configured a blog system which uses flatfiles as its db. This works perfectly and is being used as my diary for personal thoughts etc. The issue I am facing is that if I am connected to a WLAN network it is possible for anyone on that network to access this blog by hitting the URL. I can obviously create a PHP script which looks for the useragent and only displays the blog if its being hit from the device, this doenst allow me to access the blog form a pc if I wanted to... Does the nginx httpd allow me to do anything special with regards to adding security to folders on the webserver? I want to be able to password protect a folder if its not being accessed via the device itself... I guess I will need to do this with php but wanted to know if there are any other options... Thanks in advanced for your help. badger |
Re: webserver (nginx) security
Typically one can instruct the web server to bind to a specific IP address. If you bind to 127.0.0.1, it should only allow connections from that host. Binding to 0.0.0.0. usually allows any client/remote-machine to connect.
Hope that helps get you pointed in the right direction. |
Re: webserver (nginx) security
Thanks for the responce - however, I wanted a little more flexability than locking down to IP, I connect to a lot of networks and do not always have the same IP.
My requirements where as follows: Quote:
PHP Code:
PHP Code:
The script looks at the UserAgent and if it doesnt contain the words "tablet browser" it prompts for a username and password. Please let me know your thoughts on this and post any alterations/improvements. badger |
Re: webserver (nginx) security
127.0.0.1 is localhost ... so if u restrain to this ip ... your device can connect to it every time ... and only your device.
|
Re: webserver (nginx) security
How about using iptables? I just checked, and there is a 'man' page on it on my N800 running OS2008. I do not think there is a GUI front end ported, that I know of. But it can be configured from the command line.
EDIT - I just thought about your situation further. If you are on a network that is not yours, then web traffic can only go to your tablet's http server if someone on that network types in your DHCP reserved IP into their web browser. They cannot access your server's information if they know the URL, since the network that you are connected to cannot direct web traffic to your server. |
All times are GMT. The time now is 19:46. |
vBulletin® Version 3.8.8