How to access NATted cameras remotely over http/ssh/sshuttle
Posted: Tue Jul 26, 2016 7:39 am
Hello I found a way to access cameras and configure them via http from behind NAT and without any port forwarding set on the router/firewall.
Assumptions:
1. Remote server has cameras attached to the interface in the network of 192.168.2.0/24
2. Remote server is accesible from the internet via ssh on port 22 via public IP or domain name.
3. Remote server needs python-2.7 or python-3.5 installed.
The Steps.
1. Install and configure sshd on the remote computer/zoneminder machine. This is standard on most distributions.
2. Configure sshd on the remote machine to allow private/public key login. Dissalow password login, no root login. See your distro docs.
3. Install sshuttle on the client computer, make sure ssh client is available here, as well. Latest version of sshuttle as of July 25 2016 is 0.78.
4. Become root on the client computer.
Now you can fire up your browser on the client computer and if your camera has an IP of 192.168.2.14 on the remote machine then do http://192.168.2.14 on the client machine and voila, you can do everything as if you were there.
5. After you finish the http sesssion with your camera you can go back to the ssh terminal and do CTRL+C to terminate the VPN.
more info
http://sshuttle.readthedocs.io/en/latest/
https://github.com/apenwarr/sshuttle
Assumptions:
1. Remote server has cameras attached to the interface in the network of 192.168.2.0/24
2. Remote server is accesible from the internet via ssh on port 22 via public IP or domain name.
3. Remote server needs python-2.7 or python-3.5 installed.
The Steps.
1. Install and configure sshd on the remote computer/zoneminder machine. This is standard on most distributions.
2. Configure sshd on the remote machine to allow private/public key login. Dissalow password login, no root login. See your distro docs.
3. Install sshuttle on the client computer, make sure ssh client is available here, as well. Latest version of sshuttle as of July 25 2016 is 0.78.
4. Become root on the client computer.
Code: Select all
# sshuttle -l 0.0.0.0 -vr user@sshserver:22 192.168.2.0/24 -e "ssh -i /home/user/.ssh/rsa_id"
5. After you finish the http sesssion with your camera you can go back to the ssh terminal and do CTRL+C to terminate the VPN.
more info
http://sshuttle.readthedocs.io/en/latest/
https://github.com/apenwarr/sshuttle