免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
1234下一页
最近访问板块 发新帖
查看: 5434 | 回复: 37
打印 上一主题 下一主题

[网络管理] 服务器被攻击了,烦请帮忙看下 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-06-13 20:26 |只看该作者 |倒序浏览
本帖最后由 chenshouqi2003 于 2012-06-13 20:29 编辑

服务器环境:centos5.4; 服务器设置iptables 只有特定的一个IP可以访问远程端口,其余任何IP禁止访问。  服务器只开了apache服务
状况:lastb命令打印出来的信息如下
gopher   ssh:notty    211.139.10.155   Tue Jun  5 18:02 - 18:02  (00:00)   
rpc      ssh:notty    211.139.10.155   Tue Jun  5 18:02 - 18:02  (00:00)   
rpcuser  ssh:notty    211.139.10.155   Tue Jun  5 18:02 - 18:02  (00:00)   
nfsnobod ssh:notty    211.139.10.155   Tue Jun  5 18:02 - 18:02  (00:00)   
mailnull ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
workshop ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
workshop ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
desktop  ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
desktop  ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
aptproxy ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
aptproxy ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
popa3d   ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
popa3d   ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
divine   ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
divine   ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
harrypot ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
harrypot ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
radiomai ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
radiomai ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
snort    ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
snort    ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
james    ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
james    ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
dan      ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
dan      ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
frank    ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
frank    ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
zzz      ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
zzz      ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
sys      ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
sys      ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
proxy    ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
proxy    ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
eleve    ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
eleve    ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
list     ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
list     ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
irc      ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
irc      ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
jeff     ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
jeff     ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
gnats    ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
gnats    ssh:notty    211.139.10.155   Tue Jun  5 18:01 - 18:01  (00:00)   
eppc     ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
eppc     ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
qtss     ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
qtss     ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
appserve ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
clamav   ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
clamav   ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
amavisd  ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
amavisd  ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
jabber   ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
jabber   ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
xgridcon ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
xgridcon ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
agent    ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
agent    ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
xgridage ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
xgridage ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
appowner ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
appowner ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
windowse ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
windowse ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
tokend   ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
tokend   ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
security ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
security ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
unknown  ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
unknown  ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
dean     ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
dean     ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
smmsp    ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
uucp     ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
halt     ssh:notty    211.139.10.155   Tue Jun  5 18:00 - 18:00  (00:00)   
shutdown ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
sync     ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
lp       ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
daemon   ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
bin      ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
admins   ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
admins   ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
admins   ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
admins   ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
users    ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
users    ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
sshd     ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
sgi      ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
sgi      ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
operator ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
rpm      ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
rpm      ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
amanda   ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
amanda   ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
party    ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
party    ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
richard  ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
richard  ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
robert   ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
robert   ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
sara     ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
sara     ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
search   ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
search   ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
ssh      ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
ssh      ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
steven   ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
steven   ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
sunny    ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
sunny    ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
susan    ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
susan    ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
webpop   ssh:notty    211.139.10.155   Tue Jun  5 17:59 - 17:59  (00:00)   
webpop   ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
ident    ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
ident    ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
adm      ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
mail     ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
pgsql    ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
pgsql    ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
games    ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
angel    ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
angel    ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
news     ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
john     ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
john     ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
george   ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
george   ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
richard  ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
richard  ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
stephen  ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
stephen  ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
adam     ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
adam     ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
wwwrun   ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
wwwrun   ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
www      ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
www      ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
web      ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
web      ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
sales    ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
sales    ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
shop     ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
shop     ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
info     ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
info     ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
backup   ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
backup   ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
root     ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
nobody   ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
pop      ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
pop      ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
httpd    ssh:notty    211.139.10.155   Tue Jun  5 17:58 - 17:58  (00:00)   
httpd    ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
http     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
http     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
www-data ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
www-data ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
data     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
data     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
alan     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
alan     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
mike     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
mike     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
brett    ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
brett    ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
alex     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
alex     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
danny    ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
danny    ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
root     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
root     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
root     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
test     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
test     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
admin    ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
admin    ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
root     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
user     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
user     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
username ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
username ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
webmaste ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
webmaste ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
test     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
test     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
root     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
root     ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
admin    ssh:notty    211.139.10.155   Tue Jun  5 17:57 - 17:57  (00:00)   
admin    ssh:notty    211.139.10.155   Tue Jun  5 17:56 - 17:56  (00:00)   
admin    ssh:notty    211.139.10.155   Tue Jun  5 17:56 - 17:56  (00:00)   
  
  这是其中一个IP的信息。类似连接约有30个IP。
