How to block subnet to subnet access

Set allowed addresses for ssh in the ip/services