Login to your control panel and select the server you want to edit.
Click into the configuration editor, then click text editor on the serveradmin.xml file
In the file you will see something that looks similar to the following:
<whitelist>
<!-- <whitelisted steamID="" /> -->
</whitelist>
To enable a whitelist on your server, for each person you need to get their steamid64 number.
The steamID 64 numbers can be found on the https://steamid.io website.
Next for each person you need to duplicate the <whitelisted /> line, for example:
<whitelist>
<!-- <whitelisted steamID="" /> -->
<!-- <whitelisted steamID="" /> -->
<!-- <whitelisted steamID="" /> -->
</whitelist>
Finally, inside the steamID="" place the each users steamid64.
To enable a player to join the server you need to remove the <!—and --> parts of the lines, this uncomments them.
For example, the file should now look simular to below (with different ids):
<whitelist>
<whitelist steamID="76561198047812056" />
<whitelist steamID="76534573473457556" />
<whitelist steamID="75345634643654356" />
</whitelist>
NOTE: If there are uncommented lines in the whitelist section, the whitelist is enabled and players must be on it to join your server.