kreiselkopf
Goto Top

Linux Server möglichst sicher im INet , habe ich an alles gedacht bzw. was muss bzw. kann ich zusätzlich noch machen

Hallo liebe Experten. Ich muss einen 1und1 Dedicated Server ins Netz bringen der mit CentOS 6.4 Final und Plesk Panel Version 11.0.9 Update #56 läuft. Da ich ansonsten eher aus der Windowswelt komme (bin eher nur sporadisch in der Linuxwelt) brauche ich ein paar Ratschläge. Ich habe schon einiges gemacht, aber bei den ganzen Tipps über Google weiss ich nicht ob ich wirklich an das wichtigste bzw. notwendige gedacht habe. Ich habe mal die Liste aufgeführt was ich bisher gemacht habe. Als Hintergrund, auf dem Server soll für einen Kunden Magento mit Apache und Wordpress laufen.

Mit xxx.xxx.xxx.xxx wurde die echte IP umbenannt.

Das habe ich bisher gemacht:
Passworte für Plex und root User auf lange mit Zahlen, Grossbuchstaben und Sonderzeichen geändert
Root einloggen per SSH ausgeschaltet
Normaler Benutzer für SSH angelegt
Port für SSH geändert
nmap installiert
mysql auf nur lokal verwenden gestellt
ftp dienst deaktiviert
1und1 Hardwarefirewall eingeschaltet
firewall über plesk eingeschaltet (Konfiguration noch fraglich, siehe Listing am Ende)

nmap -sT ergibt folgendes:
Not shown: 991 closed ports
PORT STATE SERVICE
53/tcp open domain
80/tcp open http
106/tcp open pop3pw
110/tcp open pop3
143/tcp open imap
443/tcp open https
993/tcp open imaps
995/tcp open pop3s
8443/tcp open https-alt

netstat -nlp ergibt folgendes:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:10001 0.0.0.0:* LISTEN 26843/sw-cp-serverd
tcp 0 0 xxx.xxx.xxx.xxx:53 0.0.0.0:* LISTEN 1842/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 1842/named
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 1842/named
tcp 0 0 127.0.0.1:12768 0.0.0.0:* LISTEN 17655/psa-pc-remote
tcp 0 0 0.0.0.0:1978 0.0.0.0:* LISTEN 14204/sshd
tcp 0 0 :::106 :::* LISTEN 25835/xinetd
tcp 0 0 :::110 :::* LISTEN 1489/couriertcpd
tcp 0 0 :::143 :::* LISTEN 1471/couriertcpd
tcp 0 0 :::8880 :::* LISTEN 26843/sw-cp-serverd
tcp 0 0 :::80 :::* LISTEN 16376/httpd
tcp 0 0 :::53 :::* LISTEN 1842/named
tcp 0 0 :::8443 :::* LISTEN 26843/sw-cp-serverd
tcp 0 0 :::443 :::* LISTEN 16376/httpd
tcp 0 0 :::993 :::* LISTEN 1481/couriertcpd
tcp 0 0 :::995 :::* LISTEN 1498/couriertcpd
tcp 0 0 :::1924 :::* LISTEN 14204/sshd
udp 0 0 xxx.xxx.xxx.xxx:123 0.0.0.0:* 1458/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 1458/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 1458/ntpd
udp 0 0 0.0.0.0:783 0.0.0.0:* 1338/portreserve
udp 0 0 xxx.xxx.xxx.xxx:53 0.0.0.0:* 1842/named
udp 0 0 127.0.0.1:53 0.0.0.0:* 1842/named
udp 0 0 0.0.0.0:68 0.0.0.0:* 1236/dhclient
udp 0 0 fa77::259:79af:fab3:c461:173 :::* 1458/ntpd
udp 0 0 ::1:123 :::* 1458/ntpd
udp 0 0 5051:8f8:32c:2303::92:d5:173 :::* 1458/ntpd
udp 0 0 :::123 :::* 1458/ntpd
udp 0 0 :::53 :::* 1842/named
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 54261 19873/mysqld /var/lib/mysql/mysql.sock
unix 2 [ ACC ] STREAM LISTENING 46829 17845/master public/cleanup
unix 2 [ ACC ] STREAM LISTENING 46836 17845/master private/tlsmgr
unix 2 [ ACC ] STREAM LISTENING 46840 17845/master private/rewrite
unix 2 [ ACC ] STREAM LISTENING 46844 17845/master private/bounce
unix 2 [ ACC ] STREAM LISTENING 46848 17845/master private/defer
unix 2 [ ACC ] STREAM LISTENING 46852 17845/master private/trace
unix 2 [ ACC ] STREAM LISTENING 46856 17845/master private/verify
unix 2 [ ACC ] STREAM LISTENING 7002 1/init @/com/ubuntu/upstart
unix 2 [ ACC ] STREAM LISTENING 46860 17845/master public/flush
unix 2 [ ACC ] STREAM LISTENING 46864 17845/master private/proxymap
unix 2 [ ACC ] STREAM LISTENING 46868 17845/master private/proxywrite
unix 2 [ ACC ] STREAM LISTENING 46872 17845/master private/smtp
unix 2 [ ACC ] STREAM LISTENING 46876 17845/master private/relay
unix 2 [ ACC ] STREAM LISTENING 46880 17845/master public/showq
unix 2 [ ACC ] STREAM LISTENING 46884 17845/master private/error
unix 2 [ ACC ] STREAM LISTENING 46888 17845/master private/retry
unix 2 [ ACC ] STREAM LISTENING 46892 17845/master private/discard
unix 2 [ ACC ] STREAM LISTENING 46896 17845/master private/local
unix 2 [ ACC ] STREAM LISTENING 46900 17845/master private/virtual
unix 2 [ ACC ] STREAM LISTENING 46904 17845/master private/lmtp
unix 2 [ ACC ] STREAM LISTENING 46908 17845/master private/anvil
unix 2 [ ACC ] STREAM LISTENING 46912 17845/master private/scache
unix 2 [ ACC ] STREAM LISTENING 46916 17845/master private/plesk_virtual
unix 2 [ ACC ] STREAM LISTENING 46920 17845/master private/mailman
unix 2 [ ACC ] STREAM LISTENING 46924 17845/master private/plesk_saslauthd
unix 2 [ ACC ] STREAM LISTENING 46928 17845/master private/xxx.xxx.xxx.xxx-
unix 2 [ ACC ] STREAM LISTENING 70631 24649/spamd_full.so /tmp/spamd_full.sock

