LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-16-2008, 10:19 AM   #1
rdmapes
LQ Newbie
 
Registered: Feb 2003
Location: Vermont
Distribution: Fedora4,6 - Ubuntu
Posts: 8

Rep: Reputation: 0
What are IPTABLES rules to secure video feed?


Good Day All,
My static world IP is 216.xxx.xxx.xx provided by my ISP
My ISP internal IP is 10.xx.xx.xx also provided by my ISP
Internal network uses 192.168.10.x
I have been doing some reading and having a bit of trouble.
I am using Motion for keeping an eye on things when I am not home. I have port 8801 set up to stream. I also have apache2 configured to require a login. I get the prompt from the apache2 server for authentication, login prompt. I can login, get the webpage. I would like to know how to control port 8801 so that the world cannot view the stream. I created an internal webpage with img src links, as well as cambozola. Below are what my rules look like for IPTABLES.

I have found that I need this one in order to do anything. This rule opens up the port, but also to the world. I have tried different variations, but still end up w/ the same problem. World access.
-A tcp_packets -p tcp -m tcp --dport 8801 -j allowed

Here is where I reroute to my internal ip & port
-A PREROUTING -d 10.x.x.x -p tcp -m tcp --dport 8801 -j DNAT --to-destination 192.168.10.90:8801
-A PREROUTING -d 10.x.x.x -p udp -m udp --dport 8801 -j DNAT --to-destination 192.168.10.90:8801

Here is where I forward internally.
-A FORWARD -d 192.168.10.90 -i eth0 -p tcp -m tcp --dport 8801 -j LOG --log-prefix "REDIRECT Motion: "
-A FORWARD -d 192.168.10.90 -i eth0 -p tcp -m tcp --dport 8801 -j ACCEPT

I would like to know if there is a way to view the stream after a successful login?
Here is a copy of some of the html from the index file.
<applet code=com.charliemouse.cambozola.Viewer
archive=cambozola.jar width="320" height="240" style="border-width:1; border-color:gray; border-style:solid;">
<param name=url value="http://216.x.x.x:8801">
</applet>

<!applet code=com.charliemouse.cambozola.Viewer
archive=cambozola.jar width="320" height="240" style="border-width:1; border-color:gray; border-style:solid;">
<!param name=url value="http://10.x.x.x:8801">
<!/applet>


<applet code=com.charliemouse.cambozola.Viewer
archive=cambozola.jar width="320" height="240" style="border-width:1; border-color:gray; border-style:solid;">
<param name=url value="http://192.168.10.90:8801">
</applet>


<br />
<img src="http://216.x.x.x:8801/" width="320" height="240" />
<!img src="http://10.x.x.x:8801/" width="320" height="240" />
<img src="http://192.168.10.90:8801/" width="320" height="240" />

If more info is needed let me know. This cool stuff, but I get a little lost with iptables. I am not sure if iptables is where I need to do this. I am sure that someone has been through this and can provide some insight.

Thanks,
 
Old 02-17-2008, 08:08 AM   #2
Deleriux
Member
 
Registered: Nov 2003
Posts: 89

Rep: Reputation: 17
The only way I can think of is the use stunnel to encrypt the stream on port 8801 and then use stunnel on your client side to authenticate and provide access to the stream.

I wouldnt know how to do that without a whole bunch of research as youd need to configure stunnel to verify the connector as well as the connector verifying the server.

That, or some kind of VPN setup.

To be frank this software you have should provide you with an authentication layer, then you wouldn't be hacking around the problem.
 
Old 02-17-2008, 11:07 AM   #3
rdmapes
LQ Newbie
 
Registered: Feb 2003
Location: Vermont
Distribution: Fedora4,6 - Ubuntu
Posts: 8

Original Poster
Rep: Reputation: 0
Deleriux,
I thought about openvpn, but wondering why apache or iptables could not handle the task. All that I have read leads me back to your last statement. Motion should provide the authentication. It may, but I have not found out how to do it yet.
I continue to read and tinker....
On the other hand I am happy with Motion. It works well to keep an eye on things, I ftp images off site, get email on my phone when something is detected.
Thanks for adding your thoughts.

Regards,
Ron
 
Old 02-17-2008, 11:10 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Since you may connect from any IP address, ip_tables won't be able to help you other than blocking all connection attempts. You said it ftp's the pictures. You can secure your ftp site with a username & password or use sftp.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Democracy-player? Alternative internet-TV/vidblog/video-podcast feed aggregators? silencestone Slackware 4 12-16-2007 06:55 PM
iptables 1.27a still loading rules after installing iptables 1.3.0 yawe_frek Linux - Software 1 06-07-2007 09:50 PM
Looking for RSS & Atom Feed (News Feed)? suse2166 Linux - Software 2 11-16-2006 04:58 PM
Live internet video feed on fish tank worldgnat Linux - Hardware 5 08-01-2005 12:45 PM
Recording a Live Video Feed sonikntails Linux - Software 1 10-22-2002 05:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration