24 October, 2013

Restrict SSH Linux

# /etc/hosts.allow

Variant 1

sshd:  192.168.1.0/24

Variant 2

sshd: 111.11.1.111, 222.2.22.222, 333.3.33.333

Variant 3 (with sshdfwd-X11):

sshd,sshdfwd-X11: 192.168.1.0/24

# /etc/hosts.deny

Variant 1

sshd: ALL

Variant 2

sshd,sshdfwd-X11: ALL