mojodoll
Registered User
[solved] nurnoch icmp packets und related connections aus kvm?
Ich habe mir gestern erfolgreich einen Centos6 KVM Container gebaut, mit Networking via NAT/Masquerading. Wie gewünscht ist auch der komplette HTTP/MySQL-Stack dorthin umgezogen.
Das funktionierte dann auch alles ordentlich, bis ich schlaftrunken heute morgen um 4 Uhr meinte: "Ach, räumen wir doch mal die überflüssigen iptables-rules auf!".
Fazit: a.) Ich kriege ohne Probleme ICMP Packets aus dem Container, traceroutes und ping laufen also einwandfrei.
b.) auch ist besagter Webstack noch einwandfrei zu erreichen - related/established connections kommen also wohl noch durch.
edit: unsinn, SSH geht natürlich auch noch, incoming geht also quasi alles, bis auf wie unten angeführt https
c.) DNS-Resolves gehen auch
Problem ist nun, das sonst garnichtsmehr raus kommt, obwohl es gerne möchte: kein "HEAD <url>", kein yum, keine Webmailapplikation etc..
Ausserdem kriegt man wenn man per https connecten möchte folgendes unerfreuliches:
Das funktionierte natürlich auch wunderbar bis zum "Unfall" heute morgen.
Nun muss aber auch natürlich nicht zwangsläufig eine der iptables Rules zerballert sein, auf mich machen die auf den ersten Blick einen recht gesunden eindruck:
192.168.100.1 ist der Guest, 192.168.100.254 der Gateway/Host:
Ich bin jetzt auch noch nicht sonderlich weit gekommen mit der Fehleranalyse, da etwas in Eile, rasante Ratschläge wären hervorragend.
Die Freunde jammern schon dass "email ja nicht ginge" - noch kann ich das mit lapidaren Sprüchen wie "l2thunderbird" abschmettern, aber wohl nichtmehr lange
Ich habe mir gestern erfolgreich einen Centos6 KVM Container gebaut, mit Networking via NAT/Masquerading. Wie gewünscht ist auch der komplette HTTP/MySQL-Stack dorthin umgezogen.
Das funktionierte dann auch alles ordentlich, bis ich schlaftrunken heute morgen um 4 Uhr meinte: "Ach, räumen wir doch mal die überflüssigen iptables-rules auf!".
Fazit: a.) Ich kriege ohne Probleme ICMP Packets aus dem Container, traceroutes und ping laufen also einwandfrei.
b.) auch ist besagter Webstack noch einwandfrei zu erreichen - related/established connections kommen also wohl noch durch.
edit: unsinn, SSH geht natürlich auch noch, incoming geht also quasi alles, bis auf wie unten angeführt https
c.) DNS-Resolves gehen auch
Problem ist nun, das sonst garnichtsmehr raus kommt, obwohl es gerne möchte: kein "HEAD <url>", kein yum, keine Webmailapplikation etc..
Ausserdem kriegt man wenn man per https connecten möchte folgendes unerfreuliches:
Code:
SSL received a record that exceeded the maximum permissible length.
(Error code: ssl_error_rx_record_too_long)
Nun muss aber auch natürlich nicht zwangsläufig eine der iptables Rules zerballert sein, auf mich machen die auf den ersten Blick einen recht gesunden eindruck:
192.168.100.1 ist der Guest, 192.168.100.254 der Gateway/Host:
Code:
# iptables -L -v
Chain INPUT (policy DROP 59 packets, 6504 bytes)
pkts bytes target prot opt in out source destination
46M 111G ACCEPT all -- lo any anywhere anywhere
908M 661G ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED
408K 20M ACCEPT tcp -- any any anywhere anywhere tcp dpt:http
15774 822K ACCEPT tcp -- any any anywhere anywhere tcp dpt:https
<snip>
1084 65088 ACCEPT all -- any any 192.168.100.1 anywhere
377 22620 ACCEPT tcp -- any any 192.168.100.1 anywhere tcp dpt:2080
11055 663K ACCEPT tcp -- any any 192.168.100.1 anywhere tcp dpt:45197
68294 9360K LOG all -- any any anywhere anywhere LOG level warning ip-options prefix "iptables: "
Chain FORWARD (policy ACCEPT 26074 packets, 23M bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 52698 packets, 50M bytes)
pkts bytes target prot opt in out source destination
Code:
# iptables -L -v -t nat
Chain PREROUTING (policy ACCEPT 4153 packets, 296K bytes)
pkts bytes target prot opt in out source destination
1836 101K DNAT tcp -- any any anywhere anywhere tcp dpt:http to:192.168.100.1:80
67 3584 DNAT tcp -- any any anywhere anywhere tcp dpt:https to:192.168.100.1:80
Chain INPUT (policy ACCEPT 3052 packets, 184K bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 8807 packets, 595K bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 3816 packets, 232K bytes)
pkts bytes target prot opt in out source destination
46735 3061K MASQUERADE all -- any eth0 anywhere anywhere
Ich bin jetzt auch noch nicht sonderlich weit gekommen mit der Fehleranalyse, da etwas in Eile, rasante Ratschläge wären hervorragend.
Die Freunde jammern schon dass "email ja nicht ginge" - noch kann ich das mit lapidaren Sprüchen wie "l2thunderbird" abschmettern, aber wohl nichtmehr lange
Last edited by a moderator: