Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ssh hinter einer bridge
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1924
Location: Schweiz

PostPosted: Tue Jun 03, 2014 9:20 am    Post subject: ssh hinter einer bridge Reply with quote

Ich experimentiere schon seit einer weile mit Netzwerkbrücken herum, wegen der Virtualisierung mit libvirt, und nun gibt es da ein Problem das ich alleine nicht in den Griff bekomme.

Mein Rechner baut nun mit Hilfe von Networkmanager erfolgreich zwei Netzwerkbrücken auf die eigentlich auch einwandfrei funktionieren bis auf den ssh-Dienst hinter "br0". Seit der Netzwerkbrücke ist es unmöglich eine ssh Verbindung zu meinem Rechner (10.76.0.177) aufzubauen, jeder versuch endet mit der Fehlermeldung "Write failed: Broken pipe" welche direkt nach dem Passwort-Prompt erscheint.
Hoffentlich hat einer von euch eine Idee wie man den ssh dazu bringen kann hinter einer Netzwerkbrücke zu funktionieren denn mir sind die Ideen ausgegangen.

Hier noch ein paar Infos:
Der NetworkManager ist so eingerichtet das er die Netzwerkkarte "enp2s0" zur Bridge br0 hinzufügt und die beiden anderen "enp1s5" + "enp1s6" zur Bridge br1. Die Netzwerkkarte "enp1s5" fügt er aber erst zur Bridge br1 hinzu wenn dort etwas eingesteckt wird, was ich gar nicht so schlecht finde.
Code:
pc177am ~ # ifconfig -a
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.76.0.177  netmask 255.255.0.0  broadcast 10.76.255.255
        inet6 fe80::c4bd:5ff:fedf:8591  prefixlen 64  scopeid 0x20<link>
        ether 48:5b:39:a4:52:9d  txqueuelen 0  (Ethernet)
        RX packets 251332  bytes 94885289 (90.4 MiB)
        RX errors 0  dropped 85  overruns 0  frame 0
        TX packets 75801  bytes 15529794 (14.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.100  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 2a02:120b:2c46:63e0:20a:5eff:fe77:74c6  prefixlen 64  scopeid 0x0<global>
        inet6 2a02:120b:2c46:63e0:c088:b4a8:93f3:19fd  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::20a:5eff:fe77:74c6  prefixlen 64  scopeid 0x20<link>
        ether 00:0a:5e:77:74:c6  txqueuelen 0  (Ethernet)
        RX packets 268569  bytes 282785903 (269.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 217308  bytes 20837720 (19.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp1s5: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:0a:5e:56:d9:34  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  base 0xc800 

enp1s6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::20a:5eff:fe77:74c6  prefixlen 64  scopeid 0x20<link>
        ether 00:0a:5e:77:74:c6  txqueuelen 1000  (Ethernet)
        RX packets 269358  bytes 286793306 (273.5 MiB)
        RX errors 0  dropped 0  overruns 205  frame 0
        TX packets 224052  bytes 21297307 (20.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 21  base 0xc00 

enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::4a5b:39ff:fea4:529d  prefixlen 64  scopeid 0x20<link>
        ether 48:5b:39:a4:52:9d  txqueuelen 1000  (Ethernet)
        RX packets 295272  bytes 100849222 (96.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 75850  bytes 15546034 (14.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Lokale Schleife)
        RX packets 13  bytes 1017 (1017.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 13  bytes 1017 (1017.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Code:
pc177am ~ # route
Kernel IP Routentabelle
Ziel            Router          Genmask         Flags Metric Ref    Use Iface
default         192.168.1.1     0.0.0.0         UG    0      0        0 br1
10.75.0.0       10.76.0.1       255.255.255.0   UG    0      0        0 br0
10.76.0.0       *               255.255.0.0     U     20     0        0 br0
192.168.1.0     *               255.255.255.0   U     20     0        0 br1
Code:
pc177am ~ # iptables --list
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
Code:
Jun 03 10:38:59 pc177am sshd[272]: SSH: Server;Ltype: Version;Remote: 10.76.0.214-36963;Protocol: 2.0;Client: OpenSSH_6.6p1-hpn14v4
Jun 03 10:38:59 pc177am sshd[272]: SSH: Server;Ltype: Kex;Remote: 10.76.0.214-36963;Enc: aes128-ctr;MAC: hmac-md5-etm@openssh.com;Comp: none [preauth]
Jun 03 10:38:59 pc177am sshd[272]: Connection closed by 10.76.0.214 [preauth]
Jun 03 10:39:09 pc177am sshd[272]: SSH: Server;Ltype: Version;Remote: 10.76.0.214-36964;Protocol: 2.0;Client: OpenSSH_6.6p1-hpn14v4
Jun 03 10:39:09 pc177am sshd[272]: SSH: Server;Ltype: Kex;Remote: 10.76.0.214-36964;Enc: aes128-ctr;MAC: hmac-md5-etm@openssh.com;Comp: none [preauth]
Jun 03 10:39:11 pc177am sshd[272]: SSH: Server;Ltype: Authname;Remote: 10.76.0.214-36964;Name: root [preauth]
Jun 03 10:39:14 pc177am sshd[272]: Accepted keyboard-interactive/pam for root from 10.76.0.214 port 36964 ssh2
Jun 03 10:39:14 pc177am sshd[272]: privsep_preauth: preauth child terminated by signal 31
Jun 03 10:39:14 pc177am kernel: audit: type=1326 audit(1401784754.565:2): auid=4294967295 uid=22 gid=22 ses=4294967295 pid=8754 comm="sshd" exe="/usr/sbin/sshd" sig=31 syscall=5 compat=0 ip=0x7faecd56c254 code=0x0

_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1924
Location: Schweiz

PostPosted: Fri Jun 06, 2014 7:45 am    Post subject: Reply with quote

Inzwischen habe ich noch versucht ob mit einem grösseren LogLevel eine brauchbare Fehlermeldung kommt nur hilft mir das leider nicht wirklich weiter. Aber möglicherweise erkennt ja einer von euch etwas nützliches.
Code:
Jun 06 08:32:19 pc177am systemd[1]: Starting OpenSSH server daemon...
Jun 06 08:32:19 pc177am systemd[1]: Started OpenSSH server daemon.
Jun 06 08:32:19 pc177am sshd[1687]: Received signal 15; terminating.
Jun 06 08:32:19 pc177am sshd[1805]: Set /proc/self/oom_score_adj from 0 to -1000
Jun 06 08:32:19 pc177am sshd[1805]: debug1: Bind to port 22 on 0.0.0.0.
Jun 06 08:32:19 pc177am sshd[1805]: Server listening on 0.0.0.0 port 22.
Jun 06 08:32:19 pc177am sshd[1805]: debug1: Bind to port 22 on ::.
Jun 06 08:32:19 pc177am sshd[1805]: Server listening on :: port 22.
Jun 06 08:34:32 pc177am sshd[1805]: debug1: Forked child 1816.
Jun 06 08:34:32 pc177am sshd[1805]: Set /proc/self/oom_score_adj to 0
Jun 06 08:34:32 pc177am sshd[1805]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8
Jun 06 08:34:32 pc177am sshd[1805]: debug1: inetd sockets after dupping: 3, 3
Jun 06 08:34:32 pc177am sshd[1805]: Connection from 10.76.0.214 port 37199 on 10.76.0.177 port 22
Jun 06 08:34:32 pc177am sshd[1805]: debug1: Client protocol version 2.0; client software version OpenSSH_6.6p1-hpn14v4
Jun 06 08:34:32 pc177am sshd[1805]: debug1: match: OpenSSH_6.6p1-hpn14v4 pat OpenSSH* compat 0x04000000
Jun 06 08:34:32 pc177am sshd[1805]: debug1: Enabling compatibility mode for protocol 2.0
Jun 06 08:34:32 pc177am sshd[1805]: debug1: Local version string SSH-2.0-OpenSSH_6.6
Jun 06 08:34:32 pc177am sshd[1805]: debug1: permanently_set_uid: 22/22 [preauth]
Jun 06 08:34:32 pc177am sshd[1805]: debug1: list_hostkey_types: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
Jun 06 08:34:32 pc177am sshd[1805]: debug1: SSH2_MSG_KEXINIT sent [preauth]
Jun 06 08:34:32 pc177am sshd[1805]: debug1: SSH2_MSG_KEXINIT received [preauth]
Jun 06 08:34:32 pc177am sshd[1805]: debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none [preauth]
Jun 06 08:34:32 pc177am sshd[1805]: debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none [preauth]
Jun 06 08:34:32 pc177am sshd[1805]: debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth]
Jun 06 08:34:32 pc177am sshd[1805]: debug1: SSH2_MSG_NEWKEYS sent [preauth]
Jun 06 08:34:32 pc177am sshd[1805]: debug1: expecting SSH2_MSG_NEWKEYS [preauth]
Jun 06 08:34:32 pc177am sshd[1805]: debug1: SSH2_MSG_NEWKEYS received [preauth]
Jun 06 08:34:32 pc177am sshd[1805]: debug1: KEX done [preauth]
Jun 06 08:34:32 pc177am sshd[1805]: debug1: userauth-request for user root service ssh-connection method none [preauth]
Jun 06 08:34:32 pc177am sshd[1805]: debug1: attempt 0 failures 0 [preauth]
Jun 06 08:34:32 pc177am sshd[1805]: debug1: PAM: initializing for "root"
Jun 06 08:34:32 pc177am sshd[1805]: debug1: PAM: setting PAM_RHOST to "10.76.0.214"
Jun 06 08:34:32 pc177am sshd[1805]: debug1: PAM: setting PAM_TTY to "ssh"
Jun 06 08:34:32 pc177am sshd[1805]: debug1: userauth-request for user root service ssh-connection method keyboard-interactive [preauth]
Jun 06 08:34:32 pc177am sshd[1805]: debug1: attempt 1 failures 0 [preauth]
Jun 06 08:34:32 pc177am sshd[1805]: debug1: keyboard-interactive devs  [preauth]
Jun 06 08:34:32 pc177am sshd[1805]: debug1: auth2_challenge: user=root devs= [preauth]
Jun 06 08:34:32 pc177am sshd[1805]: debug1: kbdint_alloc: devices 'pam,skey' [preauth]
Jun 06 08:34:32 pc177am sshd[1805]: debug1: auth2_challenge_start: trying authentication method 'pam' [preauth]
Jun 06 08:34:32 pc177am sshd[1805]: Postponed keyboard-interactive for root from 10.76.0.214 port 37199 ssh2 [preauth]
Jun 06 08:34:36 pc177am sshd[1805]: debug1: do_pam_account: called
Jun 06 08:34:36 pc177am sshd[1805]: debug1: PAM: num PAM env strings 0
Jun 06 08:34:36 pc177am sshd[1805]: Postponed keyboard-interactive/pam for root from 10.76.0.214 port 37199 ssh2 [preauth]
Jun 06 08:34:36 pc177am sshd[1805]: debug1: do_pam_account: called
Jun 06 08:34:36 pc177am sshd[1805]: Accepted keyboard-interactive/pam for root from 10.76.0.214 port 37199 ssh2
Jun 06 08:34:36 pc177am sshd[1805]: debug1: monitor_child_preauth: root has been authenticated by privileged process
Jun 06 08:34:36 pc177am sshd[1805]: debug1: monitor_read_log: child log fd closed
Jun 06 08:34:36 pc177am sshd[1805]: privsep_preauth: preauth child terminated by signal 31
Jun 06 08:34:36 pc177am sshd[1805]: debug1: do_cleanup

_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW
Back to top
View user's profile Send private message
Jean-Paul
Guru
Guru


Joined: 13 Apr 2009
Posts: 307

PostPosted: Fri Jun 06, 2014 6:01 pm    Post subject: Reply with quote

Hast du dies hier schon mal versucht ?
http://greenitsolutions.at/write-failed-broken-pipe/

Hört sich trivial an, aber vielleicht hilfts.
_________________
”Everything should be made as simple as possible, but no simpler.” – Albert Einstein
Back to top
View user's profile Send private message
yuhu
Tux's lil' helper
Tux's lil' helper


Joined: 17 Oct 2006
Posts: 86

PostPosted: Fri Jun 06, 2014 7:08 pm    Post subject: Reply with quote

Besteht der Fehler wenn es nur die Bridge br0 gibt?

Existiert der Fehler auch, wenn du die Bridge von Hand erstellst?
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1924
Location: Schweiz

PostPosted: Sat Jun 07, 2014 1:28 pm    Post subject: Reply with quote

@Jean-Paul
Das werde ich dann am Dienstag mal versuchen aber fürs erste habe ich nun Wochenende ;)

@yuhu
Es spielt keine Rolle wie viele aktiv sind, sobald der SSH-Dienst hinter einer Bridge ist bricht die Verbindung direkt nach dem Login ab. Und ob es ohne NM funktioniert weiß ich nicht aber das ist in diesem Fall auch egal denn wenn ich gezwungen bin mich auf diesem Rechner zwischen NM und SSH zu entscheiden gewinnt ganz klar der NM.

EDIT:
Die Tipps von der verlinkten Webseite haben leider nicht funktioniert...
_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
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