Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[ssh] un poste ne marche pas a la maison
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
pathfinder
l33t
l33t


Joined: 19 Jan 2006
Posts: 731
Location: Barcelona, Spain

PostPosted: Mon Mar 26, 2007 10:59 pm    Post subject: [ssh] un poste ne marche pas a la maison Reply with quote

bonsoir,

alors voila. mon poste principal est milkyway. sous gentoo. je peux m y connecter depuis n importe ou (exterieur ou interieur du reseau).
enfin presque.
depuis ma machine en gentoo du labo, atlantis, impecc.
depuis mon portable, pathfinder (le tout premier a avoir une gentoo), que ce soit dans le labo ou chez moi (donc en local), impecc aussi.
depuis un autre labo dans une autre fac, impecc aussi.
mais ma copine, windows... ca devient curieux:

je ne peux pas me connecter depuis son poste portable windows (SSHWInClent) en local (ni en externe).
pourtant je peux me connecter depuis son meme poste sur les labos. je pige pas ou est le probleme.
vous pourriez me dire ou ca coince?

voila un peu de details:
Quote:
$ sudo ifconfig
eth0 Link encap:Ethernet HWaddr 00:07:E9:E8:BA:F4
inet addr:192.168.1.35 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2684 errors:0 dropped:0 overruns:0 frame:0
TX packets:3008 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2390948 (2.2 Mb) TX bytes:593086 (579.1 Kb)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:100 (100.0 b) TX bytes:100 (100.0 b)



son PC depuis ligne de commande windows CMD me dit que son IP c est
192.168.1.2

alors j ai mis comme nom de machine dans son windows: voyager (et oui, on garde le meme theme), je ne sais pas du tout quel groupe il fut mettre j ai donc laissé MSHOME, et voila mon /etc/hosts. (j ai jamais eu a me preoccuper de ca auparavant)

Quote:
# /etc/hosts: This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server. Just add the names, addresses
# and any aliases to this file...
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/hosts,v 1.8 2003/08/04 20:12:25 azarah Exp $
#

127.0.0.1 localhost
192.168.1.35 milkyway.chezmoi.dyndns.org milkyway mon poste principal
192.168.1.38 pathfinder.chezmoi.dyndns.org pathfinder mon portable
192.168.1.2 voyager.chezmoi.dyndns.org voyager AVEC OU SANS CETTE LIGNE CA NE MARCHE PAS

_________________
Cuando un tonto coge un camino, el camino se acaba, pero el tonto sigue
Back to top
View user's profile Send private message
geekounet
Bodhisattva
Bodhisattva


Joined: 11 Oct 2004
Posts: 3772
Location: Wellington, Aotearoa

PostPosted: Tue Mar 27, 2007 9:46 am    Post subject: Reply with quote

Ça donne quelle erreur quand tu essaie de t'y connecter ?
Back to top
View user's profile Send private message
loopx
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2787
Location: Belgium / Liège

PostPosted: Tue Mar 27, 2007 9:55 am    Post subject: Reply with quote

Donc, les 2 pc qui sont sencé pouvoir communiquer sont sur le meme reso ?

Donc, un ping avec le nom de domaine complet ou le nom de la machine (a partir de windows) doit fonctionner ???

Si oui, qu'elle est l'erreur de ssh ???


Tu peux tester un telnet histoire de voir si tu arrives à acceder au port:

Code:

loop-nb loopx # telnet localhost 22
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SSH-2.0-OpenSSH_4.5

Protocol mismatch.
Connection closed by foreign host.


Remplace localhost par l'ip ou le nom ou le nom de domaine complet du pc cible ...
Fait gaff que sous windows, si tu utilises le nom, ca risque de pas marcher... Par contre, le nom complet pourrait mieux fonctionner ... UNIQUEMENT SI tu as un serveur DNS AVEC une configuration pour ton reso local (si tu demande une machine qui est inconnue à ton serveur DNS, il tenverra bouler ... meme avec le nom complet... On ne configure pas un DNS dans un serveur en y placant le nom dans /etc/host ! )


Essaye avec ping... le nom et le nom complet ... si ca marche pas, essaye avec l'ip, ca marchera mieux...

Note encore que si le domaine et ton DNS existe et son bien régler, c'est peut etre un problème au niveau de Windows: si tu ping avec le nom simple de la machine, il va rajouter le domaine sur lequel il est ... et parfois, le domaine est pas réglé dans windows (ex: configuration manuel et non automatique de la carte réso). Dans ce cas, seul le nom complet du domaine fonctionnera ;)

Ah, j'en profite pour foutre la honte à windows... Et oui... Il faut redémarrer la machine pour changer le nom de domaine .......
_________________
Mon MediaWiki perso : http://pix-mania.dyndns.org
Back to top
View user's profile Send private message
pathfinder
l33t
l33t


