How do I limit a port to a mac address

I would like to turn on or off a function to limit access to a port by mac addresses. The device uses port 8000. Normally I would like open access. At times I want to deny access to port 8000 to all but a few mac addresses. I am a newbie…talk slow please. Thanks!