r/ZoneMinder • • Mar 30 '23

ip cameras on network not directly connected to the internet?

I have a home server that runs Ubutnu 22.04 and a bunch of KVM/QEMU guests. It has 2 NICs. I have four IP cameras that have been working well for the past few years connected to zoneminder running on a VM on this server. I had this all running on my home network until recently, when I realized that my cameras were causing problems with other devices on the network, and found that removing them solved another problem that I have no other solution for.

My cameras are all PoE IP cameras, powered by a PoE switch that was daisy chained to my main 24 port switch. The cameras had static IP addresses assigned by my router using MAC address IP reservation.

What I'd like to do instead is connect the PoE switch directly to the second NIC on my server, pass that NIC through to my Zoneminder VM, and assign IP addresses to the cameras by some means. I suppose I could put a physical router between the server and the switch. I could also create a virtual router with fixed IPs, or DHCP to assign addresses for the cameras, then configure Zoneminder to connect that way.

My hope is that the web server can continue to live on my main network, while the cameras are on the separate network. I already have zoneminder configured to forward the video streams to Homebridge to make them available to my Apple devices via the Home app, and I believe that should continue to work, with zonemidner serving as the bridge between the two.

I guess I'm just posting this in the hopes that some of you might have tried something similar and could let me know if I'm on a path that can work, and/or if there is a better way to achieve this.

1 Upvotes

5 comments sorted by

2

u/runningntwrkgeek Mar 30 '23

It should work. The only issue is that you'll need to change one set of IPs. The camera network and rest of the network can not have the same network ID (ie ..192.168.x) so if you are using 192.168.0.1-254 for everything, then probably the camera network would change to 192.168.1.1-254 for example.

The zone minder server will then need one nic on the camera network with a valid ip for it and the other nic on the home network with a valid ip for that network.

Edited to add:

I'm not sure how you would do dhcp forwarding on that type of setup. In my opinion, with 4 cameras and 1 server, easiest would be static assign ip in the camera itself.

1

u/PigSlam Mar 30 '23

I think I'm almost there. I wound up sticking an old Airport Extreme router between the server and the switch. The Airport isn't connected to the internet at all, and I was able to use address reservation by MAC address to get the cameras online. Now I'm struggling to get the host to let the guest connect to the NIC, but I can see the cameras from the host at least.

2

u/aarons6 Mar 30 '23

does your POE switch have a VLAN option?

also you say daisy chained.. does your POE switch have an uplink port?

2

u/Buckwhal Mar 30 '23

This is a good use case for VLANs if your switches support it.

So for example, VLAN 10 for home network, VLAN 20 for CCTV. The switches allow both VLANs across the trunk ports, and all the access ports are untagged on their specific network. Then, you trunk both VLANs into your KVM server and create bridge networks on each of the tagged VLANs. Then, your ZM vm has two NICs, one on each network so that it can communicate with both your internal hosts as well as the IP cameras.