diff --git a/apps/dokploy/components/dashboard/settings/servers/security-audit.tsx b/apps/dokploy/components/dashboard/settings/servers/security-audit.tsx new file mode 100644 index 00000000..475f2b8f --- /dev/null +++ b/apps/dokploy/components/dashboard/settings/servers/security-audit.tsx @@ -0,0 +1,233 @@ +import { AlertBlock } from "@/components/shared/alert-block"; +import { Button } from "@/components/ui/button"; +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "@/components/ui/card"; +import { api } from "@/utils/api"; +import { Loader2, LockKeyhole, RefreshCw } from "lucide-react"; +import { useState } from "react"; +import { StatusRow } from "./gpu-support"; + +interface Props { + serverId: string; +} + +export const SecurityAudit = ({ serverId }: Props) => { + const [isRefreshing, setIsRefreshing] = useState(false); + const { data, refetch, error, isLoading, isError } = + api.server.security.useQuery( + { serverId }, + { + enabled: !!serverId, + }, + ); + const utils = api.useUtils(); + return ( + +
+ + +
+
+
+ + + Setup Security Sugestions + +
+ Check the security sugestions +
+ +
+
+ {isError && ( + + {error.message} + + )} +
+
+ + + + Ubuntu/Debian OS support is currently supported (Experimental) + + {isLoading ? ( +
+ + Checking Server configuration +
+ ) : ( +
+
+

UFW

+

+ UFW (Uncomplicated Firewall) is a simple firewall that can + be used to block incoming and outgoing traffic from your + server. +

+
+ + + +
+
+ +
+

SSH

+

+ SSH (Secure Shell) is a protocol that allows you to securely + connect to a server and execute commands on it. +

+
+ + + + + +
+
+ +
+

Fail2Ban

+

+ Fail2Ban (Fail2Ban) is a service that can be used to prevent + brute force attacks on your server. +

+
+ + + + + + + + +
+
+
+ )} +
+
+
+
+ ); +}; diff --git a/apps/dokploy/components/dashboard/settings/servers/setup-server.tsx b/apps/dokploy/components/dashboard/settings/servers/setup-server.tsx index 33d9bb6c..7c181459 100644 --- a/apps/dokploy/components/dashboard/settings/servers/setup-server.tsx +++ b/apps/dokploy/components/dashboard/settings/servers/setup-server.tsx @@ -35,6 +35,7 @@ import { ShowDeployment } from "../../application/deployments/show-deployment"; import { EditScript } from "./edit-script"; import { GPUSupport } from "./gpu-support"; import { ValidateServer } from "./validate-server"; +import { SecurityAudit } from "./security-audit"; interface Props { serverId: string; @@ -97,10 +98,11 @@ export const SetupServer = ({ serverId }: Props) => { - + SSH Keys Deployments Validate + Security GPU Setup { + +
+ +
+
{ return (
- {query?.success && } + {query?.success && isCloud && }
diff --git a/apps/dokploy/components/dashboard/settings/servers/welcome-stripe/create-ssh-key.tsx b/apps/dokploy/components/dashboard/settings/servers/welcome-stripe/create-ssh-key.tsx index cd263f43..740f7960 100644 --- a/apps/dokploy/components/dashboard/settings/servers/welcome-stripe/create-ssh-key.tsx +++ b/apps/dokploy/components/dashboard/settings/servers/welcome-stripe/create-ssh-key.tsx @@ -50,7 +50,7 @@ export const CreateSSHKey = () => {
- {isLoading ? ( + {isLoading || !cloudSSHKey ? (
{
- +