GithubHelp home page GithubHelp logo

inemyrovsk / wireguard-logging Goto Github PK

View Code? Open in Web Editor NEW

This project forked from amitn322/wireguard

0.0 0.0 0.0 37 KB

Wireguard Helper Script to Create Clients and Log Incoming Connections and Disconnections

License: BSD 3-Clause "New" or "Revised" License

Shell 100.00%

wireguard-logging's Introduction

Wireguard Helper Script

This is a set of helper script to create new configuration for wireguard clients. There is also a script that basically creates a service to monitor wireguard interfaces and log incoming connections as well as disconnections.

Buy me Coffee

Buy Me A Coffee

Pre-Requisites

  • All Client Configurations must be stored in /etc/wireguard/clients directory

Installation

  • Clone this repo
  • Run the Install Script
./install.sh 
  • Update following configurations in /etc/wireguard/create_client.sh to your own environment's settings
SERVER_IP=YOUR_SERVER_IP
LISTEN_PORT=YOUR_WIREGUARD_LISTEN_PORT
DNS_SERVERS="DNS_IP_1 , DNS_IP_2"
SERVER_PUBLIC_KEY="SERVER_PUBLIC_KEY"
PUSH_ROUTE_ALL="0.0.0.0/0, ::/0"
PUSH_ROUTE_INTRANET="192.168.x.0/24, 192.168.x.0/24"
SERVER_CONFIG='wg0.conf'
IP_RANGE='192.168.x.1 and 192.168.x.253'
  • Update the notify_by_email and notification_email in wireguard-logging.sh to get email notifications.
  • To Manage Clients Run the Create Client Script
./create_client.sh
  • The logs will be avavailable in /var/log/wireguard/

Future Enhancements

  • Add optional Email Notifications
  • Log the connections and disconnections to syslog.
  • Create a patterndb parser for syslog.
  • Create whitelist and notify over telegram/slack etc. when IP outside whitelist connect

Help, Bugs & Feature Requests

  • Please open up an issue for any bugs and Feature Requests.

Learn More

Watch my videos at https://www.youtube.com/playlist?list=PL5PZjrSldZ81vy_pQV-hFy5F7S4JnAVqN

Need Help ?

Open an issue in github.

wireguard-logging's People

Contributors

amitn322 avatar vidiotgeek avatar 86x avatar inemyrovsk avatar richieb2b avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.