以下是/var/log/secure日志:
Jun 13 15:42:35 localhost sshd[21648]: Received disconnect from 211.153.18.252: 11: Bye Bye
Jun 13 15:42:35 localhost sshd[21649]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=211.153.18.252  user=root
Jun 13 15:42:37 localhost sshd[21649]: Failed password for root from 211.153.18.252 port 45161 ssh2
Jun 13 15:42:37 localhost sshd[21650]: Received disconnect from 211.153.18.252: 11: Bye Bye
Jun 13 15:42:37 localhost sshd[21651]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=211.153.18.252  user=root
Jun 13 15:42:40 localhost sshd[21651]: Failed password for root from 211.153.18.252 port 45495 ssh2
Jun 13 15:42:40 localhost sshd[21652]: Received disconnect from 211.153.18.252: 11: Bye Bye
Jun 13 15:42:40 localhost sshd[21653]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=211.153.18.252  user=root
Jun 13 15:42:41 localhost sshd[21653]: Failed password for root from 211.153.18.252 port 45899 ssh2
Jun 13 15:42:41 localhost sshd[21654]: Received disconnect from 211.153.18.252: 11: Bye Bye
Jun 13 15:42:41 localhost sshd[21655]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=211.153.18.252  user=root
Jun 13 15:42:43 localhost sshd[21655]: Failed password for root from 211.153.18.252 port 46186 ssh2
Jun 13 15:42:43 localhost sshd[21656]: Received disconnect from 211.153.18.252: 11: Bye Bye
Jun 13 15:42:43 localhost sshd[21657]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=211.153.18.252  user=root
Jun 13 15:42:46 localhost sshd[21657]: Failed password for root from 211.153.18.252 port 46521 ssh2
Jun 13 15:42:46 localhost sshd[21658]: Received disconnect from 211.153.18.252: 11: Bye Bye
Jun 13 15:42:46 localhost sshd[21659]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=211.153.18.252  user=root
Jun 13 15:42:48 localhost sshd[21659]: Failed password for root from 211.153.18.252 port 46926 ssh2
Jun 13 15:42:48 localhost sshd[21660]: Received disconnect from 211.153.18.252: 11: Bye Bye
Jun 13 15:42:48 localhost sshd[21661]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=211.153.18.252  user=root
Jun 13 15:42:50 localhost sshd[21661]: Failed password for root from 211.153.18.252 port 47279 ssh2
Jun 13 15:42:50 localhost sshd[21662]: Received disconnect from 211.153.18.252: 11: Bye Bye
Jun 13 15:42:50 localhost sshd[21663]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=211.153.18.252  user=root
Jun 13 15:42:52 localhost sshd[21663]: Failed password for root from 211.153.18.252 port 47696 ssh2
Jun 13 15:42:52 localhost sshd[21664]: Received disconnect from 211.153.18.252: 11: Bye Bye
这是其中一个IP的访问日志,提示密码输入错误
服务器iptables设置:/var/sysconfig/iptables显示
*filter
:INPUT DROP [5522:601767]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [5:420]
-A INPUT -s XXX.XXX.XXX.XXX/255.255.255.0 -p tcp -j ACCEPT
-A INPUT -s XXX.XXX.XXX.XXX/255.255.255.0 -p udp -j ACCEPT
-A INPUT -s XXX.XXX.XXX.XXX -p tcp -j ACCEPT
-A INPUT -s XXX.XXX.XXX.XXX -p udp -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p udp -m udp --dport 80 -j ACCEPT
-A INPUT -s XXX.XXX.XXX.XXX -p udp -m udp --dport 22 -j ACCEPT
-A INPUT -s XXX.XXX.XXX.XXX -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -s XXX.XXX.XXX.XXX/255.255.255.0 -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -s XXX.XXX.XXX.XXX/255.255.255.0 -p udp -m udp --dport 22 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p udp -m udp --dport 80 -j ACCEPT
-A INPUT -s XXX.XXX.XXX.XXX/255.255.255.0 -i eth1 -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A INPUT -s XXX.XXX.XXX.XXX -i eth1 -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A INPUT -s XXX.XXX.XXX.XXX -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -s XXX.XXX.XXX.XXX -p udp -m udp --dport 22 -j ACCEPT
-A OUTPUT -p tcp -j ACCEPT
-A OUTPUT -p udp -j ACCEPT
COMMIT

