PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Server von bestimmter IP nicht erreichbar



DerRoman
10.04.12, 20:20
Hallo zusammen,

Leider musste ich vor Kurzem feststellen, dass das Anlegen von Benutzern über die PLESK-API nicht funktioniert.

Der auftretende Fehler lautete:


The Panel API returned an error: couldn't connect to host - 7

Der Fehler scheint nichts mit der PLESK-Installation zu tun zu haben. Vielmehr ist der Zielserver, also der Server, auf dem ein Kunde in PLESK angelegt werden soll, vom ausführenden Server aus nicht erreichbar.


Um das ganze etwas zu vereinfachen:

- Server 1: Hier liegt der Webauftritt. Dort wird über ein Joomla-Plugin ein Kunde auf Server 2 angelegt. Für Server 1 besitze ich lediglich einen Webspace-Account.
- Server 2: Hier wird der Kunde angelegt (PLESK). Hierfür besitze ich einen root-Zugriff.



Wenn man von Server 1 versucht, Server 2 zu erreichen, sieht das wie folgt aus:


# wget --no-check-certificate
https://subdomain.server2.tld:8443/enterprise/control/agent.php
--2012-04-10 14:27:05--
https://subdomain.server2.tld:8443/enterprise/control/agent.php
Resolving subdomain.server2.tld... 217.xx.xxx.xx4
Connecting to subdomain.server2.tld|217.xx.xxx.xx4|:8443... failed: Connection
refused.

Nun ist naheliegend, dass Server 2 die Verbindung von Server 1 zurückweist, daher habe ich mir IPTABLES angesehen, kann dort aber auch keinen Fehler finden:


root@server2:/etc# iptables -L INPUT
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
REJECT tcp -- anywhere anywhere tcp flags:!FIN,SYN,RST,ACK/SYN reject-with tcp-reset
DROP all -- anywhere anywhere state INVALID
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- xxx.amber.fastwebserver.de anywhere tcp dpt:8443
ACCEPT tcp -- xxx.amber.fastwebserver.de anywhere tcp dpt:8880
ACCEPT tcp -- anywhere anywhere tcp dpt:12443
ACCEPT tcp -- anywhere anywhere tcp dpt:11443
ACCEPT tcp -- anywhere anywhere tcp dpt:11444
ACCEPT tcp -- anywhere anywhere tcp dpt:8447
ACCEPT tcp -- anywhere anywhere tcp dpt:8443
ACCEPT tcp -- anywhere anywhere tcp dpt:8880
ACCEPT tcp -- anywhere anywhere tcp dpt:www
ACCEPT tcp -- anywhere anywhere tcp dpt:https
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:submission
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
ACCEPT tcp -- anywhere anywhere tcp dpt:ssmtp
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3s
ACCEPT tcp -- anywhere anywhere tcp dpt:imap2
ACCEPT tcp -- anywhere anywhere tcp dpt:imaps
ACCEPT tcp -- anywhere anywhere tcp dpt:poppassd
ACCEPT tcp -- anywhere anywhere tcp dpt:mysql
ACCEPT tcp -- anywhere anywhere tcp dpt:postgresql
ACCEPT tcp -- anywhere anywhere tcp dpt:9008
ACCEPT tcp -- anywhere anywhere tcp dpt:9080
ACCEPT udp -- anywhere anywhere udp dpt:netbios-ns
ACCEPT udp -- anywhere anywhere udp dpt:netbios-dgm
ACCEPT tcp -- anywhere anywhere tcp dpt:netbios-ssn
ACCEPT tcp -- anywhere anywhere tcp dpt:microsoft-ds
ACCEPT udp -- anywhere anywhere udp dpt:openvpn
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT udp -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp type 8 code 0
DROP all -- anywhere anywhere
DROP all -- xxxx.amber.fastwebserver.de anywhere

Auch der Betreiber des Rechenzentrums Nr. 2 gibt an, keinerlei Traffic zu blockieren..

Auch die hosts.deny sieht unverdächtig aus:


# /etc/hosts.deny: list of hosts that are _not_ allowed to access the system.
# See the manual pages hosts_access(5) and hosts_options(5).
#
# Example: ALL: some.host.name, .some.domain
# ALL EXCEPT in.fingerd: other.host.name, .other.domain
#
# If you're going to protect the portmapper use the name "portmap" for the
# daemon name. Remember that you can only use the keyword "ALL" and IP
# addresses (NOT host or domain names) for the portmapper, as well as for
# rpc.mountd (the NFS mount daemon). See portmap(8) and rpc.mountd(8)
# for further information.
#
# The PARANOID wildcard matches any host whose name does not match its
# address.
#
# You may wish to enable this to ensure any programs that don't
# validate looked up hostnames still leave understandable logs. In past
# versions of Debian this has been the default.
# ALL: PARANOID


Langsam gehen mir tatsächlich die Ideen aus. Wer sieht etwas, was ich noch nicht bedacht habe? Es handelt sich um ein System mit Debian-Linux.

DrunkenFreak
10.04.12, 20:52
Schmeiß die iptables-Regeln alle mal raus und probier es dann noch mal. Dann kannst du zumindest sicher sein, dass es nicht an der Firewall liegt.

Da du allerdings eine Verbindung auch nur via http probierst, könnte der Apache (oder Plesk) hier auch blocken. Das wäre auch noch zu prüfen.

DerRoman
10.04.12, 20:57
Hi.

Wie kann ich die bisherigen Regeln sichern, bevor ich sie lösche? Wo kann ich schauen ob Apache oder Plesk blockieren?

DrunkenFreak
10.04.12, 20:59
Musst doch irgendwo ein Skript haben, was dir die Regeln erstellt. Nach einem Neustart wären sie sonst auch weg.

DerRoman
10.04.12, 21:31
Hi,

Regeln gelöscht -> probiert -> weiterhin kein Erfolg.

Regeln nun wieder rein geladen...

marce
11.04.12, 07:31
Apache-Konfig von Server2 bzw. des entsprechenden VHosts checken, ansonsten mal mit telnet, nmap und Artverwandten schauen, ob der Port überhaupt offen ist.

DerRoman
11.04.12, 08:58
Ports müssen offen sein, da andere Server außer Server 1 den Server 2 ja auf dem entspr. Port ansprechen können...