Joined: 19 Jan 2006
Posts: 731
Location: Barcelona, Spain

PostPosted: Wed Mar 28, 2007 9:41 am    Post subject: Reply with quote

pardon pour ce retard... d autres sujets etaient plus importants...

il n y a pas d erreur: en realte, il me demande mon password, (je le tape correctement), puis me le redemande, et ainsi de suite...
Le ping depuis CMD marche vers ma machine centrale. (en mettant l IP du reseau interne, 192.168.1.2)
mais si je mets l IP a lquelle le ping repond.... (ci dessus), il y a erreur (host inexistant ou mauvais protocole? je sais plus, j ai plus le PC sous less yeux, et il est "parti" avec ma cherie)

desole pour si peu de details...

les 2 PC sont sur le meme reseau?:--.... euh... ils sont raccordes au meme routeur chez moi, en DHCP automatique, sauf que si ceux en Linux ont des addresses 192.168.1.35, 36, 37, 38... sous win, c est 2 le dernier chiffre.
sont ils sur le meme reseau?

Quel nom de groupe dois-je mettre sous windows?
_________________
Cuando un tonto coge un camino, el camino se acaba, pero el tonto sigue
Back to top
View user's profile Send private message
nico_calais
l33t
l33t


Joined: 09 Jun 2005
Posts: 628
Location: Saint Julien en Genevois

PostPosted: Wed Mar 28, 2007 12:20 pm    Post subject: Reply with quote

Quote:
sont ils sur le meme reseau?


EDIT : S'ils sont derriere ton routeur, ils sont sur le même réseau local.


A partir de quel nom d'utilisateur tu essaies de te connecter en ssh ?
Le truc, c'est que par défaut, lorsque tu fais "ssh trucmuche", tu te connectes avec le nom d'utilisateur du client. Donc si sur ton serveur, ce om n'existe pas, tu pourras jamais te connecter dessus.
Donc, pour te connecter avec le bon nom d'utilisateur : ssh utilisateur_serveur@trucmuche

Il se peut aussi que tu essaies de te donnecter en root et que sur ton serveur ssh soit configuré pour interdir toute connexion à partir du compte root.
_________________
"Unix IS user friendly... It's just selective about who its friends are." — Tollef Fog Heen tollef@add.no


Last edited by nico_calais on Wed Mar 28, 2007 12:25 pm; edited 1 time in total
Back to top
View user's profile Send private message
Bapt
Veteran
Veteran


Joined: 14 Apr 2003
Posts: 1152
Location: Paris

PostPosted: Wed Mar 28, 2007 12:23 pm    Post subject: Reply with quote

Es tu sur que la connexion en ssh fonctionne (ie log ssh dans /var/log/messages)
Si oui il dois au même endroit te dire pourquoi il refuse la connexion et te demande de repasser ton mdp.
Back to top
View user's profile Send private message
pathfinder
l33t
l33t


Joined: 19 Jan 2006
Posts: 731
Location: Barcelona, Spain

PostPosted: Wed Mar 28, 2007 1:37 pm    Post subject: Reply with quote

