As I understand it, gambling in the U.S. is only illegal if it takes place between states. However, the large, Native American owned casinos permitted by states through due to the 1987 ruling of California v. the Cabazon Band of Mission Indians draw in people from many different states at a time. I am wondering if this is permitted because these casinos are constructed within the sovereign territory of tribal nations within states, or, if it is because that ruling itself loosened regulations for all gaming institutions, Native or not.
The two general federal restrictions on gambling are in 18 USC ch. 50, against off-shore gambling ships, and wire communication for transmitting information that assists interstate / international gambling on sporting events and competitions. Interstate lotteries are legal and internet sales of lottery tickets is legal (until Congress or SCOTUS says otherwise). These laws have the usual commerce clause justificational language.
In addition, the Unlawful Internet Gambling Enforcement Act says that you can't use the internet to engage in otherwise-illegal gambling, so if your state prohibits lotteries or bingo, you can't use the internet to gamble (in-state or across state/tribal lines). The definitions section (31 USC 5362(10)(C)) narrows the term "unlawful Internet gambling" so that an online wager is legal if made exclusively within or between the land of one or more tribes, and follows applicable Indian gaming regulations, see below.
Gambling on tribal land is covered by 25 USC ch. 29 which was passed in response to California v. the Cabazon, and there are three classes of gambling. Traditional and social games with minimal reward are unrestricted; bingo, cards (not games where you play against "the house") and other stuff is class II which requires tribal approval etc. The broader 3rd class requires a compact to be negotiated between the state in which the venue is located and the tribe. Section 2710(d) address the most stringent (and most generally-relevant) restrictions. The federal "take" on these matters is mediated via the Indian Gaming Commission under Interior (and not, for example, the DOJ), and 2 of the 3 commisioners must be registered tribe members. The law is framed in terms of location on tribal land which is "within the reservation" or "on tribal trust land", thus an operation owned by a tribe but located on other land is not covered by this act (and would be covered by the relevant state law).
No specific law is required to permit anything pertaining to gambling, instead a specific law would be necessary to prohibit it. The federal government prohibits very little, leaving that to the states. A state has authority to regulate gambling, but it has no authority to regulate gambling on tribal land, unless Congress gives it such authority (and Congress has not). The Indian Gaming Commission has (apparently) not issued any general regulations to the effect that a casino must disallow out-of-state gamblers or anything to that effect, although it might technically have the authority to do so. If home-to-casino internet gambling is legal in your state, then home-to-tribal-casino internet gambling is legal.
So from what I've seen, the United States at the Federal level bans interstate gambling because it is under the interstate commerce clause. This presumably would include Native American territories as they are still under Federal Law. Anyone may gamble at a casino in State A regardless of citizenship within that State. You may not gamble with a casino in State A if you are physically in State B.
It should also be noted that not all States allow for casinos in reservation lands.