Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!

Ogłoszenie

Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

#1  2010-07-19 20:37:53

  torpeda80 - Użytkownik

torpeda80
Użytkownik
Zarejestrowany: 2007-03-28

[+]problem z sshd na łączu upc (DOCSIS) - udostepnienie usługi na zew.

Postanowilem założyć nowy wątek bo poprzedni trochę się rozlazł.
Mam łacze szerokopasmowe od upc (technologia DOCSIS, z modemu idziel kabel do routera air live WL1600GL natomiast z routera rozdział na dwa kompy.)
W sieci LAN mogę się łaczyć po ssh między dwoma komputerami.
Mam problem aby dostać się z zewnątrz do jednego z tych kompów poprzez putty.

moje pliki:
serwer ssh

Kod:

root@torpeda:/etc/ssh# cat sshd_config 
# Package generated configuration file
# See the sshd_config(5) manpage for details

# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0

Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768

# Logging
SyslogFacility AUTH
LogLevel INFO

# Authentication:
LoginGraceTime 40

PermitRootLogin no
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile    %h/.ssh/authorized_keys

# 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_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes

# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no


# Change to no to disable tunnelled clear text passwords
#PasswordAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no

#MaxStartups 10:30:60
#Banner /etc/issue.net

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes

root@torpeda:/etc/ssh#

host.allow
połączyłem się do internetu przez komórkę podlączoną do komputera i taki dostałem numer ip: 95.41.132.115

Kod:

root@torpeda:/etc# cat hosts.allow
# /etc/hosts.allow: list of hosts that are allowed to access the system.
ALL: 95.41.132.115
root@torpeda:/etc#

host.deny - plik pusty

na laptopie na którym mam sshd iptables wygląda:

Kod:

root@torpeda:/etc# iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
root@torpeda:/etc#

na routerze ustawiłem:
1. security - firewall- Block Anonymous Internet Requests  -odchaczylem.
2.Access Control-->Internet Access --->Restrictions:--->none


1. czy wogóle takie chwilowe połaczenie jest mozliwe tj. z komórki (dynamiczne ip) do komputera z dynamicznym ip. w puttym podaje zewnetrzne ip łącza szerkopasmowego.
2. czy modem od upc może mieć wbudowanego firewalla? czy wpuszcza wszystko do siebie.

Ostatnio edytowany przez torpeda80 (2010-07-20 15:34:24)

Offline

 

#2  2010-07-20 00:20:29

  adasiek_j - Użytkownik

adasiek_j
Użytkownik
Zarejestrowany: 2010-05-04

Re: [+]problem z sshd na łączu upc (DOCSIS) - udostepnienie usługi na zew.

Tak, tylko zapomniałeś o dwóch rzeczach:

1. Port forwarding na routerze port jakiś np. 222 na ip_lokalne port 22
2. jakias nazwa dyndns dla Twojego ip, aktualizowana przez router, abys mógł bez problemu ominąć dynamiczne IP.

Adam

Offline

 

#3  2010-07-20 04:57:12

  czadman - Bicycle repairman

czadman
Bicycle repairman
Skąd: Wrocław
Zarejestrowany: 2005-07-08

Re: [+]problem z sshd na łączu upc (DOCSIS) - udostepnienie usługi na zew.

torpeda80 napisał(-a):

2. czy modem od upc może mieć wbudowanego firewalla? czy wpuszcza wszystko do siebie.

Z moich doświadczeń wynika, że UPC nie blokuje niczego, ani gdzieś u siebie ani przez modem kablowy.


http://www.debian.org/logos/openlogo-nd-50.png

Offline

 

#4  2010-07-20 10:48:27

  saiqard - Użytkownik

saiqard
Użytkownik
Skąd: Wałbrzych
Zarejestrowany: 2009-07-30

Re: [+]problem z sshd na łączu upc (DOCSIS) - udostepnienie usługi na zew.

dokładnie tak jak powiedział adasiek_j
Musisz ustawić forwarding na routerze

Offline

 

#5  2010-07-20 15:33:49

  torpeda80 - Użytkownik

torpeda80
Użytkownik
Zarejestrowany: 2007-03-28

Re: [+]problem z sshd na łączu upc (DOCSIS) - udostepnienie usługi na zew.

Na routerze ustawiłem w Virtual serwer:
- enable ssh -zaznaczona opcja
- PC(serwer) - wskazałem komp ten w LANie na którym jest sshd tj. u mnie 192.168.1.2
- Protocol: TCP
- Internal (LAN )port: 5875 - wskazałem z poza zakresu podstawowego skanowania
- External (WAN) port:22
i ruszył. Połączyłem się.
Dziękuję wszystkim bardzo za pomoc i pzdr.

Offline

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
Nas ludzie lubią po prostu, a nie klikając w przyciski ;-)