View previous topic :: View next topic |
Author |
Message |
Cyrus84 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 19 Nov 2003 Posts: 7
|
Posted: Fri Nov 21, 2003 12:20 pm Post subject: SSH Access von aussen |
|
|
Hallo, habe den ssh server gemerged und die config angepasst.
Von meinem Intranet aus ist auch auf den Rechner zuzugreifen, doch aus dem Internet nicht.
Habe keine Firewall und keine iptables gemerged.
Wo liegt mein Fehler?
Gruss,
Cyrus |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
m0pr0be Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 29 Aug 2002 Posts: 308
|
Posted: Fri Nov 21, 2003 12:27 pm Post subject: |
|
|
hallo,
vom internet aus greifst du ueber mehrere router auf deinen rechner zu. mit ein paar einfachen mitteln kannst du ueberpruefen ob die verbindung zu deinem rechner vom internet aus funktioniert.
christoph |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Cyrus84 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 19 Nov 2003 Posts: 7
|
Posted: Fri Nov 21, 2003 12:30 pm Post subject: |
|
|
ja, meine ip kann ich pingen, nur leider kann ich nicht trotzdem sshd läuft drauf zugreifen! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Redshirt n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/6605884043fab9d77efa59.gif)
Joined: 10 Oct 2003 Posts: 58 Location: Braunschweig/Germany
|
Posted: Fri Nov 21, 2003 12:32 pm Post subject: |
|
|
hmm ... wie gehst du ins Internet? Könnte sein, dass Dein Provider da ne Firewall zwischengeschaltet ist. Ist zum Beispiel bei mir so, ich gehe über die Uni ins Netzwerk, und da sind die meisten Ports gesperrt, nur ein ganz paar sind offen...
Redshirt |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
think4urs11 Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/8534934054bad29b51e5fa.jpg)
Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Fri Nov 21, 2003 12:33 pm Post subject: |
|
|
Hi!
Ohne dein Setup genauer zu kennen...
Ich nehme mal an du hast einen ISDN/DSL-Router?
In dem Fall muß du dort natürlich auch ein Port-Forwarding für den SSH-Port einrichten auf die IP deines PC.
HTH
T. _________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Cyrus84 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 19 Nov 2003 Posts: 7
|
Posted: Fri Nov 21, 2003 12:39 pm Post subject: |
|
|
Think4UrS11 wrote: | Hi!
Ohne dein Setup genauer zu kennen...
Ich nehme mal an du hast einen ISDN/DSL-Router?
In dem Fall muß du dort natürlich auch ein Port-Forwarding für den SSH-Port einrichten auf die IP deines PC.
HTH
T. |
Meine IP hängt in der DMZ, dass heißt doch, das alles direkt durch geht. (DSLROUTER)
Meine smbd_config:
Code: |
# $OpenBSD: sshd_config,v 1.59 2002/09/25 11:17:16 markus Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.
Port 2002
Protocol 2
ListenAddress 127.0.0.1
#ListenAddress ::
# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 3600
#ServerKeyBits 768
# Logging
#obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
LoginGraceTime 120
PermitRootLogin yes
#StrictModes yes
#AllowHosts *.gentoo.org
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
# rhosts authentication should not be used
RhostsAuthentication no
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
#PermitEmptyPasswords no
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#AFSTokenPassing no
# Kerberos TGT Passing only works with the AFS kaserver
#KerberosTgtPassing no
# Set this to 'yes' to enable PAM keyboard-interactive authentication
# Warning: enabling this may bypass the setting of 'PasswordAuthentication'
#PAMAuthenticationViaKbdInt no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#KeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression yes
#MaxStartups 10
# no default banner path
#Banner /some/path
#VerifyReverseMapping no
# override default of no subsystems
Subsystem sftp /usr/lib/misc/sftp-server
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
himpierre l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/gallery/Quake3/quake3_sarge.gif)
Joined: 31 Aug 2002 Posts: 867 Location: Berlin
|
Posted: Fri Nov 21, 2003 12:56 pm Post subject: |
|
|
Quote: |
Port 2002
Protocol 2
ListenAddress 127.0.0.1
|
Aus Port 2002 willst Du wahrscheinlich 22 machen und falls Du Dich auch von "aussen" konnekten willst, solltest Du ListenAddress auf 0.0.0.0 setzen.
Thomas |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Cyrus84 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 19 Nov 2003 Posts: 7
|
Posted: Fri Nov 21, 2003 1:03 pm Post subject: |
|
|
ok funzt Dankeeee!
kommt ihr da drauf?
ssh: hagbart.no-ip.biz
port: 22 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Cyrus84 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 19 Nov 2003 Posts: 7
|
Posted: Fri Nov 21, 2003 3:17 pm Post subject: |
|
|
hmm.. komisch geht nicht, kann nur lokal drauf zugreifen
VERDAMMT WORAN LIEGT DAS??? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
think4urs11 Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/8534934054bad29b51e5fa.jpg)
Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Fri Nov 21, 2003 3:31 pm Post subject: |
|
|
- hast du in der ssh-conf die Listenaddress auf 0.0.0.0 gesetzt?
- hast du deinem Router beigebracht Port 22 auf deinen PC forzuwarden?
- hast du den sshd nach der Änderung neu gestartet?
- hast du die richtige externe Adresse benutzt beim Testen?
- hast du das von einem anderen Rechner aus deinem LAN probiert oder von einem aus dem Internet?
- hast du mal von außen einen Portscan gemacht?
Außerdem solltest du den 'PermitRootLogin' auf no setzen - ja ich weiß ich bin paranoid ![Smile :-)](images/smiles/icon_smile.gif) _________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
schlehmil Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/12939272073ec488c65c0a0.jpg)
Joined: 19 Apr 2003 Posts: 110 Location: Berlin, Germany
|
Posted: Sat Nov 22, 2003 7:57 am Post subject: |
|
|
Also wenn der Rechner von außen per SSH erreichbar sein soll wuerde ich nur Zugang mit "Public-Key" Authentifizierung erlauben. Hat den Vorteil das nur der mit dem richtigen Key Zugriff auf deinen Rechner hat und Brute-Force Attacken ausgeschlossen sind. Außerdem waere es möglich ein passwortlosen Zugang zu realisieren. Weitere Infos findet man z.B. hier. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
m0pr0be Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 29 Aug 2002 Posts: 308
|
Posted: Sat Nov 22, 2003 12:14 pm Post subject: |
|
|
Cyrus84 wrote: |
Meine IP hängt in der DMZ, dass heißt doch, das alles direkt durch geht. (DSLROUTER)
|
das kommt darauf an wie dein router konfiguriert ist. es waere ein hohes sicherheitsrisiko wenn ein router per default einstellung einfach so ip pakete in eine dmz durchlassen wuerde. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|