Quote:
Feb 25 20:15:57 milkyway sshd[9257]: Did not receive identification string from 86.151.95.6
Feb 27 18:27:08 milkyway sshd[13021]: Did not receive identification string from 12.149.67.178
Feb 27 18:30:01 milkyway cron[13026]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )
Feb 27 18:34:51 milkyway sshd[13037]: Invalid user achim from 12.149.67.178
Feb 27 21:41:32 milkyway sshd[13285]: reverse mapping checking getaddrinfo for widom [171.66.183.114] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 21:41:32 milkyway sshd[13285]: Invalid user admin from 171.66.183.114
Feb 27 21:59:07 milkyway sshd[13578]: Did not receive identification string from 88.162.231.60
Feb 27 22:08:44 milkyway sshd[13600]: Invalid user a from 88.162.231.60
Feb 27 22:08:57 milkyway sshd[13605]: reverse mapping checking getaddrinfo for mar92 [88.162.231.60] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 22:08:57 milkyway sshd[13605]: Invalid user b from 88.162.231.60
Feb 27 23:14:52 milkyway sshd[15146]: Invalid user staff from 88.191.25.46
Feb 27 23:14:53 milkyway sshd[15151]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:14:53 milkyway sshd[15151]: Invalid user sales from 88.191.25.46
Feb 27 23:14:54 milkyway sshd[15156]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:14:54 milkyway sshd[15156]: Invalid user recruit from 88.191.25.46
Feb 27 23:14:55 milkyway sshd[15161]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:14:55 milkyway sshd[15161]: Invalid user alias from 88.191.25.46
Feb 27 23:14:58 milkyway sshd[15166]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:14:58 milkyway sshd[15166]: Invalid user office from 88.191.25.46
Feb 27 23:14:59 milkyway sshd[15171]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:14:58 milkyway sshd[15166]: Invalid user office from 88.191.25.46
Feb 27 23:14:59 milkyway sshd[15171]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:14:59 milkyway sshd[15171]: Invalid user samba from 88.191.25.46
Feb 27 23:15:00 milkyway sshd[15176]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:15:00 milkyway sshd[15176]: Invalid user tomcat from 88.191.25.46
Feb 27 23:15:01 milkyway sshd[15181]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:15:01 milkyway sshd[15181]: Invalid user webadmin from 88.191.25.46
Feb 27 23:15:01 milkyway sshd[15181]: Invalid user webadmin from 88.191.25.46
Feb 27 23:15:02 milkyway sshd[15186]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:15:02 milkyway sshd[15186]: Invalid user spam from 88.191.25.46
Feb 27 23:15:05 milkyway sshd[15191]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:15:05 milkyway sshd[15191]: Invalid user virus from 88.191.25.46
Feb 27 23:15:06 milkyway sshd[15196]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:15:06 milkyway sshd[15196]: Invalid user cyrus from 88.191.25.46
Feb 27 23:15:09 milkyway sshd[15201]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:15:09 milkyway sshd[15201]: Invalid user oracle from 88.191.25.46
Feb 27 23:15:10 milkyway sshd[15206]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:15:10 milkyway sshd[15206]: Invalid user michael from 88.191.25.46
Feb 27 23:15:11 milkyway sshd[15211]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:15:11 milkyway sshd[15211]: Invalid user ftp from 88.191.25.46
Feb 27 23:15:12 milkyway sshd[15216]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:15:12 milkyway sshd[15216]: Invalid user test from 88.191.25.46
Feb 27 23:15:13 milkyway sshd[15221]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:15:13 milkyway sshd[15221]: Invalid user webmaster from 88.191.25.46
Feb 27 23:15:14 milkyway sshd[15226]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:15:17 milkyway sshd[15231]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:15:18 milkyway sshd[15236]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:15:19 milkyway sshd[15241]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:15:19 milkyway sshd[15241]: Invalid user paul from 88.191.25.46
Feb 27 23:15:23 milkyway sshd[15246]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:15:24 milkyway sshd[15251]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:15:24 milkyway sshd[15251]: Invalid user guest from 88.191.25.46
Feb 27 23:15:25 milkyway sshd[15256]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 27 23:15:25 milkyway sshd[15256]: Invalid user admin from 88.191.25.46
Feb 27 23:15:26 milkyway sshd[15261]: reverse mapping checking getaddrinfo for sd [88.191.25.46] failed - POSSIBLE BREAK-IN ATTEMPT!

