Assuming a camera is separate from the building, then its ethernet cable must connect to earth at both ends. At the camera end. And at the building service entrance. A connection that must be low impedance (every foot shorter means better protection). IOW the cable must enter the building to be earthed within feet to the same earth ground used by telephone, TV cable, and AC electric. This short and single point ground is critically important.
Two separate structures means a lightning strike to one can be a direct strike to earth via electronics inside the other. Damage if a cable does not connect to earth at both ends - via that protector.