While using a wireless network recently that implemented a captive gateway, I noticed that any third party DNS servers manually set would not allow the network to connect properly. 

This would seem to have the advantage of being able to block sites via DNS and not have people bypass that block by using an alternative DNS server.

How would you implement this? So that if any DNS servers other than what would be obtained by DHCP are used, a proper network connection cannot be established?