add fail2ban to prevent ssh bruteforcing
Since a phone in developer mode is listening on port 22 for ssh on all interfaces (yes also on the 3g/LTE interface), bots are trying to bruteforce the login. At the moment it seems to only hit the root user and yes that is pretty futile, but we have seen bigger attacks where other user names where used earlier, so it's just a question of time before they will bruteforce the login for the nemo user as well.
Feb 05 13:22:47 awesomephone sshd[8341]: Failed password for root from 61.147.107.83 port 4565 ssh2
Feb 05 13:22:49 awesomephone sshd[8338]: Failed password for root from 61.147.107.83 port 3937 ssh2
Feb 05 13:22:52 awesomephone sshd[8338]: Failed password for root from 61.147.107.83 port 3937 ssh2
Feb 05 13:22:52 awesomephone sshd[8341]: Failed password for root from 61.147.107.83 port 4565 ssh2
I would therefor suggest having fail2ban or something similar, that would block ip's with more than X amount of failed logins.
edit: As proposed in the comments. An solution could also be to have sshd only listen on the wlan/usb device and not the wwan device. Even better would be if one could limit it to a specific wireless network. But i guess that could be error prone and one would not be able to use SSH to safe ones butt when the UI is unresponve(/broken by patches).
where is this log?
lukedirtwalker ( 2014-02-05 19:05:58 +0200 )edit(yes also on the 3g/LTE interface): According to my understanding, most mobile providers allocate IP numbers from private address ranges to their customers and do not allow direct inter-user-communication. Therefore for most users the threat is only of theoretical nature at the moment regarding the 2G/3G/4G interface.
Nonetheless: Brute force attacks should be stopped by the operating system.
jgr ( 2014-02-05 19:40:47 +0200 )editWith the upcoming IPv6 Implementation, more devices may end up with a direct connection to the Internet. Of course, this also leads to new attack vectors (like changing your IPv6-Address after every login attempt)
Cmdr_Zod ( 2014-02-05 21:40:34 +0200 )editi agree with ipv6 this will be an issue for more ppl. my isp gives me a public routable ip so i have this problem today.
you can find rhe log by writing journalctl
slaveriq ( 2014-02-05 23:50:47 +0200 )editWould it be possible to activate the ssh deamon only for usb connections for example? or does the deamon automatically listen to any connection type?
shfit ( 2014-03-09 20:02:38 +0200 )edit