Captive Portal help

I need Captive portal (as protection from always online devices). How to manually set it up on 4.0+?