Server steht auf Level 3
chkconfig --list | grep '3:on' ergibt folgendes
auditd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
blk-availability 0:off 1:on 2:on 3:on 4:on 5:on 6:off
courier-imap 0:off 1:off 2:on 3:on 4:on 5:on 6:off
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
ip6tables 0:off 1:off 2:on 3:on 4:on 5:on 6:off
iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off
lvm2-monitor 0:off 1:on 2:on 3:on 4:on 5:on 6:off
mdmonitor 0:off 1:off 2:on 3:on 4:on 5:on 6:off
netfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
ntpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
pc-remote 0:off 1:off 2:on 3:on 4:on 5:on 6:off
portreserve 0:off 1:off 2:on 3:on 4:on 5:on 6:off
postfix 0:off 1:off 2:on 3:on 4:on 5:on 6:off
psa 0:off 1:off 2:on 3:on 4:on 5:on 6:off
psa-firewall 0:off 1:off 2:on 3:on 4:on 5:on 6:off
psa-spamassassin 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rsyslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off
sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
sw-cp-server 0:off 1:on 2:on 3:on 4:on 5:on 6:off
udev-post 0:off 1:on 2:on 3:on 4:on 5:on 6:off
xe-linux-distribution 0:off 1:off 2:on 3:on 4:on 5:on 6:off
xinetd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

Die Firewall ist über Plesk wie folgt eingestellt
Parallels Customer & Business Manager payment gateways Allow incoming from all
Parallels Single Sign-On Allow incoming from all
Parallels Products Installer Allow incoming from all
Plesk administrative interface Allow incoming from all
WWW server Allow incoming from all
FTP server Deny incoming from all
SSH (secure shell) server Allow incoming from all
SMTP (submission port) server Allow incoming from all
SMTP (mail sending) server Allow incoming from all
POP3 (mail retrieval) server Allow incoming from all
IMAP (mail retrieval) server Allow incoming from all
Mail password change service Allow incoming from all
MySQL server Allow incoming from all
PostgreSQL server Deny incoming from all
Tomcat administrative interface Deny incoming from all
Samba (file sharing in Windows networks) Deny incoming from all
Plesk VPN Allow incoming from all
Domain name server Allow incoming from all
IPv6 Neighbor Discovery Allow incoming from all
Ping service Allow incoming from all
System policy for incoming traffic Deny all other incoming traffic
System policy for outgoing traffic Allow all other outgoing traffic
System policy for forwarding of traffic Deny forwarding of all other traffic

Schaut da mal bitte drauf ob ich noch etwas vergessen habe was ich rausnehmen muss bzw. absichern muss.
Wie schon oben erwähnt, muss Magento und Wordpress laufen. Die brauchen MySQL, Apache, HTTP, HTTPS, PHP.

Da der Server bei 1und1 steht würde ich auch den Emailverkehr lieber über den Dienst von 1und1 laufen lassen und nicht über meinen Server. Also könnte ich doch auch die imap und pop Ports dichtmachen, oder ? Ich denke auch einige Dienste könnten noch beendet werden wie z.B. portreserve (wofür ist der eigentlich ? Drucken ?).

Wäre supernett wenn Ihr mir mal über die Schulter schauen könntet und ein paar Tipps geben könnt. Ich bin extrem lernfähig auch wenn ich aus der Windowswelt komme face-smile

Liebe Grüsse

Content-Key: 213989

Url: https://administrator.de/contentid/213989

Printed on: April 23, 2024 at 09:04 o'clock

Mitglied: 50793
50793 Aug 12, 2013 at 14:04:57 (UTC)
Goto Top
Hi,


ich bin jetzt kein Linux Experte aber was du dir anschauen solltest wäre
Fail2ban


http://www.fail2ban.org/

Grüße