Jun 26 - Update documents
This commit is contained in:
@@ -186,6 +186,27 @@ ufw enable
|
||||
ufw status
|
||||
```
|
||||
|
||||
### 1.5b Install Fail2ban (brute-force protection)
|
||||
|
||||
```bash
|
||||
apt install -y fail2ban
|
||||
|
||||
# Copy the JQC filter and jail configs from the repository
|
||||
cp /home/jqc/deploy/fail2ban/filter.d/jqc-login.conf /etc/fail2ban/filter.d/
|
||||
cp /home/jqc/deploy/fail2ban/jail.d/jqc.conf /etc/fail2ban/jail.d/
|
||||
|
||||
# Confirm logpath in jqc.conf matches your actual log file
|
||||
# Default is /var/www/jqc/logs/jqc.log — update if your path differs:
|
||||
# sed -i 's|/var/www/jqc/logs/jqc.log|/home/jqc/logs/jqc.log|g' /etc/fail2ban/jail.d/jqc.conf
|
||||
|
||||
systemctl enable fail2ban
|
||||
systemctl restart fail2ban
|
||||
|
||||
# Verify the jail is active
|
||||
fail2ban-client status jqc-login
|
||||
# Expected: "Status for the jail: jqc-login" with Banned IP counts
|
||||
```
|
||||
|
||||
### 1.6 Create the `jqc` system user
|
||||
|
||||
```bash
|
||||
@@ -1206,6 +1227,18 @@ SHELL=/bin/bash
|
||||
0 3 * * * curl -s -X POST https://YOUR_DOMAIN/notifications/cleanup-tokens \
|
||||
-d "token=YOUR_DIGEST_SECRET" >> /home/jqc/logs/cron.log 2>&1
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# Trial-ending reminder emails — 9:00 AM Eastern
|
||||
# ----------------------------------------------------------------
|
||||
0 9 * * * curl -s -X POST https://YOUR_DOMAIN/notifications/trial-reminders \
|
||||
-d "token=YOUR_DIGEST_SECRET" >> /home/jqc/logs/cron.log 2>&1
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# Payment dunning reminders (day 3 / 7 / 14 escalation) — 10:00 AM Eastern
|
||||
# ----------------------------------------------------------------
|
||||
0 10 * * * curl -s -X POST https://YOUR_DOMAIN/notifications/dunning-reminders \
|
||||
-d "token=YOUR_DIGEST_SECRET" >> /home/jqc/logs/cron.log 2>&1
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# Nightly database backup — 2:00 AM Eastern
|
||||
# ----------------------------------------------------------------
|
||||
@@ -1384,6 +1417,7 @@ Work through this list after DNS propagation is confirmed. Check each item in th
|
||||
- [ ] Log rotation is working: `/home/jqc/logs/` is not filling up unexpectedly
|
||||
- [ ] First nightly backup completed (check `/var/backups/jqc/` the morning after cutover)
|
||||
- [ ] Firewall is active: `ufw status` shows correct rules
|
||||
- [ ] Fail2ban is active: `fail2ban-client status jqc-login` shows the jail running
|
||||
|
||||
### Decommission old server (after 48 hours)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user