Motion - Support Question 2010x 03x 15x 205257

How to allow only certain IP's connect to my webcam??

Question

Hi everyone!

I wonder how I can set the motion for only a few IP's from my internal network to access my webcam. I did not find this option in the motion.conf. I do not want free access to all IP's. Can someone help me?

Tks!

Paste in your error messages, config settings, terminal window output etc in this text field.

Environment

Motion version: 3.2.11.1
ffmpeg version:  
Libraries: ffmpeg, mysql, postgresql
Server OS:  

-- MarcosVinicius - 15 Mar 2010

Answer

You can use any firewall to filter IP to stream port of motion or Allow from / Deny from directives ( if you use mod_proxy in apache ).

* iptables
iptables -A INPUT -s 127.0.0.1 -p tcp -m tcp --dport 8081 -j ACCEPT
iptables -A INPUT -s 192.168.1.0/255.255.255.0 -p tcp -m tcp --dport 8081 -j ACCEPT
iptables -A INPUT -s 67.94.75.2 -p tcp -m tcp --dport 8081 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 8081 -j REJECT --reject-with icmp-port-unreachable

* Apache

http://httpd.apache.org/docs/1.3/mod/mod_access.html

http://httpd.apache.org/docs/2.0/mod/mod_access.html

-- AngelCarpintero - 16 Mar 2010
Topic revision: r2 - 16 Mar 2010, AngelCarpintero
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.