This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| computing:cockpit [2026/10/22 19:22] – oemb1905 | computing:cockpit [2026/11/12 16:32] (current) – oemb1905 | ||
|---|---|---|---|
| Line 165: | Line 165: | ||
| maxretry | maxretry | ||
| </ | </ | ||
| + | |||
| + | When testing, this might help: | ||
| + | |||
| + | fail2ban-client reload --restart --unban cockpit-apache | ||
| The pcp logging tool has a cranky timer: | The pcp logging tool has a cranky timer: | ||
| Line 177: | Line 181: | ||
| systemctl reset-failed pmlogger_daily.service | systemctl reset-failed pmlogger_daily.service | ||
| + | To increase log retention, open '' | ||
| + | |||
| + | < | ||
| + | $PCP_COMPRESSAFTER=7 | ||
| + | LOCALHOSTNAME | ||
| + | </ | ||
| + | |||
| + | Once that's done, restart the service with '' | ||
| + | |||
| + | < | ||
| + | sudo certbot certonly --standalone \ | ||
| + | -d assist.domain.com \ | ||
| + | --pre-hook " | ||
| + | --post-hook " | ||
| + | |||
| + | sudo nano / | ||
| + | # HTTP → HTTPS | ||
| + | server { | ||
| + | listen 80; | ||
| + | listen [::]:80; | ||
| + | server_name assist.domain.com; | ||
| + | |||
| + | # allow 96.40.208.144; | ||
| + | # allow 2601: | ||
| + | # deny all; | ||
| + | |||
| + | return 301 https:// | ||
| + | } | ||
| + | |||
| + | # HTTPS reverse proxy to Cockpit | ||
| + | server { | ||
| + | listen 443 ssl http2; | ||
| + | listen [::]:443 ssl http2; | ||
| + | server_name assist.domain.com; | ||
| + | |||
| + | ssl_certificate / | ||
| + | ssl_certificate_key / | ||
| + | include / | ||
| + | ssl_dhparam / | ||
| + | |||
| + | add_header Strict-Transport-Security " | ||
| + | |||
| + | # allow 96.40.208.144; | ||
| + | # allow 2601: | ||
| + | # deny all; | ||
| + | |||
| + | location / { | ||
| + | proxy_pass http:// | ||
| + | proxy_set_header Host $host; | ||
| + | proxy_set_header X-Real-IP $remote_addr; | ||
| + | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| + | proxy_set_header X-Forwarded-Proto $scheme; | ||
| + | |||
| + | proxy_http_version 1.1; | ||
| + | proxy_set_header Upgrade $http_upgrade; | ||
| + | proxy_set_header Connection " | ||
| + | proxy_buffering off; | ||
| + | proxy_read_timeout 300s; | ||
| + | gzip off; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | sudo ln -s / | ||
| + | sudo nginx -t && sudo systemctl reload nginx | ||
| + | </ | ||
| + | |||
| + | Then, for the fail2ban rule, rewrite it as follows: | ||
| + | |||
| + | < | ||
| + | sudo nano / | ||
| + | [Definition] | ||
| + | failregex = ^< | ||
| + | ignoreregex = | ||
| + | </ | ||
| + | < | ||
| + | sudo nano / | ||
| + | [cockpit-nginx] | ||
| + | enabled | ||
| + | port = http,https | ||
| + | filter | ||
| + | logpath | ||
| + | maxretry = 2 | ||
| + | </ | ||
| - | --- // | + | --- // |