You can add the MAC addresses of hosts that you want to allow the access in a database, if you are working on a large scale, and then compare the MAC address of the user in you network wall and allow th users that are allowed.
Or if you are working on a small scale then in your program you can save the MAC in an array or model class and compare when the user will access.