Old phone used as webcam securely shared using Apache reverse proxy
I tried to monitor my flat using old phone as web camera (should be replaced with IP camera). It's quite simple using one of many Android apps (IP Webcam by Pavel Khlebovich in my case).
Since I do not have public IP I had to use OpenVPN to my home network:
![]() |
My phone/camera has address 192.168.1.11 (Home LAN network). To have access to it from Internet, I had to add this to cameras.conf file (in /etc/httpd/conf.d directory):
<Location "/cam1"> ProxyPass "http://192.168.1.11:8080/" ProxyPassReverse "http://192.168.1.11:8080/" </Location>
Now I can see what is happening typing http://cameras.jaqb.gda.pl/cam1 in web browser.
What is worse anyone can see. To protect my own privacy I've added authentication, so whole file looks like this:
<VirtualHost *:80> <Location "/cam1"> ProxyPass "http://192.168.1.11:8080/" ProxyPassReverse "http://192.168.1.11:8080/" AuthType Basic AuthName "Acess to my first camera" AuthBasicProvider ldap AuthLDAPURL "ldap://localhost/dc=jaqb,dc=gda,dc=pl" NONE AuthLDAPBindDN "cn=administator,dc=jaqb,dc=gda,dc=pl" AuthLDAPBindPassword typeyourpasswordhere AuthLDAPGroupAttribute memberUid AuthLDAPGroupAttributeIsDN off Require ldap-user jakub </Location> </VirtualHost>
Now only user jakub (me ;-) can have access.
Komentarze
Log in or create a user account to comment.