itsacoolaccount
Posts: 10
Joined: Sun Mar 18, 2018 8:04 pm

SSH IP Filter

Sun Mar 18, 2018 8:09 pm

So I've got a server up and running and all that's left on my list is only allowing certain IP's (a local and a remote IP), but I can't find the file or setting to do it.


HELP ME PLEASE

Code: Select all

sudo apt-get install coffee

fbe
Posts: 175
Joined: Thu Aug 17, 2017 9:08 pm

Re: SSH IP Filter

Sun Mar 18, 2018 11:23 pm

https://www.raspberrypi.org/documentati ... ecurity.md
Section "Install a firewall" could be what you are looking for.

itsacoolaccount
Posts: 10
Joined: Sun Mar 18, 2018 8:04 pm

Re: SSH IP Filter

Sun Mar 18, 2018 11:47 pm

Fixed.
I just put the following into the end of /etc/ssh/sshd_config

Code: Select all

AllowUsers *@127.0.0.1 *@192.168.0.*
Thanks anyways!

Code: Select all

sudo apt-get install coffee

mfa298
Posts: 1103
Joined: Tue Apr 22, 2014 11:18 am

Re: SSH IP Filter

Mon Mar 19, 2018 11:31 am

itsacoolaccount wrote:
Sun Mar 18, 2018 11:47 pm
Fixed.
I just put the following into the end of /etc/ssh/sshd_config
I would highly recommend reading through all the sections on the link fbe provided. Failure to do some of those could easily lead to your pi becoming compromised.

My additional recommendation for SSH is to change it's default port to something else. Whilst this is only security through obscurity it will stop the vast majority of automated scans that will fill the logs (I've seen thousands of such scans per day in the past).

Return to “Advanced users”

Who is online

Users browsing this forum: fred44nl and 11 guests