ET IL Y EN A DES TONNES!
C EST QUOI CA!?!????
Mar 2 10:25:59 milkyway sshd[11412]: Invalid user staff from 196.33.120.8
Mar 2 10:26:02 milkyway sshd[11417]: Invalid user sales from 196.33.120.8
Mar 2 10:26:06 milkyway sshd[11422]: Invalid user recruit from 196.33.120.8
Mar 2 10:26:09 milkyway sshd[11427]: Invalid user alias from 196.33.120.8
Mar 2 10:26:13 milkyway sshd[11432]: Invalid user office from 196.33.120.8
Mar 2 10:26:16 milkyway sshd[11437]: Invalid user samba from 196.33.120.8
Mar 2 10:26:21 milkyway sshd[11442]: Invalid user tomcat from 196.33.120.8
Mar 2 10:26:24 milkyway sshd[11447]: Invalid user webadmin from 196.33.120.8
Mar 2 10:26:27 milkyway sshd[11452]: Invalid user spam from 196.33.120.8
Mar 2 10:26:31 milkyway sshd[11457]: Invalid user virus from 196.33.120.8
Mar 2 10:26:34 milkyway sshd[11462]: Invalid user cyrus from 196.33.120.8
Mar 2 10:26:37 milkyway sshd[11467]: Invalid user oracle from 196.33.120.8
Mar 2 10:26:41 milkyway sshd[11472]: Invalid user michael from 196.33.120.8
Mar 2 10:26:44 milkyway sshd[11477]: Invalid user ftp from 196.33.120.8
Mar 2 10:26:47 milkyway sshd[11482]: Invalid user test from 196.33.120.8
Mar 2 10:26:50 milkyway sshd[11487]: Invalid user webmaster from 196.33.120.8
Mar 2 10:27:05 milkyway sshd[11507]: Invalid user paul from 196.33.120.8
Mar 2 10:27:12 milkyway sshd[11517]: Invalid user guest from 196.33.120.8
Mar 2 10:27:16 milkyway sshd[11522]: Invalid user admin from 196.33.120.8
Mar 4 17:17:55 milkyway sshd[15742]: Invalid user george from 66.219.41.227
Mar 4 17:17:57 milkyway sshd[15747]: Invalid user john from 66.219.41.227
Mar 4 17:18:00 milkyway sshd[15757]: Invalid user angel from 66.219.41.227
Mar 4 17:18:04 milkyway sshd[15767]: Invalid user pgsql from 66.219.41.227
Mar 4 17:18:10 milkyway sshd[15782]: Invalid user ident from 66.219.41.227
Mar 4 17:18:11 milkyway sshd[15787]: Invalid user webpop from 66.219.41.227
Mar 4 17:18:13 milkyway sshd[15792]: Invalid user susan from 66.219.41.227
Mar 4 17:18:15 milkyway sshd[15797]: Invalid user sunny from 66.219.41.227
Mar 4 17:18:17 milkyway sshd[15802]: Invalid user steven from 66.219.41.227
Mar 4 17:18:19 milkyway sshd[15807]: Invalid user ssh from 66.219.41.227
Mar 4 17:18:20 milkyway sshd[15812]: Invalid user search from 66.219.41.227
Mar 4 17:18:22 milkyway sshd[15817]: Invalid user sara from 66.219.41.227
Mar 4 17:18:24 milkyway sshd[15822]: Invalid user robert from 66.219.41.227
Mar 4 17:18:26 milkyway sshd[15827]: Invalid user richard from 66.219.41.227
Mar 4 17:18:28 milkyway sshd[15832]: Invalid user party from 66.219.41.227
Mar 4 17:18:30 milkyway sshd[15837]: Invalid user amanda from 66.219.41.227
Mar 4 17:18:31 milkyway sshd[15842]: Invalid user rpm from 66.219.41.227
Mar 4 17:18:35 milkyway sshd[15852]: Invalid user sgi from 66.219.41.227
Mar 4 17:18:39 milkyway sshd[15862]: Invalid user users from 66.219.41.227
Mar 4 17:18:41 milkyway sshd[15867]: Invalid user admins from 66.219.41.227
Mar 4 17:18:42 milkyway sshd[15872]: Invalid user admins from 66.219.41.227
Mar 4 17:18:59 milkyway sshd[15917]: Invalid user dean from 66.219.41.227
Mar 4 17:19:01 milkyway sshd[15922]: Invalid user unknown from 66.219.41.227
Mar 4 17:19:03 milkyway sshd[15927]: Invalid user securityagent from 66.219.41.227
Mar 4 17:19:04 milkyway sshd[15932]: Invalid user tokend from 66.219.41.227
Mar 4 17:19:06 milkyway sshd[15937]: Invalid user windowserver from 66.219.41.227
Mar 4 17:19:08 milkyway sshd[15942]: Invalid user appowner from 66.219.41.227
Mar 4 17:19:10 milkyway sshd[15947]: Invalid user xgridagent from 66.219.41.227
Mar 4 17:19:12 milkyway sshd[15952]: Invalid user agent from 66.219.41.227
Mar 4 17:19:14 milkyway sshd[15957]: Invalid user xgridcontroller from 66.219.41.227
Mar 4 17:19:16 milkyway sshd[15962]: Invalid user jabber from 66.219.41.227
Mar 4 17:19:17 milkyway sshd[15967]: Invalid user amavisd from 66.219.41.227
Mar 4 17:19:19 milkyway sshd[15972]: Invalid user clamav from 66.219.41.227
Mar 4 17:19:21 milkyway sshd[15977]: Invalid user appserver from 66.219.41.227
Mar 4 17:19:23 milkyway sshd[15982]: Invalid user mailman from 66.219.41.227
Mar 4 17:19:25 milkyway sshd[15987]: Invalid user cyrusimap from 66.219.41.227
Mar 4 17:19:26 milkyway sshd[15992]: Invalid user qtss from 66.219.41.227
Mar 4 17:19:28 milkyway sshd[15997]: Invalid user eppc from 66.219.41.227
Mar 4 17:19:30 milkyway sshd[16002]: Invalid user telnetd from 66.219.41.227
Mar 4 17:19:32 milkyway sshd[16007]: Invalid user identd from 66.219.41.227
Mar 4 17:19:34 milkyway sshd[16012]: Invalid user gnats from 66.219.41.227
Mar 4 17:19:36 milkyway sshd[16017]: Invalid user jeff from 66.219.41.227
Mar 4 17:19:38 milkyway sshd[16022]: Invalid user irc from 66.219.41.227
Mar 4 17:19:39 milkyway sshd[16027]: Invalid user list from 66.219.41.227
Mar 4 17:19:41 milkyway sshd[16032]: Invalid user eleve from 66.219.41.227
Mar 4 17:19:43 milkyway sshd[16037]: Invalid user proxy from 66.219.41.227
Mar 4 17:19:45 milkyway sshd[16042]: Invalid user sys from 66.219.41.227
Mar 4 17:19:47 milkyway sshd[16047]: Invalid user zzz from 66.219.41.227
Mar 4 17:19:48 milkyway sshd[16052]: Invalid user frank from 66.219.41.227
Mar 4 17:19:50 milkyway sshd[16057]: Invalid user dan from 66.219.41.227
Mar 4 17:19:52 milkyway sshd[16062]: Invalid user james from 66.219.41.227
Mar 4 17:19:54 milkyway sshd[16067]: Invalid user snort from 66.219.41.227

