Only allow a connection from specific domains

Solution 1:

Yes, this is possible. You will have to get a list of the IP addresses that those domains use and then add them as exceptions to the firewall.


With /etc/hosts.allow you could try something like

sshd : localhost : allow
sshd : .wavetelecom.com : allow
sshd : .northhosts.co.uk : allow
sshd : ALL : deny

Don't forget to ensure that the hosts in the listed domains have correct reverse dns RRs configured.