If you want only the IP addresses you have specified to enter SSH in Centos 7, you can easily perform the process with the following 2 arrangements.
The first file to be edited is “/etc/hosts.allow”. Here we allow SSH connection from “10.1.2.3” ip.
Now we are editing the “/etc/hosts.deny” file. Here we deny connection from anywhere.
You do not need to restart the system to complete the process.