Mar 5 23:02:15 milkyway sshd[7336]: Did not receive identification string from 85.131.202.32
Mar 5 23:09:28 milkyway sshd[7340]: Invalid user test from 85.131.202.32


bon j arrete
en rouge je dirais que c est le message qui nous concerne...
le reste... ca m inquiete, .... je fais quoi?
_________________
Cuando un tonto coge un camino, el camino se acaba, pero el tonto sigue


Last edited by pathfinder on Wed Mar 28, 2007 1:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
pathfinder
l33t
l33t


Joined: 19 Jan 2006
Posts: 731
Location: Barcelona, Spain

PostPosted: Wed Mar 28, 2007 1:38 pm    Post subject: Reply with quote

sinon je sais que le user est moi
j utilise constamment ssh et j ai tente en root et en user MOI et en user user2- rien a faire...
_________________
Cuando un tonto coge un camino, el camino se acaba, pero el tonto sigue
Back to top
View user's profile Send private message
Bapt
Veteran
Veteran


Joined: 14 Apr 2003
Posts: 1152
Location: Paris

PostPosted: Wed Mar 28, 2007 1:43 pm    Post subject: Reply with quote

Tous tes logs c'est des attaques brute force sur ssh, tu ferai bien de mettre un firewall avec anti brute force. Je ne sais pas le faire sous iptables (J'aime pas me faire mal à la tête, donc j'utilise pf sous OpenBSD), mais je sais que ça se fait. Concernant ton erreur en rouge je ne voie pas, mais il semblerait bien que tu essaye de te connecter avec le user "test" c'est normale ?
Back to top
View user's profile Send private message
pathfinder
l33t
l33t


Joined: 19 Jan 2006
Posts: 731
Location: Barcelona, Spain

PostPosted: Wed Mar 28, 2007 1:53 pm    Post subject: Reply with quote

hein!?
mettre un firewall avec antibrute force? je pige rien!
je n ai pas de firewall a part sur le routeur... c est reloud, a chaque fois un nouveau truc.
je fais comment alors?
_________________
Cuando un tonto coge un camino, el camino se acaba, pero el tonto sigue
Back to top
View user's profile Send private message
Bapt
Veteran
Veteran


Joined: 14 Apr 2003
Posts: 1152
Location: Paris

PostPosted: Wed Mar 28, 2007 1:58 pm    Post subject: Reply with quote

regarde ça : http://mysecureshell.sourceforge.net/fr/securessh.html en Français.

Premier lien intéressant sur google (brute force iptables) mais des utilisateurs de iptables ici t'expliqueront mieux que moi.

Concernant ton problème initial, est ce normal que tu tente de connecter en tant qu'utilisateur "test"
Back to top
View user's profile Send private message
pathfinder
l33t
l33t


Joined: 19 Jan 2006
Posts: 731
Location: Barcelona, Spain

PostPosted: Wed Mar 28, 2007 2:19 pm    Post subject: Reply with quote

ok
je lisais un how to iptables avec gentoo... en fait 2: le newbies et le complet...
une derniere petite question: ils ont reussi a rentrer? (je lis de ce pas le tuto)

pour mon probleme,... non, non, non, jamais je n ai tente de me loguer en TEST, je tente toujours avec mon username. c est bizarre.
_________________
Cuando un tonto coge un camino, el camino se acaba, pero el tonto sigue
Back to top
View user's profile Send private message
Bapt
Veteran
Veteran


Joined: 14 Apr 2003
Posts: 1152
Location: Paris

PostPosted: Wed Mar 28, 2007 2:39 pm    Post subject: Reply with quote

pathfinder wrote:
une derniere petite question: ils ont reussi a rentrer? (je lis de ce pas le tuto)

