Lädt...

🔧 Step-by-Step Guide: Deploying SafeLine WAF on Synology NAS Using Docker


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

Author: Zhichanerdaye

Introduction

Previously, we covered how to deploy SafeLine WAF using PVE. The main reason for using PVE was to isolate SafeLine from other services, especially Synology NAS, to enhance security.

By request, this article will guide you through deploying SafeLine WAF on Synology NAS using Docker.

My Environment

  • Synology 920+ (DSM 7.2)
  • Deployment Environment: Docker
  • A pair of diligent hands and a smart brain

Step 1: Deploying SafeLine

  1. Create a folder named SafeLine on your Synology NAS (folder name can be customized, but ensure consistency in path mapping).

  2. Download the installation package: https://wwzb.lanzouw.com/b0sx5z7gf (Password: bpuf).

  3. Extract the package—ensure empty folders are correctly placed, or installation may fail.

Image description

  1. Edit the .env file in Notepad, modifying only:SAFELINE_DIR (set this to match your mapped path), MGT_PORT (set your admin panel access port, e.g., 9443)
AFELINE_DIR=your mapped path, e.g., /volume1/docker/SafeLine
IMAGE_TAG=latest
MGT_PORT=your admin panel access port, e.g., 9443
POSTGRES_PASSWORD=R031uaOo5jdxJen5FJhQMzimV5jiyMAX
SUBNET_PREFIX=172.22.222
IMAGE_PREFIX=swr.cn-east-3.myhuaweicloud.com/chaitin-safeline
  1. Upload all files into the SafeLine folder.

Image description

  1. Open Synology Container Manager (Docker) → “Projects” → “Add” → Select SafeLine folder.

Image description

  1. Choose “Use an existing docker-compose.yml” → Click OK → Proceed with default settings.

Image description

Image description

  1. Enable “Start project immediately” → Click “Finish”.

Image description

  1. Wait for the container to pull images and deploy (this may take some time).

Image description

  1. Once completed, 7 service containers will be deployed automatically.

Image description

Step 2: Accessing SafeLine WAF

  1. Open your browser and go to https://:9443 (replace with your actual NAS IP and chosen port).

Image description

Note: If the page doesn’t load, wait a bit or double-check your settings.

  1. Resetting Admin Password Enable SSH on Synology NAS: Control Panel → Terminal & SNMP → Enable SSH → Save

Image description

Open Windows PowerShell and connect via SSH:

Image description

Image description

ssh [email protected] -p 6666

Note:

  • The "erdaye" part is your Synology administrator username, which can be in Chinese.
  • The number after -p is the port you set in the previous step.
  • Make sure not to remove the three spaces in the command: ssh [space] [email protected] [space] -p [space] 6666 Press Enter, and when prompted, enter your Synology administrator password.

Important: Password input will not be displayed; just type it and press Enter.

Image description

If the password is correct, a few lines of text similar to the ones shown in the image will appear, and the displayed username will change. If nothing appears, please repeat the previous steps.

Image description

Type sudo -i and press Enter. Then, enter your password again and press Enter. This will grant you “root” user privileges.

Image description

Type docker exec safeline-mgt resetadmin and press Enter to reset the password. Once the output appears as shown below, the password reset is complete.

Image description

  1. Copy the generated password and log in to the SafeLine console. Remember to disable SSH afterward.

Step 3: Configuring SafeLine WAF

Access the SafeLine WAF console using the IP address you set earlier with port 9443:
https://192.168.31.83:9443

If a security warning appears, click Advanced and proceed to access the page.

Image description

Log in using the admin credentials you reset earlier.

Image description

Image description

For additional configuration, refer to the official documentation.

Step 4: Upgrading SafeLine WAF

  1. Open the Docker project for SafeLine, click Actions → Clear and wait for the pprocess to complete.

Image description

  1. Click Build to initiate the upgrade.

Now, SafeLine WAF is successfully deployed on your Synology NAS! 🚀

...

🔧 Differences between SafeLine WAF Free and SafeLine WAF Pro


📈 54.66 Punkte
🔧 Programmierung

🔧 Deploying Free WAF SafeLine Using Docker


📈 48.03 Punkte
🔧 Programmierung

🔧 Deploying Free WAF SafeLine Using Docker


📈 48.03 Punkte
🔧 Programmierung

🔧 Deploying SafeLine WAF on CentOS 7 with Docker


