Emma2
Anmeldungsdatum: 28. Dezember 2018
Beiträge: 438
|
Hallo. (Vorab bemerkt: die Kiste ist noch 18.04, weil da mein SOGo drauf läuft, und das muss man erst aufs Release-Upgrade "vorbereiten".) Ihr habt mir netterweise geholfen, dass mein WEBMIN wieder läuft: https://forum.ubuntuusers.de/topic/webmin-tut-nicht-mehr/2/, und da ich mich noch nicht einlesen konnte, wie ich diese Änderung permanent mache (weiß übrigens immer noch nicht, wieso das mein einziger Server mit diesem Problem ist), wollte ich den Aufruf ganz plump beim Systemstart ausführen lassen. Ich habe mir eine .sh-Datei erzeugt, die ich bisher manuell starte:
| $ cat ./enable-webmin-port.sh
sudo iptables -A INPUT -p tcp -m tcp --dport 10000 -j ACCEPT
|
Aber egal, ob ich das Skript aufrufe oder iptables direkt, scheint das nicht zu funktionieren:
| $ crontab -l
#eine dieser beiden Zeilen auskommentieren!
@reboot iptables -A INPUT -p tcp -m tcp --dport 10000 -j ACCEPT
@reboot /home/localadmin/enable-webmin-port.sh
|
Wo ist denn schon wieder mein Denkfehler? p.s.: DASS @reboot funktioniert, merke ich daran, dass ich damit alle meine VB-VMs starte.
|
lubux
Anmeldungsdatum: 21. November 2012
Beiträge: 13931
|
Emma2 schrieb: Aber egal, ob ich das Skript aufrufe oder iptables direkt, scheint das nicht zu funktionieren:
| $ crontab -l
#eine dieser beiden Zeilen auskommentieren!
@reboot iptables -A INPUT -p tcp -m tcp --dport 10000 -j ACCEPT
@reboot /home/localadmin/enable-webmin-port.sh
|
Ist das deine einzige iptables-Regel? Du könntest netfilter-persistent benutzen. iptables-Regeln werden als root gesetzt, d. h. dann wäre sudo im Script nicht erforderlich. Im Script evtl. auch eine shebang benutzen und es ausführbar machen. Versuch mal mit dem absoluten Pfad:
@reboot /sbin/iptables -A INPUT -p tcp -m tcp --dport 10000 -j ACCEPT
Ist die default policy der INPUT chain auf DROP, weil Du diese ACCEPT-Regel brauchst? Wenn ja, dann solltest Du noch weitere iptables-Regeln brauchen/setzen (lo, DNS, NTP, icmp, related/established, ...).
|
Emma2
(Themenstarter)
Anmeldungsdatum: 28. Dezember 2018
Beiträge: 438
|
Hohoho... das geht mir zu schnell... (ich habe erst Weihnachten 2019 überhaupt mit Linux angefangen, Mint als Client, und habe nun fast alle meine Server von Windoofs umgestellt). Es gelangt mir recht einfach, ein iRedMail zu installieren und zum Laufen zu bringen (die Deinstallation eines Exchange-Servers war da ein ganz anderes Abenteuer... gehört hier aber nicht her). Ich habe sogar ZWEI (aus meiner Sicht gleich konfigurierte) derartige Mail-Server laufen und dann noch ein paar andere, DokuWiki, Subversion, GIT - ALLE laufen prima, und auf FAST ALLEN konnte ich ganz problemlos WEBMIN zum Laufen bringen. Auch auf dem Server, um den es geht, funktionierte es zunächst (meine ich zumindest), aber "plötzlich" funktionierte WEBMIN dort nicht mehr. Den Grund herausfinden konnte ich auch mit Eurer Hilfe nicht (siehe den Thread oben), so dass es schließlich zum "Workaround" mit IPTABLES kam. Langer Rede kurzer - aber für mich spannender - Sinn:
Wie und wo kann ich die Antworten auf Deine Fragen finden? Ich will das gern auch auf BEIDEN Mailservern machen, um den Unterschied zu sehen. In meiner CRONTAB steht sonst nichts drin, wenn es also andere IPTABLES-Regeln gibt, dann sind die "nicht von mir", und deshalb weiß ich auch nicht, wie die "default policy" ist. Alles andere außer WEBMIN:10000 läuft ganz prima, also sowohl SSH/SFTP als auch Zugriff auf die Roundcube und SOGo-Mail. Nur für WEBMIN muss ich nach jedem Neustart den IPTABLES-Befehl aufrufen. Wenn dieser Thread hilft, mein eigentliches Problem zu lösen, wäre mir das natürlich noch lieber, als den Workaround per CRONTAB aufzurufen. (Und bitte nicht böse sein ob meiner Fragen - ich lerne noch, ich lerne das alles gerne, aber nach 30 Jahren Windows-Verirrung dauert das alles ein bisschen länger...)
|
lubux
Anmeldungsdatum: 21. November 2012
Beiträge: 13931
|
Emma2 schrieb: Wie und wo kann ich die Antworten auf Deine Fragen finden?
OK, wie sind die Ausgaben von:
sudo iptables -nvx -L
sudo iptables -nvx -L -t nat
apt-cache policy netfilter-persistent
?
|
Emma2
(Themenstarter)
Anmeldungsdatum: 28. Dezember 2018
Beiträge: 438
|
Auf der Kiste, auf der "sowieso alles" funktioniert:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 | localadmin@sve-com:~$ sudo iptables -nvx -L
Chain INPUT (policy ACCEPT 95 packets, 28469 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 86 packets, 28623 bytes)
pkts bytes target prot opt in out source destination
localadmin@sve-com:~$ sudo iptables -nvx -L -t nat
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
localadmin@sve-com:~$ apt-cache policy netfilter-persistent
netfilter-persistent:
Installiert: (keine)
Installationskandidat: 1.0.4+nmu2ubuntu1
Versionstabelle:
1.0.4+nmu2ubuntu1 500
500 http://se.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
1.0.4+nmu2 500
500 http://se.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
localadmin@sve-com:~$
|
Auf dem Rechner mit dem "Problem" steht nach einem Neustart (also VOR dem Workaround):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 | localadmin@svr-com:~$ sudo iptables -nvx -L
Chain INPUT (policy DROP 33 packets, 2858 bytes)
pkts bytes target prot opt in out source destination
1786 569387 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
173 10659 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 8
1 60 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
1 60 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:25
1 60 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:587
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:110
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:995
2 120 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:143
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:993
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 1947 packets, 686051 bytes)
pkts bytes target prot opt in out source destination
localadmin@svr-com:~$ sudo iptables -nvx -L -t nat
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
localadmin@svr-com:~$ apt-cache policy netfilter-persistent
netfilter-persistent:
Installiert: (keine)
Installationskandidat: 1.0.4+nmu2ubuntu1
Versionstabelle:
1.0.4+nmu2ubuntu1 500
500 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
1.0.4+nmu2 500
500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
localadmin@svr-com:~$
|
Das sieht ja für mich VOLLKOMMEN ANDERS aus... ☹ Dabei bin ich "ganz ehrlich" ziemlich sicher, beide nacheinander aber gleich aufgesetzt zu haben...
|
lubux
Anmeldungsdatum: 21. November 2012
Beiträge: 13931
|
Emma2 schrieb: Auf dem Rechner mit dem "Problem" steht nach einem Neustart (also VOR dem Workaround):
localadmin@svr-com:~$ sudo iptables -nvx -L
Chain INPUT (policy DROP 33 packets, 2858 bytes)
pkts bytes target prot opt in out source destination
1786 569387 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
173 10659 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 8
1 60 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
1 60 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:25
1 60 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:587
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:110
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:995
2 120 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:143
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:993 Das sieht ja für mich VOLLKOMMEN ANDERS aus... ☹ Dabei bin ich "ganz ehrlich" ziemlich sicher, beide nacheinander aber gleich aufgesetzt zu haben...
Naja, irgendjemand muss das ja eingegeben haben. Hast das allein gemacht oder hat dir jemand geholfen? Oder Du hast eine Anleitung strikt befolgt, in der das so beinhaltet war. Ist ja soweit auch OK. Wenn man jetzt wüsste, auf welcher Art und Weise bzw. Weg, diese schon vorhandenen iptables-Regeln gesetzt werden, könntest Du dort mit deiner Regel für webmin, ergänzen. Wenn Du das nicht feststellen kannst, könnte man evtl. auch mit der /etc/rc.local probieren.
Wie ist die Ausgabe von:
cat /etc/rc.local
?
BTW: Wenn ich aber für diesen Server allein verantwortlich wäre, dann würde ich schon wissen wollen, wie diese vorhandenen iptables-Regeln gesetzt worden sind. 😉
|
Emma2
(Themenstarter)
Anmeldungsdatum: 28. Dezember 2018
Beiträge: 438
|
Ja, ich bin "per Anleitung" vorgegangen, und zwar habe ich Ubuntu installiert und dann ein paar Dinge nachgeschoben, die ich bei mir hinterlegt habe. Danach habe ich das Installskript für iRedMail ausgeführt. Ich könnte mich nicht daran erinnern, dort etwas eingetragen zu haben, und niemand anders hat physisch Zugriff auf den Rechner (bzw. den VB-Host). Ich frage mal andersherum: auf dem "oberen" Rechner, auf sve-com, funktioniert ja alles. Kann ich nicht die Einstellungen des unteren, also von svr-com entsprechend anpassen? Wenn ja, wie mache ich das am besten? (Habe den alten Thread nochmal durchgestöbert und sehe auch nicht, dass ich dort entsprechende Änderungen gemacht hätte...) Nachtrag: Die auf svr-com freigegebenen Ports sind ja die, die für den Mailverkehr gebraucht werden. Kann es vielleicht doch sein, dass ich beim Installieren von iRedMail etwas unterschiedlich gemacht habe? (Dass ich einmal angekreuzt habe "Alles offen" und einmal "Nur die Mail-Ports offen"?) Das kann ich natürlich nicht mehr ausschließen.
|
lubux
Anmeldungsdatum: 21. November 2012
Beiträge: 13931
|
Emma2 schrieb: Nachtrag: Die auf svr-com freigegebenen Ports sind ja die, die für den Mailverkehr gebraucht werden. Kann es vielleicht doch sein, dass ich beim Installieren von iRedMail etwas unterschiedlich gemacht habe? (Dass ich einmal angekreuzt habe "Alles offen" und einmal "Nur die Mail-Ports offen"?) Das kann ich natürlich nicht mehr ausschließen.
Poste mal von dem Server, bei dem die iptables-Regeln gesetzt sind (inkl. default policy auf DROP ist), die Ausgaben von:
cat /etc/rc.local
ls -la /etc/iptables
Und/oder Du schaust in deinem install-Script nach, denn dort muss man ja sehen/erkennen wie bzw. wo diese iptables-Regeln gesetzt worden sind.
|
Emma2
(Themenstarter)
Anmeldungsdatum: 28. Dezember 2018
Beiträge: 438
|
lubux schrieb: Poste mal von dem Server, bei dem die iptables-Regeln gesetzt sind (inkl. default policy auf DROP ist), die Ausgaben von:
cat /etc/rc.local
ls -la /etc/iptables
Das war eher nix:
| $ cat /etc/rc.local
cat: /etc/rc.local: No such file or directory
$ ls -la /etc/iptables
ls: cannot access '/etc/iptables': No such file or directory
|
lubux schrieb: Und/oder Du schaust in deinem install-Script nach, denn dort muss man ja sehen/erkennen wie bzw. wo diese iptables-Regeln gesetzt worden sind.
Oh, das müsste ich erst raussuchen. Ich habe ja deshalb iRedMail gewählt, weil ich mit meinen geringen Detailkenntnissen die gesamte Mail-Einrichtung alleine nicht hinbekommen hätte. (Wenn ich es richtig verstehe, ist iRedMail ja kein eigener Server, sondern bietet "nur" geschickte Installationsskripte, um die normalen Mailprogramme einzurichten.)
|
lubux
Anmeldungsdatum: 21. November 2012
Beiträge: 13931
|
Emma2 schrieb: Oh, das müsste ich erst raussuchen.
Ja, denn wir sollten schon wissen wie die iptables-Regeln gesetzt werden.
|
Emma2
(Themenstarter)
Anmeldungsdatum: 28. Dezember 2018
Beiträge: 438
|
Ok, suche ich nach. Aber könnte ich nicht einfach den Problemserver nach dem Vorbild des funktionierenden konfigurieren?
|
lubux
Anmeldungsdatum: 21. November 2012
Beiträge: 13931
|
Emma2 schrieb: Aber könnte ich nicht einfach den Problemserver nach dem Vorbild des funktionierenden konfigurieren?
Doch, aber deshalb wollen wir ja wissen wie die iptables-Regeln gesetzt werden. EDIT: Poste von beiden Servern die Ausgabe von:
ls -la /etc/default | grep -i iptables Quelle: https://github.com/iredmail/iRedMail/tree/master/samples/firewall/iptables
|
Emma2
(Themenstarter)
Anmeldungsdatum: 28. Dezember 2018
Beiträge: 438
|
lubux schrieb: Poste von beiden Servern die Ausgabe von:
ls -la /etc/default | grep -i iptables
Auf dem, auf dem ich immer den Patch anwenden muss, steht:
| $ ls -la /etc/default | grep -i iptables
-rw-r--r-- 1 root root 3232 Sep 26 2019 iptables
|
Auf dem anderen kommt nichts zurück, die Datei existiert also nicht. p.s.: Die Installaitonsskripten, sind die, die mit dem iRedMail-Paket kommen:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161 | #!/usr/bin/env bash
# Author: Zhang Huangbin (zhb@iredmail.org)
#---------------------------------------------------------------------
# This file is part of iRedMail, which is an open source mail server
# solution for Red Hat(R) Enterprise Linux, CentOS, Debian and Ubuntu.
#
# iRedMail is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# iRedMail is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with iRedMail. If not, see <http://www.gnu.org/licenses/>.
#---------------------------------------------------------------------
# ------------------------------
# Define some global variables.
# ------------------------------
tmprootdir="$(dirname $0)"
echo ${tmprootdir} | grep '^/' >/dev/null 2>&1
if [ X"$?" == X"0" ]; then
export ROOTDIR="${tmprootdir}"
else
export ROOTDIR="$(pwd)"
fi
cd ${ROOTDIR}
export CONF_DIR="${ROOTDIR}/conf"
export FUNCTIONS_DIR="${ROOTDIR}/functions"
export DIALOG_DIR="${ROOTDIR}/dialog"
export PKG_DIR="${ROOTDIR}/pkgs/pkgs"
export PKG_MISC_DIR="${ROOTDIR}/pkgs/misc"
export SAMPLE_DIR="${ROOTDIR}/samples"
export PATCH_DIR="${ROOTDIR}/patches"
export TOOLS_DIR="${ROOTDIR}/tools"
. ${CONF_DIR}/global
. ${CONF_DIR}/core
# Check downloaded packages, pkg repository.
[ -f ${STATUS_FILE} ] && . ${STATUS_FILE}
if [ X"${status_get_all}" != X"DONE" ]; then
cd ${ROOTDIR}/pkgs/ && bash get_all.sh
if [ X"$?" == X'0' ]; then
cd ${ROOTDIR}
else
exit 255
fi
fi
# --------------------------------------
# Check target platform and environment.
# --------------------------------------
# Required by OpenVZ:
# Make sure others can read-write /dev/null and /dev/*random, so that it won't
# interrupt iRedMail installation.
chmod go+rx /dev/null /dev/*random &>/dev/null
check_env
# Define paths of some directories
# Directory used to store mailboxes
export STORAGE_MAILBOX_DIR="${STORAGE_MAILBOX_DIR:=${STORAGE_BASE_DIR}/${STORAGE_NODE}}"
# Directory used to store sieve filters
export SIEVE_DIR="${SIEVE_DIR:=${STORAGE_BASE_DIR}/sieve}"
# Directory used to store daily SQL/LDAP backup files
export BACKUP_DIR="${BACKUP_DIR:=${STORAGE_BASE_DIR}/backup}"
# Directory used to store public IMAP folders
export PUBLIC_MAILBOX_DIR="${PUBLIC_MAILBOX_DIR:=${STORAGE_BASE_DIR}/public}"
# Domain admin email address
export DOMAIN_ADMIN_EMAIL="${DOMAIN_ADMIN_NAME}@${FIRST_DOMAIN}"
# Import global variables in specified order.
. ${CONF_DIR}/web_server
. ${CONF_DIR}/openldap
. ${CONF_DIR}/ldapd
. ${CONF_DIR}/mysql
. ${CONF_DIR}/postgresql
. ${CONF_DIR}/dovecot
. ${CONF_DIR}/postfix
. ${CONF_DIR}/mlmmj
. ${CONF_DIR}/amavisd
. ${CONF_DIR}/iredapd
. ${CONF_DIR}/memcached
. ${CONF_DIR}/sogo
. ${CONF_DIR}/clamav
. ${CONF_DIR}/spamassassin
. ${CONF_DIR}/roundcube
. ${CONF_DIR}/netdata
. ${CONF_DIR}/fail2ban
. ${CONF_DIR}/iredadmin
# Import functions in specified order.
if [ X"${DISTRO}" == X'FREEBSD' ]; then
# Install packages from freebsd ports tree.
. ${FUNCTIONS_DIR}/packages_freebsd.sh
else
. ${FUNCTIONS_DIR}/packages.sh
fi
. ${FUNCTIONS_DIR}/system_accounts.sh
. ${FUNCTIONS_DIR}/web_server.sh
. ${FUNCTIONS_DIR}/ldap_server.sh
. ${FUNCTIONS_DIR}/mysql.sh
. ${FUNCTIONS_DIR}/postgresql.sh
# Switch backend
. ${FUNCTIONS_DIR}/backend.sh
. ${FUNCTIONS_DIR}/postfix.sh
. ${FUNCTIONS_DIR}/dovecot.sh
. ${FUNCTIONS_DIR}/mlmmj.sh
. ${FUNCTIONS_DIR}/amavisd.sh
. ${FUNCTIONS_DIR}/iredapd.sh
. ${FUNCTIONS_DIR}/clamav.sh
. ${FUNCTIONS_DIR}/spamassassin.sh
. ${FUNCTIONS_DIR}/roundcubemail.sh
. ${FUNCTIONS_DIR}/sogo.sh
. ${FUNCTIONS_DIR}/fail2ban.sh
. ${FUNCTIONS_DIR}/iredadmin.sh
. ${FUNCTIONS_DIR}/netdata.sh
. ${FUNCTIONS_DIR}/optional_components.sh
. ${FUNCTIONS_DIR}/cleanup.sh
# ************************************************************************
# *************************** Script Main ********************************
# ************************************************************************
# Install all required packages.
check_status_before_run install_all || (ECHO_ERROR "Package installation error, please check the output log.\n\n" && exit 255)
cat <<EOF
********************************************************************
* Start iRedMail Configurations
********************************************************************
EOF
check_status_before_run generate_ssl_keys
check_status_before_run add_required_users
check_status_before_run web_server_config
check_status_before_run backend_install
check_status_before_run postfix_setup
check_status_before_run dovecot_setup
check_status_before_run mlmmj_config
check_status_before_run mlmmjadmin_config
check_status_before_run clamav_config
check_status_before_run amavisd_config
check_status_before_run sa_config
optional_components
check_status_before_run cleanup
|
Aber das ist für mich (noch) "Böhmische Dörfer", und vermutlich wird hier eine Hilfdatei importiert (Zeile 82-100)?
Oder welches der anderen Skripte (Zeile 110-132) könnte denn das richtige sein? (Macht ja wenig Sinn, dass ich jtzt alle davon poste, oder?)
(Alternativ könnte ich auf einem neuen, leeren Server nochmal iRedMail "installieren" und darauf achten, ob ich da irgend etwas eingestellt habe...)
|
lubux
Anmeldungsdatum: 21. November 2012
Beiträge: 13931
|
Emma2 schrieb: Auf dem, auf dem ich immer den Patch anwenden muss, steht:
| $ ls -la /etc/default | grep -i iptables
-rw-r--r-- 1 root root 3232 Sep 26 2019 iptables
|
OK, dann poste die Ausgabe von:
cat /etc/default/iptables
|
Emma2
(Themenstarter)
Anmeldungsdatum: 28. Dezember 2018
Beiträge: 438
|
lubux schrieb: OK, dann poste die Ausgabe von:
cat /etc/default/iptables
Gerne doch:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112 | $ cat /etc/default/iptables
#---------------------------------------------------------------------
# This file is part of iRedMail, which is an open source mail server
# solution for Red Hat(R) Enterprise Linux, CentOS, Debian and Ubuntu.
#
# iRedMail is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# iRedMail is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with iRedMail. If not, see <http://www.gnu.org/licenses/>.
#---------------------------------------------------------------------
#
# Sample iptables rules. It should be located at:
# /etc/sysconfig/iptables
#
# Shipped within iRedMail project:
# * http://www.iRedMail.org/
#
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
# Keep state.
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Loop device.
-A INPUT -i lo -j ACCEPT
# Allow PING from remote hosts.
-A INPUT -p icmp --icmp-type echo-request -j ACCEPT
# ssh
-A INPUT -p tcp --dport 22 -j ACCEPT
# http, https
-A INPUT -p tcp --dport 80 -j ACCEPT
-A INPUT -p tcp --dport 443 -j ACCEPT
# smtp, submission
-A INPUT -p tcp --dport 25 -j ACCEPT
-A INPUT -p tcp --dport 587 -j ACCEPT
# pop3, pop3s
-A INPUT -p tcp --dport 110 -j ACCEPT
-A INPUT -p tcp --dport 995 -j ACCEPT
#-A INPUT -p tcp --dport 10110 -j ACCEPT
# imap, imaps
-A INPUT -p tcp --dport 143 -j ACCEPT
-A INPUT -p tcp --dport 993 -j ACCEPT
#-A INPUT -p tcp --dport 10143 -j ACCEPT
# lmtp
#-A INPUT -p tcp --dport 24 -j ACCEPT
#-A INPUT -p tcp --dport 1024 -j ACCEPT
# managesieve
#-A INPUT -p tcp --dport 4190 -j ACCEPT
#-A INPUT -p tcp --dport 10419 -j ACCEPT
# Dovecot SASL AUTH service for HAProxy
#-A INPUT -p tcp --dport 12346 -j ACCEPT
# ldap/ldaps
#-A INPUT -p tcp --dport 389 -j ACCEPT
#-A INPUT -p tcp --dport 636 -j ACCEPT
# MySQL service and cluster.
# - the regular MySQL port (default 3306)
# - port for group (Galera) communication (default 4567)
# - port for State Transfer (default 4444)
# - port for Incremental State Transfer (default is: port for group communication (4567) + 1 = 4568)
#
# Note: Please make sure MySQL service is not binding to localhost with
# 'bind-address=127.0.0.1'.
#-A INPUT -p tcp --dport 3306 -j ACCEPT
#-A INPUT -p tcp --dport 4444 -j ACCEPT
#-A INPUT -p tcp --dport 4567 -j ACCEPT
#-A INPUT -p tcp --dport 4568 -j ACCEPT
# PostgreSQL service.
#-A INPUT -p tcp --dport 5432 -j ACCEPT
# Amavisd
#-A INPUT -p tcp --dport 10024 -j ACCEPT
#-A INPUT -p tcp --dport 10025 -j ACCEPT
#-A INPUT -p tcp --dport 10026 -j ACCEPT
#-A INPUT -p tcp --dport 9998 -j ACCEPT
# iRedAPD
#-A INPUT -p tcp --dport 7777 -j ACCEPT
# ftp.
#-A INPUT -p tcp --dport 20 -j ACCEPT
#-A INPUT -p tcp --dport 21 -j ACCEPT
# ejabberd
#-A INPUT -p tcp --dport 5222 -j ACCEPT
#-A INPUT -p tcp --dport 5223 -j ACCEPT
#-A INPUT -p tcp --dport 5280 -j ACCEPT
COMMIT
|
|