Apparemment pas
pathfinder wrote:
pour mon probleme,... non, non, non, jamais je n ai tente de me loguer en TEST, je tente toujours avec mon username. c est bizarre.

Bah c'est de ce côté là que ce pose ton problème, donc tu côté client. Essaye avec putty pour voir et si tu veux garder le client que tu utilise actuellement regarde sa conf, mais ta gentoo n'a rien à voir avec le problème.
Back to top
View user's profile Send private message
pathfinder
l33t
l33t


Joined: 19 Jan 2006
Posts: 731
Location: Barcelona, Spain

PostPosted: Wed Mar 28, 2007 3:23 pm    Post subject: Reply with quote

ok je puttye.
et je place mon firewall avec iptables, et je sens les merdes avec mes connections ssh mon routeur, l exterieur, amule, etc...
m enfin on verra
_________________
Cuando un tonto coge un camino, el camino se acaba, pero el tonto sigue
Back to top
View user's profile Send private message
pathfinder
l33t
l33t


Joined: 19 Jan 2006
Posts: 731
Location: Barcelona, Spain

PostPosted: Wed Mar 28, 2007 4:37 pm    Post subject: Reply with quote

putty ne marche pas.
j avais deja essaye
_________________
Cuando un tonto coge un camino, el camino se acaba, pero el tonto sigue
Back to top
View user's profile Send private message
Bapt
Veteran
Veteran


Joined: 14 Apr 2003
Posts: 1152
Location: Paris

PostPosted: Wed Mar 28, 2007 4:40 pm    Post subject: Reply with quote

pathfinder wrote:
putty ne marche pas.
j avais deja essaye


Et les logs qui vont avec, ca donne quoi ?
Back to top
View user's profile Send private message
pathfinder
l33t
l33t


Joined: 19 Jan 2006
Posts: 731
Location: Barcelona, Spain

PostPosted: Wed Mar 28, 2007 4:52 pm    Post subject: Reply with quote

Quote:
Mar 28 17:12:26 milkyway sshd[16681]: Did not receive identification string from 220.225.130.245
Mar 28 17:20:01 milkyway cron[16688]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )
Mar 28 17:21:41 milkyway sshd[16700]: Invalid user staff from 220.225.130.245


oups pardon...
_________________
Cuando un tonto coge un camino, el camino se acaba, pero el tonto sigue
Back to top
View user's profile Send private message
Bapt
Veteran
Veteran


Joined: 14 Apr 2003
Posts: 1152
Location: Paris

PostPosted: Wed Mar 28, 2007 5:12 pm    Post subject: Reply with quote

Ces lignes là ne correspondent à rien dans tes logs, c'est des tentatives de connexions depuis l'extérieure il nous faut les logs ayant pour ip ton ordi client.

De plus que te dit ton putty comme message ou que fait il quand tu dis qu'il ne marche pas ?
Back to top
View user's profile Send private message
pathfinder
l33t
l33t


Joined: 19 Jan 2006
Posts: 731
Location: Barcelona, Spain

PostPosted: Wed Mar 28, 2007 6:04 pm    Post subject: Reply with quote

putty me dit Access Denied

quand tu dis le message de log, c est bien la machine sur laquelle j essaie de me connecter, non?
parce que l autre est sous windows...
ca ne dit absolument rien dans la machine que j essaie de joindre au niveau de /var/log/messages
Quote:

Mar 28 19:50:01 milkyway cron[31927]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )
Mar 28 20:00:01 milkyway cron[31946]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )
Mar 28 20:00:01 milkyway cron[31948]: (root) CMD (rm -f /var/spool/cron/lastrun/cron.hourly)

sachant que le test je l ai fait a 20h01 ou 20:02 en heure locale...
dmesg ne registre rien non plus
_________________
Cuando un tonto coge un camino, el camino se acaba, pero el tonto sigue
Back to top
View user's profile Send private message
Bapt
Veteran
Veteran


Joined: 14 Apr 2003
Posts: 1152
Location: Paris

PostPosted: Wed Mar 28, 2007 6:16 pm    Post subject: Reply with quote

Donc tu n'arrives pas a te connecter du tout à ta machine,
que te donne la proposition de loopx (depuis le windows)
Code:
loop-nb loopx # telnet localhost 22
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SSH-2.0-OpenSSH_4.5

Protocol mismatch.
Connection closed by foreign host.
Back to top
View user's profile Send private message
pathfinder
l33t
l33t


Joined: 19 Jan 2006
Posts: 731
Location: Barcelona, Spain

PostPosted: Thu Mar 29, 2007 7:31 pm    Post subject: Reply with quote

je ne peux plus le faire maintenant car le PC de ma copine est pas la, et je veux plus le toucher, car mon portable et le PC du boulot sont tous les 2 morts cette semaine, et c est pas que je sois maudit, mais mieux vaut ne pas tenter le diable...


bon, je sais qu il y a plusieurs posts a ce sujets, et tous renvoient a d autres posts, mais moi je trouve pas la solution pour le brute forcing
http://blog.andrew.net.au/2005/02/16
il y a aussi le lien que tu m as file.


en fait, je cree une whitelist, c est ok avec -N.

puis je fais un iptables.bak avec le tuto de gentoo pour newbies (et en lisant aussi un peu le tuto complet)... car je veux pouvoir bloquer le plus vite possible ces attaques.
j ai fait un whois et contacte l ISP pour voir s ils peuvent faire quelque chose a ce niveau.
MAis j aimerais stopper immediatement ces conneries.


voila donc mon fichier /etc/iptables.bak
apres je fais un iptables-restore /iptables.bak
mais ca plante suivant l ajout des lignes contre le brutforcing...
je veux pas utiliser denyhosts et je veux pas prendre un script sur le web, je prefere la classic way avec iptables d autant que ca devrait marcher. Merci d en tenir compte dans vos reponses... meme si je suis pret a tout ecouter.

Quote:
# iptables-restore /etc/iptables.bak
iptables-restore v1.3.5: Couldn't load target `SSH_WHITELIST':/lib/iptables/libipt_SSH_WHITELIST.so: cannot open shared object file: No such file or directory

Error occurred at line: 18
Try `iptables-restore -h' or 'iptables-restore --help' for more information


OK ca c est parce que la whitelist il connait pas ou elle est vide.
Quote:
# ls /lib/iptables/libipt_S*
/lib/iptables/libipt_SAME.so /lib/iptables/libipt_SNAT.so


ce qui est normal, car...


Quote:
# Generated by iptables-save v1.2.11 on Tue May 10 08:06:58 2005
*filter
:INPUT ACCEPT [5:952]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [1192099:595387635]



# accept all from localhost
-A INPUT -s 127.0.0.1 -j ACCEPT

# accept all previously established connections
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

# ssh
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp --dport 22 -m state --state NEW -m recent --set --name SSH
-A INPUT -p tcp --dport 22 -m state --state NEW -j [color=red]SSH_WHITELIST

-A INPUT -p tcp --dport 22 -m state --state NEW -m recent --update --seconds 60 --hitcount 4 --rttl --name SSH -j ULOG --ulog-prefix SSH_brute_force
-A INPUT -p tcp --dport 22 -m state --state NEW -m recent --update --seconds 60 --hitcount 4 --rttl --name SSH -j DROP[/color]

# ftp / webserver related
-A INPUT -p tcp -m state --state NEW -m tcp --dport 20 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT

# Windows / Samba
-A INPUT -p tcp -m state --state NEW -m tcp --dport 137:139 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 426 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 445 -j ACCEPT

# up to 5 Bit-torrent connections
-A INPUT -p tcp -m state --state NEW -m tcp --dport 6881:6886 -j ACCEPT

# reject everything else
-A INPUT -j REJECT --reject-with icmp-port-unreachable

COMMIT
# Completed on Tue May 10 08:06:58 2005


les lignes en rouge font planter. soit il indique apres une erreur a la toute fin du fichier, soit il ne connait pas l option "recent" dans l instruction :
Quote:
# iptables -A SSH_WHITELIST -s milkyway -m recent --remove --name SSH -j ACCEPT
iptables: No chain/target/match by that name
milkyway #
milkyway # iptables -A SSH_WHITELIST -s $milkyway -m recent --remove --nam e SSH -j ACCEPT
Bad argument `recent'


du coup il peut pas creer la whitelist et donc il peut pas charger les regles correctes... mais je fais comment?
tout le monde indique la meme chose sur le web...
je sais pas quoi mettre dans "hosts". le hostname de ma machine est
Quote:
# hostname
milkyway
# domainname
(none)


dans les pages webs et tutoriaux, il y figure ceci:
Quote:
iptables -A SSH_WHITELIST -s $TRUSTED_HOST -m recent --remove --name SSH -j ACCEPT

je mets quoi en rouge?

Quote:
recent
Allows you to dynamically create a list of IP addresses and then match against that
list in a few different ways.

For example, you can create a `badguy' list out of people attempting to connect to
port 139 on your firewall and then DROP all future packets from them without consider-
ing them.

--name name
Specify the list to use for the commands. If no name is given then 'DEFAULT'
will be used.

[!] --set
This will add the source address of the packet to the list. If the source
address is already in the list, this will update the existing entry. This will
always return success (or failure if `!' is passed in).

[!] --rcheck
Check if the source address of the packet is currently in the list.