问题:他们是怎么绕过iptables直接访问22端口的?或者我的iptables设置有什么错误?

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
2 [报告]
发表于 2012-06-13 22:06 |只看该作者
Lastb is the same as last, except that by default it shows a log of the
       file /var/log/btmp, which contains all the bad login attempts.

对方没有登录进你的系统,认证失败了.
你用w和last命令检查下最近登录的用户吧.
另外,建议你ssh用key登录,修改sshd_config,在里面关闭passwd认证

论坛徽章:
0
3 [报告]
发表于 2012-06-14 02:07 |只看该作者
参考这个安全设置吧
http://blog.163.com/a12333a_li/blog/static/875942852011676849638/

看后面的即可。

论坛徽章:
0
4 [报告]
发表于 2012-06-14 09:26 |只看该作者
sshd_config 我只是修改了远程端口。因为我们的机制不好做key登录。服务器上有数据库和CDN图片源等资料。其它机器需要访问。如果全部用key的话。不需要密码 那我们所有机器都串一起了。如果其中一台被破解了密码 登录了。所有机器都会被登录进去

论坛徽章:
0
5 [报告]
发表于 2012-06-14 09:28 |只看该作者
last是没看到登录成功的。但是让他这样一直尝试下去也不是办法啊。主要问题是 他是怎么绕过iptables直接访问22端口的

论坛徽章:
21
白羊座
日期:2013-08-23 15:49:17金牛座
日期:2013-10-08 17:00:03处女座
日期:2013-10-12 11:54:11CU十二周年纪念徽章
日期:2013-10-24 15:41:34午马
日期:2013-11-27 14:07:21巨蟹座
日期:2013-12-04 10:56:03水瓶座
日期:2013-12-04 15:58:00亥猪
日期:2014-05-24 16:02:3115-16赛季CBA联赛之辽宁
日期:2016-11-07 13:52:53戌狗
日期:2013-08-23 16:15:31白羊座
日期:2013-08-24 21:59:24巨蟹座
日期:2013-08-25 16:34:24
6 [报告]
发表于 2012-06-14 09:59 |只看该作者
只是尝试登陆了,登陆没登陆进去还得进一步查看.用last 看看有没有异常的ip登陆过.

论坛徽章:
0
7 [报告]
发表于 2012-06-14 10:02 |只看该作者
本帖最后由 abc3w 于 2012-06-14 10:03 编辑

看看iptables -L -n 输出
看看ifconfig 输出

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
8 [报告]
发表于 2012-06-14 10:14 |只看该作者
楼主试试用fail2ban吧,自动封禁试探密码的ip

论坛徽章:
0
9 [报告]
发表于 2012-06-14 10:15 |只看该作者
本帖最后由 chenshouqi2003 于 2012-06-14 10:19 编辑

iptables 很正常的
也尝试过 在除了特定能访问的IP外。其它任何IP都不能访问22端口

论坛徽章:
0
10 [报告]
发表于 2012-06-14 10:19 |只看该作者
本帖最后由 chenshouqi2003 于 2012-06-14 10:20 编辑

fail2ban  这条命令没用过。可以限制试密码的次数吗?比如说如果连续3次错误就封了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP