Hi,
I just got a new server from a reputable provider I've used for some time . All is well, and I'm set-up with Ubuntu14.04.
My first steps when getting a new server, after updating it, is to implement some basic security:
1. Disable root.
2. Enable only one user, added to sudoers (I am the only user)
3. Change ssh port.
4. Install UFW and open only the ssh port, 80, 443.
5 Install and configure Fail2Ban (I always used Denhyhosts, but it's not supported in Ubuntu14.04)
6 Turned off all unnecessary services listed by :
sudo sysv-rc-conf --list | grep '3n'
I also have PubKey authentication, however, it is unfortunately necessary to allow password login for my one account. To my less-than-wizened eye this would seem to be the weak point of my setup (even if the PW is a long one), nevertheless I think that, overall, I'm secure enough to easily thwart all but the most determined attacker.
Checking the syslog confirms this. I have logging set to low, nevertheless I am seeing a lot of activity - more so than other servers I have used.
Using this one-liner to display a numbered list of unique IP numbers blocked by UFW...
sudo grep -o 'SRC=[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' /var/log/syslog |sort | uniq | sed -e 's/SRC=//g' | cat -n
... I am getting approx 1000 unique IP blocks per day, with many repeated attempts. Since >90% are Chinese, trying to connect on 22 or some random port, I've looked into blocking by country, but this seems like more work than needed. If my firewall is working OK I should have nothing to worry about, right?
My question is:
Is there a level of UFW blocks per minute at which I should become concerned and, most importantly does this have an adverse effect on the performance of my server?
Are there other measures I should consider?
This is not a critical server and I'm not super-paranoid, more curious about what is perceived as normal these days.
Thanks in advance for your sage advice.
I just got a new server from a reputable provider I've used for some time . All is well, and I'm set-up with Ubuntu14.04.
My first steps when getting a new server, after updating it, is to implement some basic security:
1. Disable root.
2. Enable only one user, added to sudoers (I am the only user)
3. Change ssh port.
4. Install UFW and open only the ssh port, 80, 443.
5 Install and configure Fail2Ban (I always used Denhyhosts, but it's not supported in Ubuntu14.04)
6 Turned off all unnecessary services listed by :
sudo sysv-rc-conf --list | grep '3n'
I also have PubKey authentication, however, it is unfortunately necessary to allow password login for my one account. To my less-than-wizened eye this would seem to be the weak point of my setup (even if the PW is a long one), nevertheless I think that, overall, I'm secure enough to easily thwart all but the most determined attacker.
Checking the syslog confirms this. I have logging set to low, nevertheless I am seeing a lot of activity - more so than other servers I have used.
Using this one-liner to display a numbered list of unique IP numbers blocked by UFW...
sudo grep -o 'SRC=[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' /var/log/syslog |sort | uniq | sed -e 's/SRC=//g' | cat -n
... I am getting approx 1000 unique IP blocks per day, with many repeated attempts. Since >90% are Chinese, trying to connect on 22 or some random port, I've looked into blocking by country, but this seems like more work than needed. If my firewall is working OK I should have nothing to worry about, right?
My question is:
Is there a level of UFW blocks per minute at which I should become concerned and, most importantly does this have an adverse effect on the performance of my server?
Are there other measures I should consider?
This is not a critical server and I'm not super-paranoid, more curious about what is perceived as normal these days.
Thanks in advance for your sage advice.
Last edited by a moderator: