const client = new net.Socket();
let connectionAttempted = false;
client.on('connect', () => {
- logger.info('Connected to OpenVPN management interface');
+ logger.warn('Connected to OpenVPN management interface');
connectionAttempted = true;
client.write(`client-kill ${clientName}\n`);
});
client.on('data', async (data) => {
const response = data.toString();
+ logger.warn(response);
if (response.includes('SUCCESS: client-kill command succeeded')) {
if (duration && clientIp) {
// Add iptables rule to block client IP for duration