Koozali.org: home of the SME Server

Advice please ..

ADG

Advice please ..
« on: December 26, 2004, 11:39:48 AM »
Dec 26 09:57:44 <server> sshd[2381]: Illegal user test from 203.70.28.26
Dec 26 09:57:48 <server> sshd[2381]: reverse mapping checking getaddrinfo for h26-203-70-28.seed.net.tw failed - POSSIBLE BREAKIN ATTEMPT!
Dec 26 09:57:48 <server> sshd[2381]: Failed password for illegal user test from 203.70.28.26 port 34612 ssh2

What's an "illegal user test"?

and is there anything I should be doing to ensure these aren't successful?

pluggy

Advice please ..
« Reply #1 on: December 26, 2004, 05:34:38 PM »
Somebody has tried getting in using 'test' as a user.

Enable SSH for local networks only ?

cc_skavenger

Advice please ..
« Reply #2 on: December 26, 2004, 05:38:34 PM »
This is the server telling you that someone from IP 203.70.28.26 tried logging into your server using the username test but they didn't get in because they didn't have the right password.  

You can change the ssh port to something different.  You can make ssh only available to the lan and have to vpn into the server before you could ssh into it...

Just a few ideas.

HTH

ADG

Advice please ..
« Reply #3 on: December 26, 2004, 08:48:31 PM »
Thanks, there are many instances of this from numerous IP addresses, I have restricted ssh from the "local network" only, now I have to figure out how to make myself "local network" (as the server is elsewhere).

Offline Appesteijn

  • ***
  • 62
  • +0/-0
Advice please ..
« Reply #4 on: December 26, 2004, 08:56:35 PM »
You could add your ip-adres in the local-network list in the server-manager. Just use 255.255.255.255 to make sure it accepts only 1 ip.
............

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Advice please ..
« Reply #5 on: December 27, 2004, 03:28:33 AM »
Quote from: "ADG"
Dec 26 09:57:44 <server> sshd[2381]: Illegal user test from 203.70.28.26
Dec 26 09:57:48 <server> sshd[2381]: reverse mapping checking getaddrinfo for h26-203-70-28.seed.net.tw failed - POSSIBLE BREAKIN ATTEMPT!
Dec 26 09:57:48 <server> sshd[2381]: Failed password for illegal user test from 203.70.28.26 port 34612 ssh2

What's an "illegal user test"?


It's a user which doesn't exist on the system. Most likely a skript kiddie found the ssh port open and tried to log in as test. Everybody has those (I also have attempts to log in as george, john, backup, account, etc).

Quote


and is there anything I should be doing to ensure these aren't successful?


Make sure that all your users have good strong passwords. The system already makes sure that all users must have a password set.

If you don't use ssh, disable it.

ADG

Advice please ..
« Reply #6 on: December 27, 2004, 07:32:57 AM »
Appesteijn ...

I tried that but for some reason it didn't work ... will keep working on it though ....

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Advice please ..
« Reply #7 on: December 27, 2004, 04:11:33 PM »
Quote from: "cc_skavenger"
You can make ssh only available to the lan and have to vpn into the server before you could ssh into it...


Which would only mean that they could try to guess passwords for pptp, rather than try to guess passwords for ssh. No real increase in security.

Better to disable password access for ssh, and use RSA/DSA keys for any ssh login. Crackers can then try to guess ssh usernames and passwords until the cows come home.

ADG

Advice please ..
« Reply #8 on: December 28, 2004, 12:15:16 AM »
do you have a link to more information on that?


Bron

Offline smeghead

  • *
  • 563
  • +0/-0
Advice please ..
« Reply #9 on: December 28, 2004, 12:17:57 PM »
.. my preference is to use an ADSL router in front of an SME box (NAT firewall on both!) and use the router portforwarding rules to lock down SSH to only those IP's I want to have access - SME box is set for public SSH access.

Of course you have updated your ssh & ssl with the latest security patches?!
..................

Offline ldkeen

  • *
  • 403
  • +0/-0
Re: Advice please ..
« Reply #10 on: January 03, 2005, 10:26:05 AM »
What do you guys think about running ssh on a non-standard port ie 222. I'm just getting sick and tired of these ssh login attempts. I've also dropped the LoginGraceTime down to 30 secs from the default 10mins but I also think it would stop a lot of these attempts if the server wasn't listening on the standard port. I'm going to try it for a day and see if it cuts the traffic down a bit. Any opinions??

Offline tiwang

  • **
  • 21
  • +0/-0
Advice please ..
« Reply #11 on: January 03, 2005, 10:40:48 AM »
You don't get any benefits by moving the port to another number - it is still open - lock it down with a ip-filter instead. If you are using a VPN connection lock this down also - generally lock it with ip-filters if you don't have a firewall/NAT router in front of it.
/regards tiwang
...

Offline ldkeen

  • *
  • 403
  • +0/-0
Advice please ..
« Reply #12 on: January 03, 2005, 10:53:46 AM »
Hi Tiwang,
thanks for the reply

Quote from: "tiwang"
You don't get any benefits by moving the port to another number - it is still open

I was under the impression that most of these ssh login attempts are automated and that they mostly try the default port of 22. If the server was listening on a different port surely it would dramatically cut down these login attempts. You are probably right about ip-filters but this can be very complex and I was after a simple fix to cut down the majority of attempts. Thanks again
Lloyd

Garfield

Advice please ..
« Reply #13 on: January 03, 2005, 03:06:39 PM »
Quote from: "ldkeen"
I was under the impression that most of these ssh login attempts are automated and that they mostly try the default port of 22. If the server was listening on a different port surely it would dramatically cut down these login attempts.

Maybe, but a lot of people are simply using a port scanner to scan which ports are opened and then try to login / see what is running behind those ports. So simply moving the (any) service to another port alone is not good enough.

Offline raem

  • *
  • 3,972
  • +4/-0
Advice please ..
« Reply #14 on: January 08, 2005, 11:14:44 AM »
ADG
re ssh private & public keys

> do you have a link to more information on that?

This very good HOWTO has all the answers you need
http://www.wellsi.com/sme/ssh/ssh.html
...