Merge pull request #13 from swissmakers/main

update dev to main, before new dev commit
This commit is contained in:
Swissmakers GmbH
2025-11-12 15:46:46 +01:00
committed by GitHub
3 changed files with 21 additions and 8 deletions

View File

@@ -1,11 +1,23 @@
# deployment/fail2ban-curl-allow.te
module fail2ban-curl-allow 1.0; module fail2ban-curl-allow 1.1;
require { require {
type fail2ban_t; type fail2ban_t;
type http_cache_port_t; type http_cache_port_t;
class tcp_socket name_connect; type var_run_t;
type etc_t;
type var_log_t;
class tcp_socket name_connect;
class file { read write open execute };
class dir { search read };
} }
#============= fail2ban_t ============== #============= fail2ban_t ==============
allow fail2ban_t http_cache_port_t:tcp_socket name_connect; allow fail2ban_t http_cache_port_t:tcp_socket name_connect;
# Zusätzliche benötigte Berechtigungen
allow fail2ban_t etc_t:file { read open };
allow fail2ban_t var_log_t:file { read open };
allow fail2ban_t var_run_t:file { read write open };
allow fail2ban_t var_run_t:dir search;
allow fail2ban_t etc_t:dir search;

View File

@@ -26,7 +26,7 @@ Clone the repository to `/opt/fail2ban-ui`:
```bash ```bash
sudo git clone https://github.com/swissmakers/fail2ban-ui.git /opt/fail2ban-ui sudo git clone https://github.com/swissmakers/fail2ban-ui.git /opt/fail2ban-ui
cd /opt/fail2ban-ui cd /opt/fail2ban-ui
sudo go build -o fail2ban-ui ./cmd/main.go sudo go build -o fail2ban-ui ./cmd/server/main.go
``` ```
### Create the fail2ban-ui.service ### Create the fail2ban-ui.service
@@ -39,6 +39,7 @@ After=network.target fail2ban.service
Requires=fail2ban.service Requires=fail2ban.service
[Service] [Service]
Type=simple
WorkingDirectory=/opt/fail2ban-ui WorkingDirectory=/opt/fail2ban-ui
ExecStart=/opt/fail2ban-ui/fail2ban-ui ExecStart=/opt/fail2ban-ui/fail2ban-ui
Restart=always Restart=always

View File

@@ -844,7 +844,7 @@
</div> </div>
<div class="bg-white rounded-lg shadow p-4"> <div class="bg-white rounded-lg shadow p-4">
<p class="text-sm text-gray-500">Recent Bans</p> <p class="text-sm text-gray-500">Recent Bans</p>
<p class="text-2xl font-semibold text-gray-800">${data.lastBans.length}</p> <p class="text-2xl font-semibold text-gray-800">${data.lastBans ? data.lastBans.length : 0}</p>
</div> </div>
</div> </div>
`; `;
@@ -1501,4 +1501,4 @@
</script> </script>
</body> </body>
</html> </html>