Skip to content

Multiple servers in iOS SecuritySpy

edited December 2023 in SecuritySpy

Having a bit of a difficult time adding a second server to the iOS version of SecuritySpy.

Currently I have two servers, same local network. x.y.z.90 and x.y.z.240... These are statically assigned by my router.

Do I need to set up port forwarding and define each server with a distinct port in order to use multiple SS servers on a single internet connection? Or is that not necessary with DDNS and its something else I'm doing wrong?

Interestingly (and what makes me think it is a port forwarding issue) is that regardless what server address I type, it will connect either one at random.

If I delete all servers, it will auto-discover one of them, but only one not both, and not always the same one. And even if auto-discovers ServerA for example, after I type user and pass it could be that it actually connects to ServerB. (They have the same user and pass, so login will succeed either way.)

So I'm thinking port forwarding...? I hope not, I hate port forwarding, but if that's the way it has to be... haha

(And if it is port forwarding, what does the "Auto-configure router for HTTP access" function actually do? I have a fairly technical non-consumer-oriented Mikrotik router, so I'm not sure how it would interact with that...)

Comments

  • With two SecuritySpy servers on the same LAN, each may conflict with the other when attempting to set up remote access.

    The "Automatic port forwarding" options (of which I recommend you use only the HTTPS option, not the HTTP option for security), uses some standard protocols (e.g. UPnP) that many routers support for automatically setting up port forwarding. By default, port 8001 is used for both LAN and WAN HTTPS ports. However, when you are running multiple servers that you want to be accessible from the Internet, each server needs a different WAN (Internet) port, so there is where the conflict lies.

    Here are a few possible solutions to this issue:

    1. Set each SecuritySpy instance to a different HTTPS port. For example, set the first to 8001 and the second to 8003. Keep using automatic port forwarding. The first server will be accessible from the Internet at https://name1.viewcam.me:8001 and the second at https://name2.viewcam.me:8003
    2. Keep each SecuritySpy's HTTPS server at 8001, turn off automatic port forwarding, and instead configure manual port forwarding rules in the router. The first rule forwards WAN port X (which can be anything really) from the Internet to the first SecuritySpy at x.y.z.90 on LAN port 8001, and the second rule forwards WAN port Y (anything except X) from the Internet to the second SecuritySpy at x.y.z.240 on LAN port 8001. the first server will be accessible from the Internet at https://name1.viewcam.me:X and the second at https://name2.viewcam.me:Y
    3. Instead of port forwarding, use a private VPN as described here: Remote Access Without Port Forwarding. In this case, you connect using the VPN IP addresses of each SecuritySpy Mac, on the plaintext HTTP port 8000 (but don't worry because all traffic sent over the Internet is encrypted by the VPN).

    Note that with the first two solutions, even though both DDNS domains will point to the same public IP address, you still need two different ones because each will be associated with the unique SSL certificate that each instance of SecuritySpy automatically creates.

  • edited December 2023

    Thanks very much! Always so quick with the exact answer needed! haha

    I am going with Option 2. My Mikrotik router doesn't do anything... automatic. They are extremely powerful, but 100% manual. haha

    I've done port forwarding before, I already have a few active ones for other things so it isn't a problem, I just don't love it because I can't (quite as) easily change the IP address of my servers. (But I'm super OCD and have a whole spreadsheet of my assigned IP addresses, all numerically organized into logical groups, so not really an issue. haha)

    I have everything set up and working. Local access using the x-x-x.local:8001 addresses and remote using the NameA.viewcam.me:portX and NameB.viewcam.me:portY.

    But I am confused... I can't seem to add more than one server to the iOS version of Security Spy. The server screen says Servers (with an 's') and has the + sign which to me indicated adding additional entries to the list, but when I add a new server and log in and view for a bit, then tap on the server name at the top of the screen above the cams to go back to the server list, there's just the one I'm currently using.

    The way it is all designed I thought that I'd be able to add multiple servers, and just switch between them without needing to re-log-in again every time. For example, view the cameras on Server1 for a bit, then tap Server1 at the top of the screen to take me to the server page, tap on Server2 from my list of servers, and view those cams for a bit, etc.

    (I didn't figure it would be an instant switch, because I figured it would be automatically logging into the newly tapped server from the list. So a couple second lag when switching servers, but that's no big deal as we deal since it is all automatic. Though if there were a way to keep the connections all "active" without wasting resources, that would be great for quick switching.)

    Is that not how it is designed to work, or do I still have something set wrong for it to not be allowing more than 1 server in the server list?

    Thanks!


    Edit/Update: WAN port forwarding and access is working great (one at a time). But it looks like I still have some overlapping going on over on the LAN side of things... When I'm on my local network, the x-x-x.local and y-y-y.local seem to be unable to distinguish from each other. On my router I can do port forwarding when the request originates on the WAN (the regular kind) but also LAN originating port forwarding, too. So presumably port forwarding even when only on the LAN...? I've never done this. Is that possibly what I need to look into?

  • Doesn't everyone have a spreadsheet that records all network devices and their assigned IP addresses? Yours sounds far more organised than mine though :)

    The issue you're describing can come about if, at some point in the past, a settings file was taken from one SecuritySpy instance and used as a basis to configure a second SecuritySpy instance. This will result in both instances having the same internal ID, and therefore the iOS app will consider them as the same server. The solution is to select the menu option at SecuritySpy > Debug > Reset Software UUID on either server. Do this on the server that isn't currently added to the app, and then attempt to add it again - you should now find that it gets added as a second server, without replacing the first one.

    In terms of the LAN .local addressing issue, I'm not sure what could be causing these. These ".local" Bonjour names should be unique, with each one referring to a specific machine. One potential issue could be if these are generic names (e.g. both machines are set to use "iMac.local" - then they can switch around as the compete for this name and one random one ends up with "iMac.local" and other then has to use "iMac-1.local"), but I assume this isn't the case here? Since you have set manual IP addresses for these machines, my recommendation here would be to simply use the LAN IP address rather than the Bonjour name to refer to machines within the LAN, as IP addresses should work 100% reliably.

  • That’s exactly it! Since I had all the cameras on one server originally, configured just like I wanted, I used its settings as a backup/restore when I fired up the second server and just deleted the extra cameras that didn’t belong.

    Hopefully that reset, and using the IP address directly for local connections should take care of everything and I’ll be all set.

    Thanks!

  • Great to hear that - I hope that all is now running smoothly.

  • Wow... Everything is 100% perfect now. Resetting the UUID also cleared up the confusion it seemed to have on the LAN side of things mixing up ServerA's .local with ServerB's .local with no extra steps needed.

    It's a weird feeling... To face significant stumbling blocks, and then get EXACTLY the right answers to fix things. And quickly. And without needing to make any compromises in the way that I was hoping to use the software. That's just not how it usually works. haha

    Now to add ServerC! ;)

  • Great to hear that! Good support is very important to us as a company :) Hope it all goes well with the next server setup.

  • I am so glad I found this thread!! The reset of the UUID fixed the exact same problem I was having. Thanks!!!!

Sign In or Register to comment.