Tag Archives: security

ssh allow all users from lan, restrict users from wan

Raspberry pi used as ssh server at home.
DMZ enabled to it’s IP.


file: /etc/ssh/sshd_config

AllowUsers *@192.168.0.* johndoe

This directive will allow only johndoe to connect via ssh unless the connection attempt comes from the same network, in which case alice will be able to connect, too. If alice tries to connect from the DMZ, it won’t work.