Author Archives: Ahmed Tawfik

Unknown's avatar

About Ahmed Tawfik

Cybersecurity Professional, Systems Engineer, OSS & Linux Geek

Script to count number of logged in users to OpenVPN

To get that information you need to query your openvpn-status.log file, which usually resides in /var/log/openvpn/openvpn-status.log. A normal cat will show the following: OpenVPN CLIENT LIST Updated,Wed Mar 5 11:57:51 2019 Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since someuser,someip:55530,100686479,319036434,Tue Mar 5 … Continue reading

Posted in Linux | Tagged , , | Leave a comment

What to do when ctrl+c not killing your telnet command

To check if ports are open or not, we usually do the following: telnet IP PORT For example: telnet 192.168.100.5 25 Sometimes after seeing your result, you keep pressing ctrl+c, ctrl+x or ctrl+\ to force quit it, but it just … Continue reading

Posted in Linux | Tagged , | Leave a comment

How to reset displays (monitors) settings for KDE Plasma and GNOME

In case your display arrangement or settings, e.g. when you have 3 screens and you are for some reason unable to reorganize them or change their settings, just reset your display settings: For KDE Plasma: rm -rf .local/share/kscreen For GNOME: … Continue reading

Posted in Linux | Tagged , , , | 7 Comments

How to force resync between PBIS and AD on Linux

In case you made a change on your AD, such as modifying groups or changing attributes of a user, it sometimes take a little while to reflect that on the Linux server that authenticates against AD via PBIS. The best … Continue reading

Posted in Linux | Tagged , , , , | Leave a comment

How to change max open files for nginx server on Ubuntu

The following error occurred a lot in /var/log/nginx/error.log: Too many open files This means that the nginx master process reached the maximum number of open files which was set to the default of 4096. (To check it, simply cat /proc/pid/limits, … Continue reading

Posted in Linux, Ubuntu | Tagged , , , , , | Leave a comment