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.

[quote=torpeda80]2. czy modem od upc może mieć wbudowanego firewalla? czy wpuszcza wszystko do siebie.[/quote]
Z moich doświadczeń wynika, że UPC nie blokuje niczego, ani gdzieś u siebie ani przez modem kablowy.


[url=http://www.debian.org/][img]http://www.debian.org/logos/openlogo-nd-50.png[/img][/url]

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
Możesz wyłączyć AdBlock — tu nie ma reklam ;-)

[ Generated in 0.011 seconds, 11 queries executed ]

Informacje debugowania

Time (s) Query
0.00012 SET CHARSET latin2
0.00004 SET NAMES latin2
0.00132 SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='3.147.44.121' WHERE u.id=1
0.00089 REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '3.147.44.121', 1715703372)
0.00061 SELECT * FROM punbb_online WHERE logged<1715703072
0.00095 SELECT topic_id FROM punbb_posts WHERE id=152255
0.00138 SELECT id FROM punbb_posts WHERE topic_id=17238 ORDER BY posted
0.00127 SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=17238 AND t.moved_to IS NULL
0.00007 SELECT search_for, replace_with FROM punbb_censoring
0.00105 SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=17238 ORDER BY p.id LIMIT 0,25
0.00125 UPDATE punbb_topics SET num_views=num_views+1 WHERE id=17238
Total query time: 0.00895 s