A country has an absolute right to control its borders.

The list of countries actually came from an Obama pushed law: Section 217(a)(12) of the INA, 8 U.S.C. 1187(a)(12), 

Obama shut off Iraqi refugees for 6 months for the same stated reason.