When Mera brings Arthur (Aquaman) to Atlantis, she points out that there is only one entry/exit to the city. She adds that anyone who is stupid enough to go over the wall will be fired upon by the hydro cannons.
Prior to that, when King Orm is trying to ally with King Nereus, they get attacked by a "land-dweller" submarine. Whether the attack was staged or not is up for discussion. In any case, how did the submarine get past Atlantis's defenses and venture deep enough into Atlantis without being noticed by the security systems?