Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
redhat:database-redhat:phpmyadmin-redhat [2020/04/02 14:57] – michael | redhat:database-redhat:phpmyadmin-redhat [2020/06/04 19:58] (current) – [Konfiguration des Zugriffs auf phpMyAdmin] michael | ||
---|---|---|---|
Line 41: | Line 41: | ||
- | ===== Einschränken | + | ===== Konfiguration |
+ | ACHTUNG bei Variante 1 als sowohl Variante 2 müssen natürlich noch die beiden ersten '' | ||
<WRAP center box 100%> | <WRAP center box 100%> | ||
- | ==== Hardening Beispiel für Apache2 | + | ==== Variante 1 - Verwenden des Standard Ports und einschränken des Zugriffs |
Um den Zugriff auf unser phpMyAdmin Verzeichnis -> '' | Um den Zugriff auf unser phpMyAdmin Verzeichnis -> '' | ||
Line 58: | Line 60: | ||
</ | </ | ||
- | <sxh bash; first-line: 1> | + | <sxh bash; first-line: 1; highlight: [6,7]> |
# Web application to manage MySQL | # Web application to manage MySQL | ||
# | # | ||
Line 64: | Line 66: | ||
Options -Indexes +FollowSymLinks | Options -Indexes +FollowSymLinks | ||
AllowOverride None | AllowOverride None | ||
- | Require ip 192.168.1.4 | + | Require ip 192.168.1 |
- | Require ip 192.168.1.65 | + | |
Require ip 127.0.0.1 | Require ip 127.0.0.1 | ||
Require ip ::1 | Require ip ::1 | ||
Line 83: | Line 84: | ||
</ | </ | ||
- | Nach gemachten Änderungen, | + | Nach gemachten Änderungen, |
< | < | ||
Line 89: | Line 90: | ||
</ | </ | ||
- | <wrap em> | ||
</ | </ | ||
- | |||
---- | ---- | ||
+ | <WRAP center box 100%> | ||
+ | ==== Variante 2 - Verwenden eines Custom-Ports und einschränken des Zugriffs ==== | ||
+ | |||
+ | Erstellen eines eigenen VirtualHosts (mit eigenen Port) auf welchem dann ausschliesslich auf phpmyadmin zugegriffen wird: | ||
+ | |||
+ | < | ||
+ | # vim / | ||
+ | </ | ||
+ | |||
+ | <wrap em> | ||
+ | |||
+ | < | ||
+ | # vim / | ||
+ | </ | ||
+ | |||
+ | <sxh bash; first-line: 1; highlight: [16,17]> | ||
+ | Listen 6060 | ||
+ | |||
+ | < | ||
+ | ServerAdmin michael.r467@gmail.com | ||
+ | |||
+ | ErrorLog "/ | ||
+ | CustomLog "/ | ||
+ | |||
+ | # Web application to manage MySQL | ||
+ | # | ||
+ | DocumentRoot "/ | ||
+ | |||
+ | < | ||
+ | Options -Indexes +FollowSymLinks | ||
+ | AllowOverride None | ||
+ | Require ip 192.168.1 | ||
+ | Require ip 127.0.0.1 | ||
+ | Require ip ::1 | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | Require all denied | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | Require all denied | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | Require all denied | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Damit der Webserver auch andere Ports als '' | ||
+ | < | ||
+ | |||
+ | |||
+ | Um die gemachten Änderungen zu übernehmen wird nun ein reload des Apache Webservers ausgeführt und anschliessend noch der separate Port 6060 geöffnet! | ||
+ | |||
+ | < | ||
+ | # systemctl reload httpd | ||
+ | |||
+ | # firewall-cmd --zone=public --add-port=6060/ | ||
+ | # firewall-cmd --reload | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | <wrap em>Setup complete!</ |