You can block gambling sites by either self-excluding yourself from a single casino, or with the help of services like Gamban.
Gamban allows you to block access to all gambling sites. It works with all devices and their blocklist covers thousands of international gambling sites.