Access IP camera on peer's local network

My apologies, this is probably the simplest of requests. I’ve been reading for a while I just can’t seem to find what I’m looking for.

I have 2 devices, a Mac (site A) and a little headless Linux (Ubuntu) device (site B). Both running ZeroTier and connected to the same network ID. The one can ping the other.

Located on the LAN of the Linux device is a camera (192.168.1.65) which has a working RTSP feed (rtsp://user:pass@192.168.1.65:554). My goal is to access this site B camera from the Mac which sits at site A.

Would appreciate any suggestions.

Thanks, Sean.

Generally speaking that has nothing to do with ZeroTier.
You need to configure on your Linux host:

  • ip forwarding
  • NAT [using iptables] between SiteB_ZerotierAddress:someport and 192.168.1.65:554

Thanks a lot for your reply!

I have enabled IP forwarding on the Linux machine.

I have been reading online but I’m not entirely sure what is the correct iptables syntax to add on the site B computer, can you tell me if the below looks correct to route anything entering site B with port number 8001 which would be routed to the IP camera’s RTSP feed which is 192.168.10.82:554

sudo iptables -t nat -A PREROUTING -p tcp -i wlo1 --dport 8001 -j DNAT --to-destination 192.168.10.82:554

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.