In a dream it signifies that by which the king or the town fortifies itself, such as guards, soldiers and money by which he drives away his enemy. If the fortress signifies the king, the soldiers are his men and his wealth. If it signifies knowledge, the moat signifies the scholars who uphold it and preserve it. If the fortress signifies a wife, the moat is her guardian; if it signifies a child, the moat is his father or mother. If he sees in a dream a fortress or a city without a moat, it signifies the unraveling of affairs, such as withholding zakat, squandering wealth, treachery of the soldiers, loss of knowledge, the enemy's attack, or commanding evil and forbidding good.
Dream meaning · al-Nabulsi
Moat (trench) خندق
Source: al-Nabulsi, Ta'tir al-Anam fi Ta'bir al-Manam, p. 96. English translation by iDreamBot. Quran verses: Quran.com, Saheeh International.