there is a slight difference between gunpowder units and gunpowder based units. the walls give no bonus against gunpowder based units, this includes all gunpowder units, armored units, air units, the cavalry/kossack as well as cannons and artillery.
MG, ironclad, transport, destroyer...