From LedHed's Wiki
Create an ACL
Enter Configuration mode:
config term access-list 20 permit 192.168.1.0 0.0.0.255
Assign ACL to the vty Interface
line vty 0 4 access-class 20 in
This will force the vty 0 4 interface to only accept connections form the 192.168.1.0/24 subnet.