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.
- All Client Configurations must be stored in
/etc/wireguard/clients
directory
- 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
andnotification_email
inwireguard-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/
- 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
- Please open up an issue for any bugs and Feature Requests.
Watch my videos at https://www.youtube.com/playlist?list=PL5PZjrSldZ81vy_pQV-hFy5F7S4JnAVqN
Open an issue in github.