[!] --update
Like --rcheck, except it will update the "last seen" timestamp if it matches.

[!] --remove
Check if the source address of the packet is currently in the list and if so
that address will be removed from the list and the rule will return true. If
the address is not found, false is returned.


je vois pas pourquoi il accepte pas cette option...

des que je peux faire un telnet, je le fais!
_________________
Cuando un tonto coge un camino, el camino se acaba, pero el tonto sigue
Back to top
View user's profile Send private message
dapsaille
Advocate
Advocate


Joined: 02 Aug 2004
Posts: 2366
Location: Paris

PostPosted: Thu Mar 29, 2007 8:47 pm    Post subject: Reply with quote

J'ai lu en diagonale ce thread mais ...

tu est en lan .. et tu te fait bruteforcer ton linux ... et tu essaye de te logguer avec un windows ... heuu quitte à y aller franco (de port) teste un livecd windows sur la machine windows et utilise putty pour voir

ca sens la machine pourrie la ..

si ton linux est attaqué ton windows lui à sauté (tm)


Et heuu au fait tes users pourquoi ils ont des ip wan si tu es en lan ?? :wink:


Last edited by dapsaille on Thu Mar 29, 2007 9:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
boozo
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 3193

PostPosted: Thu Mar 29, 2007 9:06 pm    Post subject: Reply with quote

'alute

/me lu en diagonale également mais j'ai matché sur brute force et ssh : l'avez oublié lostcontrol et son fameux net-analyzer/fail2ban ? :wink:
_________________
" Un psychotique, c'est quelqu'un qui croit dur comme fer que 2 et 2 font 5, et qui en est pleinement satisfait.
Un névrosé, c'est quelqu'un qui sait pertinemment que 2 et 2 font 4, et ça le rend malade ! "
Back to top
View user's profile Send private message
pathfinder
l33t
l33t


Joined: 19 Jan 2006
Posts: 731
Location: Barcelona, Spain

PostPosted: Thu Mar 29, 2007 11:02 pm    Post subject: Reply with quote

tu est en lan .. et tu te fait bruteforcer ton linux ... et tu essaye de te logguer avec un windows ... heuu quitte à y aller franco (de port) teste un livecd windows sur la machine windows et utilise putty pour voir Quelle machine? le portable windows de ma copine a partir duquel ca passe pas en SSH depuis windows? ou sur le windows de ma machine a moi que j utilise essentiellement en linux?

ca sens la machine pourrie la .. pourrie =? et laquelle? lamienne en linux ou celle de ma copine en windows? la mienne a aussi windows, que j utilise jamais...

si ton linux est attaqué ton windows lui à sauté (tm) Mon windows a sauté? ca veut dire quoi? il a été pénétré? c est ca? c est possible car je l utilise jamais (peut etre ma copine) et il a pas d anticirus ni d anti espions ni de firewalll (be oui, je m en tape vu que les seules fois ou je l utilise c etait pour la teloche, et je debranchais SYTEMATIQUEENT le reseau alors. il est actualise sous windows quand meme. donc je voyais pas comment quelqu un pourrait rentrer... puisque windws => reseau debranche


Et heuu au fait tes users pourquoi ils ont des ip wan si tu es en lan ?? :wink: A quoi tu vois ca?!! j ai pas d ip WAN, si? c est lesquelles? les .35, .36, etc?
ca a toujours ete comme ca, la 39 etant celle du wifi quand je l avais



je pige rien!!!
tu veux dire quoi???


edit: fail2ban... le probleme est que ca bannit les IP qui tentent et se repetent... mais etant en dhcp... ma liste d IP bannies tendra vers l infini... c est pas la bonne strategie je pense.


serieux, vous croyez que j ai sur MA machine en windows un virus? (jamais alle sur le net avec)
mes donnees precieuses donnees sont sur un disque externe en EXT3 (pas folle la bete): ce virus pourrait les endommager?
_________________
Cuando un tonto coge un camino, el camino se acaba, pero el tonto sigue
Back to top
View user's profile Send private message
geekounet
Bodhisattva
Bodhisattva


Joined: 11 Oct 2004
Posts: 3772
Location: Wellington, Aotearoa

PostPosted: Fri Mar 30, 2007 5:44 am    Post subject: Reply with quote

pathfinder wrote:
edit: fail2ban... le probleme est que ca bannit les IP qui tentent et se repetent... mais etant en dhcp... ma liste d IP bannies tendra vers l infini... c est pas la bonne strategie je pense.

Il ne ban pas pour un temps indéfini, par défaut il ban pour 10 minutes. Et le fait que tu soit en DHCP ou non ne change rien au nombre d'IP bannies :P
(enfin perso, un Packet Filter bien configuré, ya que ça de vrai :D)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum