There are countries that will host a gambling site even if they do not have a license provided that you have an office over the server are on that region, I am not very familiar about setting up a gambling site but it only pays to get a lawyer, a lawyer can give you a sound advice and it will take care and explain all the problems that will come and how you can deal with it.
Yes, a legal advice is needed in this case, every country has their own law regarding gambling, even local lottery has their own rules and regulations needed to obey, if you want to have a gambling website online, better to prepare your files first, hire a programmer that will maintains the security of the website to avoid any problems , and to prevent hackers , in that way you can run online gambling without any issues.