Skip to content

A Flask-based interactive dashboard for monitoring Linux system security. It provides real-time insights into system information, open ports, running processes, and failed login attempts. The dashboard is designed to enhance system monitoring with Basic Auth protection, Slack notifications, and Docker support for seamless deployment.

License

Notifications You must be signed in to change notification settings

marwan-ahmed-23/linux-security-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux Security Dashboard

A full-stack application for real-time monitoring and analysis of Linux system security. It provides a Node.js/Express backend for gathering critical system data and optionally running vulnerability scans, and a React frontend for visualizing information such as open ports, system logs, and more.


Table of Contents

  1. Key Features
  2. Tech Stack
  3. Project Structure
  4. Installation
  5. Usage
  6. Docker Deployment
  7. Contributing
  8. License

Key Features

  • System Metrics
    Collect CPU, memory, and uptime details, along with system-wide info (hostname, OS, etc.).

  • Open Ports
    Scan and display currently open ports on the host for quick identification of potential threats.

  • Vulnerability Scanning
    Perform simple vulnerability scans (using Nmap, for example) to detect common security gaps.

  • Logs and Failed Logins
    Fetch and display recent authentication failures or other relevant system logs, highlighting suspicious activity.

  • Scalable Architecture
    Separate backend for data collection/processing and frontend for a responsive, user-friendly dashboard.

  • Optional Docker Support
    Use docker-compose to containerize the application (frontend, backend, and MongoDB if applicable) for easy deployment.

Tech Stack

Project Structure

linux-security-dashboard/
├── backend/
│   ├── src/
│   │   ├── app.js                          # Main Express server setup & configuration
│   │   ├── routes/
│   │   │   ├── system.js                   # Routes for system information & open ports
│   │   │   ├── vulnerabilities.js          # Routes for vulnerability scanning
│   │   │   └── logs.js                     # Routes for failed login logs or system logs
│   │   ├── controllers/
│   │   │   ├── systemController.js         # Business logic for system data (info/ports)
│   │   │   ├── vulnerabilityController.js  # Business logic for scanning vulnerabilities
│   │   │   └── logsController.js           # Business logic for handling & cleaning logs
│   │   ├── models/
│   │   │   └── SystemLog.js                # Mongoose model (example) for storing system logs
│   │   └── utils/
│   │       ├── systemInfo.js               # Helper functions to fetch system info/ports
│   │       └── vulnerabilityScanner.js     # Utility to run Nmap or other scan tools
│   ├── package.json                        # Backend dependencies & scripts
│   └── Dockerfile                          # Dockerfile for containerizing the backend
├── frontend/
│   ├── public/
│   │   └── index.html                      # Main HTML entry for the React application
│   ├── src/
│   │   ├── components/
│   │   │   ├── SystemDashboard.jsx         # Displays system info (CPU, memory, etc.)
│   │   │   ├── PortList.jsx                # Lists open ports fetched from the backend
│   │   │   ├── VulnerabilityScanner.jsx    # UI to trigger vulnerability scans & show results
│   │   │   └── LogsView.jsx                # Shows recent failed login attempts or logs
│   │   ├── services/
│   │   │   └── api.js                      # Axios instance & interceptors for API requests
│   │   ├── App.js                          # Main React component with routes/navigation
│   │   └── index.js                        # React DOM entry point, imports global styles
│   ├── package.json                        # Frontend dependencies & scripts
│   └── Dockerfile                          # Dockerfile for containerizing the frontend
├── docker-compose.yml                      # Multi-container setup for backend, frontend, DB, etc.
├── README.md                               # Project documentation (setup, usage, etc.)
└── LICENSE                                 # License file (e.g., MIT)

Installation

1. Clone the Repository

git clone https://github.com/marwan-ahmed-23/linux-security-dashboard.git

2. Install Backend Dependencies

cd linux-security-dashboard/backend
npm install
  • (Optional) If you plan on using a database like MongoDB, install mongoose as well:
    npm install mongoose

3. Install Frontend Dependencies

cd ../frontend
npm install

4. Configure Environment (Optional)

If using a database or advanced features, create a .env file in backend/:

PORT=5000
DB_URI=mongodb://localhost:27017/linux_security

Usage

  1. Run the Backend

    cd linux-security-dashboard/backend
    npm run dev
    • Starts an Express server on http://localhost:5000 by default.
  2. Run the Frontend

    cd ../frontend
    npm start
    • Runs the React application on http://localhost:3000.
  3. Access the Dashboard

    • Open your browser at http://localhost:3000 to view system info, logs, and more.

Docker Deployment (Optional)

  1. Build and Run
    cd linux-security-dashboard
    docker-compose up --build
  2. Containers
    • backend: Exposes http://localhost:5000
    • frontend: Accessible at http://localhost:3000
    • mongo (if configured) on 27017

Contributing

  1. Fork the repository.
  2. Create a branch for your feature:
    git checkout -b feature/some-new-feature
  3. Commit & push your changes:
    git commit -m "Add some new feature"
    git push origin feature/some-new-feature
  4. Open a Pull Request on GitHub, describing your changes and any relevant details.

We appreciate your contributions—bug reports, suggestions, and pull requests are always welcome!

License

This project is licensed under the MIT License.
Feel free to modify and distribute as you see fit.

Enjoy securing your system with the Linux Security Dashboard! For questions or feedback, open an issue or start a discussion in the repository.

About

A Flask-based interactive dashboard for monitoring Linux system security. It provides real-time insights into system information, open ports, running processes, and failed login attempts. The dashboard is designed to enhance system monitoring with Basic Auth protection, Slack notifications, and Docker support for seamless deployment.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published