Enable the whitelist via server.properties by setting whitelist = true
You can manage the whitelist by using these commands.
whitelist add <targets>
whitelist remove <targets>
<targets> are any player(s) to add or remove from the whitelist. Must be a player name, a target selector or a UUID.