Iraq said Tuesday it is building a wall and trench around Baghdad in an effort to secure the city from terror attacks.