Home / Community / Blog / Old phone used as webcam securely shared using Apache reverse proxy

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.

Comments

Log in or create a user account to comment.

Just my blog...

Mon Tue Wed Thu Fri Sat Sun
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31