Skip to content

Instantly share code, notes, and snippets.

@XFalko
XFalko / openvpn-telegram.md
Created April 20, 2022 05:01 — forked from jovimon/openvpn-telegram.md
Telegram notifications for (dis)connections to my pfSense OpenVPN Server

OpenVPN Telegram Notifier

Features

Each time a client (dis)connects to the OpenVPN server of pfSense a new Telegram notification will be sent.

pfSense WebGUI configuration

Under "VPN" > "Servers" > your server > "Advanced Configuration" > "Custom Options" add the following lines.

client-connect    /root/openvpn-telegram.sh
client-disconnect /root/openvpn-telegram.sh
<?php
/**
* Class for interacting with an SMB server using the system command "smbclient".
* Of course this assumes that you have the smbclient executable installed and
* in your path.
*
* It is not the most efficient way of interacting with an SMB server -- for instance,
* putting multiple files involves running the executable multiple times and
* establishing a connection for each file. However, if performance is not an
* issue, this is a quick-and-dirty way to move files to and from the SMB