📈 44.3 Punkte
🔧 Programmierung

🔧 Achieving Multi-WAF Protection and Failover Using SafeLine WAF


📈 43.28 Punkte
🔧 Programmierung

🔧 Reveal SafeLine WAF's High Traffic Handling Secrets: How SafeLine Leverages Nginx


📈 42.43 Punkte
🔧 Programmierung

🔧 SafeLine vs Cloudflare WAF vs Fastly WAF — Detailed Feature Comparison


📈 39.56 Punkte
🔧 Programmierung

🔧 Deploying High Availability SafeLine WAF on K3s(Part 4)


📈 37.52 Punkte
🔧 Programmierung

🔧 Deploying High Availability SafeLine WAF on K3s(Part 3)


📈 37.52 Punkte
🔧 Programmierung

🔧 Deploying High Availability SafeLine WAF on K3s(Part 2)


📈 37.52 Punkte
🔧 Programmierung

🔧 Deploying the Free WAF SafeLine on Kubernetes


📈 37.52 Punkte
🔧 Programmierung

🔧 Turns servers into high-defense servers instantly by deploying Free WAF SafeLine


📈 37.52 Punkte
🔧 Programmierung

🔧 Boost Kubernetes Security: Deploying SafeLine WAF with Ingress-nginx


📈 37.52 Punkte
🔧 Programmierung

🔧 Building a Secure WordPress Site with Docker, Nginx, and SafeLine WAF


📈 34.12 Punkte
🔧 Programmierung

🔧 Ultimate Guide to Web Security on Linux Servers with SafeLine WAF


📈 31.42 Punkte
🔧 Programmierung

🔧 SafeLine WAF Optimization Tips: A Practical Guide for System Operators


📈 31.42 Punkte
🔧 Programmierung

🔧 How I Secured My Website with SafeLine WAF: A Beginner’s Guide to Easy Deployment


📈 31.42 Punkte
🔧 Programmierung

🔧 How to Install and Configure SafeLine WAF: A Quick Start Guide


📈 31.42 Punkte
🔧 Programmierung

🔧 The Highly Rated Community WAF—SafeLine Installation Guide


📈 31.42 Punkte
🔧 Programmierung

🔧 The Beginner's Guide to Install and Deploy SafeLine WAF


📈 31.42 Punkte
🔧 Programmierung

🔧 Boost API Security: Kong and SafeLine WAF Integration Guide


📈 31.42 Punkte
🔧 Programmierung

🔧 Comprehensive Guide to Installing, Configuring, and Testing SafeLine WAF


📈 31.42 Punkte
🔧 Programmierung

🔧 Mastering Web Security on Linux: A Practical Guide to SafeLine WAF


📈 31.42 Punkte
🔧 Programmierung

🔧 What is NAS? Does NAS Need a WAF?


📈 29.31 Punkte
🔧 Programmierung

📰 Schlupfloch Migration: Neue Synology-NAS der Plus-Serie erfordern Laufwerke von Synology


📈 28.68 Punkte
📰 IT Nachrichten

📰 Synology-NAS in die Synology-C2-Cloud sichern


📈 28.68 Punkte
📰 IT Nachrichten

🔧 Optimizing Docker for High Security: Combining Docker and SafeLine


📈 28.67 Punkte
🔧 Programmierung

🔧 Deploying a Multi-Stage Docker Image to AWS EC2 using Docker Hub


📈 27.48 Punkte
🔧 Programmierung

🔧 How to Configure SafeLine WAF to Correctly Obtain the Source IP


📈 27.33 Punkte
🔧 Programmierung

🔧 Highly Recommended Open-Source WAF: SafeLine


📈 27.33 Punkte
🔧 Programmierung

🔧 Solving Bandwidth Issues Caused by Web Crawlers with SafeLine WAF


📈 27.33 Punkte
🔧 Programmierung

📰 SafeLine: Open-source web application firewall (WAF)


📈 27.33 Punkte
📰 IT Security Nachrichten

🔧 SafeLine WAF: How to Protect Your Website Dynamically


📈 27.33 Punkte
🔧 Programmierung

🔧 Protect Your Website Like a Pro: SafeLine, the Open-Source WAF


📈 27.33 Punkte
🔧 Programmierung

🔧 Supercharge K8s Security: SafeLine WAF + Ingress-nginx


📈 27.33 Punkte
🔧 Programmierung

matomo