I want to setup a FreeRADIUS server with a customised captive portal. whenever the users are connected to any WiFi access points inside the network, it should ask them to login with a username and password and also device restriction needed (i.e. MAC Binding) only the legitimate devices should be allowed. And also need suggestion for best content filter, it should block unnecessary ads/websites/words and also it should restrict the downloads based on file types.
This is quite an interesting question you are bringing. Even though I am not able to provide an extended guide for achieving such setup, I would recommend you to check the FreeRadius wiki howto’s at:
Instead of setting up all at once, break the entire task to a smaller task. For example - setup the server. Next enter the MAC addresses that should be allowed to access the server and authenticate:
Finally you can limit the downloads, ads website etc. This might be a bit harder as you will need to know the source of the ads and websites. I like null routing those or simply placing a rule like this in hosts file: