How to do host access control
PROBLEM DESCRIPTION
This article explains how you can control access to the remote host machine. For example, it is useful if you want to allow only certain PCs to access the host.
RESOLUTION
By default, GDM does not come with a feature to control who can access the service. Therefore, you have to use TCP-Wrapper. In this example, we will use TCP-WRAPPER to allow or deny access from the certain host PCs.
TCP-WRAPPER uses files/etc/hosts.deny, /etc/host.allow to configure host access control. To deny all host but your PC, you will add the following line to /etc/hosts.deny:
gdm : ALL
And, allow your PC`s IP address in /etc/hosts.allow like the following example:
gdm : 192.168.1.14
Also, to deny access from a certain host, you would add its IP address in /etc/hosts.deny like the following example:
gdm:192.168.1.14
Note
You have to replace the IP address with the real one.