The main difficulty may be that discrimination based on place of birth collides with the Constitution and International laws on Human Rights.
Perhaps just a nit to pick, but the EO does not restrict itself nor does it mention Natural Citizens (by birth) but restricts itself to Nationals of those countries, which would include naturalized citizens.
Another issue is that it is unproven that the goal of the EO is obviously linked to the selection (discrimination) of those specific countries. Yes, there may have been less than stellar cooperation from some countries in doing proper background checks to enable the issuing of visa, and/or countries may have played a role of safe-haven for terrorists. But then the list should not be restricted to those countries alone. So it remains discriminatory, and in conflict with domestic and international law.
I am not sure I follow that it is in conflict with domestic or international law. There are no international laws that require the US to accept refugees. There are, however, international laws (1951 Convention Relating to the Status of Refugees/1967 protocol/ UNGA Resolution 2198) that dictate how the US must treat refugees
after they are accepted. There are agreements about how many refugees the US chooses to accept, but those agreements are not law, nor binding, and are at the pleasure of the President.
As for domestic law, the EO, which can be accessed from
https://www.whitehouse.gov/the-press-office/2017/03/06/executive-order-protecting-nation-foreign-terrorist-entry-united-statesCites the various federal laws that authorizes the President in doing exactly what is in this revised EO. The previous EO was poorly written and did violate federal law. The take-away is that perhaps these laws need to be revised. But in any case, the President is bound by laws in their present form, regardless of how people feel about the law.
There is no legal requirement to include all countries that meet one of the three criteria listed in the EO or the applicable laws. Morally, our sense of fairness may require that if you are calling out certain countries that meet criteria, you should call out all countries that meet that same criteria. That's the difference between morality and legality. An argument can be made, as you did, that this practice is discriminatory and it may be so. But even if it is discriminatory, that does not mean that it is automatically illegal.
The 14th amendment provides equal protection for any person (not limited to citizens) within the jurisdiction of the country or any state. The sticking point is when does a person fall under the jurisdiction of a country or state? The answer is when that country or state accepts them. Persons not accepted into the country are not protected under the 14th amendment. There are some interpretations that recognize de facto jurisdiction over illegal immigrants, but that is a much more complicated issue.
Trump's EO excludes specific classes of people
before they are accepted in to the country. This is also why the 1951 Convention Relating to the Status of Refugees/1967 protocol/ UNGA Resolution 2198) does not apply. If a refugee enters a country without authorization and does not immediately surrender to the appropriate authorities, they lose their refugee protected status.
That is what makes it legal although it can be argued that it is ill-advised.
The Immigration and Nationality Act of 1965 bans discrimination based on religion and national origin for the purpose of establishing immigration quotas. Trump's rational of national security makes his decision external to the 1965 act's scope. Now if Trump orders that nationals from country X can never immigrate to this country, that would be illegal. A temporary ban, in accordance with
8 U.S.C. 1101 is not illegal.
Now if Trump wanted to take refugees from these selected countries,
after they have been accepted into the United States, and them put them in concentration camps....that would be illegal.
In any case, even if a person were to be accepted into the US, 1951 Convention Relating to the Status of Refugees, article 32 gives the US the authority to expel any refugee on the grounds of national security or public safety. In that case, the refugee would be allowed representation in court.
It should be noted that much of the above only applies to refugees and not a larger population of immigrants or visitors.
No non-US citizen has any right to enter the US. Even diplomats don't have that right which is why diplomatic credentials have to be formally accepted. The US is hardly unique in this and controlling entry is one of the foundations of internationally recognized sovereignty.
Please don't misconstrue any of this as support for Trump's EO from me. I personally think it is a poorly thought out and even stupid idea. But I am having a hard time interpreting this as illegal.