Question: can ghasts go through walls?
Answer: However, ghasts require line of sight to fire at you, which means you can build transparent walls or windows without being able to get struck by a ghast. Transparent blocks include leaves, glass, vines, fences, cobwebs, iron bars and even Nether portals.