This seems to involve two different types of attacks.
Is the capital ship itself being attacked? Or is it an SBR on the Naval Base?
If it is the ship itself, then the AA from the Naval Base can NOT fire.
If it is an SBR, then the AA from the Naval Base CAN fire. However, the capital ship can not defend the naval base.