LINUX.ORG.RU
решено ФорумAdmin

очень хочется зайти на комп не через hamachi


0

0

Проблема такая - что бы зайти по ssh и vnc приходится запускать хамачи. Что и куда писать что бы они были не нужны?
Файрволы снесены, вот пара команд о состоянии подключений:

login@serv:/$ sudo netstat -lptun
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 5189/dovecot
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 5189/dovecot
tcp 0 0 0.0.0.0:5800 0.0.0.0:* LISTEN 5984/x11vnc
tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN 5984/x11vnc
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 5135/xinetd
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 5189/dovecot
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 5189/dovecot
tcp 0 0 0.0.0.0:10774 0.0.0.0:* LISTEN 5864/skype
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 4993/cupsd
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 4931/postgres
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 5087/master
tcp6 0 0 :::22 :::* LISTEN 4882/sshd
udp 0 0 0.0.0.0:10774 0.0.0.0:* 5864/skype
udp 0 0 127.0.0.1:37668 0.0.0.0:* 5864/skype
udp 0 0 82.200.77.50:48085 0.0.0.0:* 5842/hamachi
udp 0 0 0.0.0.0:51938 0.0.0.0:* 4903/avahi-daemon:
udp 0 0 0.0.0.0:5353 0.0.0.0:* 4903/avahi-daemon:
login@serv:/$ sudo netstat -napAinet
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 5189/dovecot
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 5189/dovecot
tcp 0 0 0.0.0.0:5800 0.0.0.0:* LISTEN 5984/x11vnc
tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN 5984/x11vnc
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 5135/xinetd
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 5189/dovecot
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 5189/dovecot
tcp 0 0 0.0.0.0:10774 0.0.0.0:* LISTEN 5864/skype
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 4993/cupsd
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 4931/postgres
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 5087/master
tcp 0 0 82.200.77.50:37484 95.28.255.66:47981 ESTABLISHED 5864/skype
tcp 0 0 5.69.243.47:5900 5.230.179.37:2311 ESTABLISHED 5984/x11vnc
tcp 0 0 82.200.77.50:46368 77.242.193.69:12975 ESTABLISHED 5842/hamachi
udp 0 0 127.0.0.1:34186 127.0.0.1:34186 ESTABLISHED 4931/postgres
udp 0 0 0.0.0.0:10774 0.0.0.0:* 5864/skype
udp 0 0 127.0.0.1:37668 0.0.0.0:* 5864/skype
udp 0 0 82.200.77.50:48085 0.0.0.0:* 5842/hamachi
udp 0 0 0.0.0.0:51938 0.0.0.0:* 4903/avahi-daemon:
udp 0 0 0.0.0.0:5353 0.0.0.0:* 4903/avahi-daemon:

вот содержимое /etc/network/interfaces:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 82.200.77.50
netmask 255.255.255.192
network 82.200.77.0
broadcast 82.200.77.63
gateway 82.200.77.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 82.200.77.1
dns-search gde-to-tam.com


Ответ на: комментарий от ostin

# Package generated configuration file
# See the sshd(8) 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 120
PermitRootLogin yes
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

UsePAM yes

kssr
() автор топика
Ответ на: комментарий от kssr

Если конфиг sshd и приведенный выше выхлоп netstat относятся к серверу, то получается, что sshd не слушает ipv4 адрес, хотя это странно. Раскомментируйте строку «ListenAddress 0.0.0.0» и перезапустите sshd.

P.S. Какие дистрибутивы на сервере и клиенте, где приходится запускать hamachi?

mky ★★★★★
()
Ответ на: комментарий от mky

на клиенте Putty, на сервере ubuntu 8.04 server + xubuntu-desktop + хамачи, собственно, благодаря чему пока все как-то криво-косо, но работает :)

kssr
() автор топика
Ответ на: комментарий от anonymous

А это с сервера:
nmap --open 82.200.77.50

Starting Nmap 4.53 ( http://insecure.org ) at 2010-01-03 05:57 NOVT
Interesting ports on djangoserv.gde-to-tam.com (82.200.77.50):
Not shown: 1705 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
110/tcp open pop3
143/tcp open imap
993/tcp open imaps
995/tcp open pop3s
5800/tcp open vnc-http
5900/tcp open vnc
5901/tcp open vnc-1

kssr
() автор топика
Ответ на: комментарий от suzuki

Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp  — anywhere anywhere tcp dpt:ssh
ACCEPT tcp  — anywhere anywhere tcp dpt:ssh
ACCEPT tcp  — anywhere anywhere tcp dpt:www

Chain FORWARD (policy DROP)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp  — anywhere anywhere tcp dpt:ssh

kssr
() автор топика
Ответ на: комментарий от anonymous

Пасиба ! Ситуация разрешилась.

kssr
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.