find all ip logged into cpanel

From WebHostingNeeds.com
Jump to: navigation, search

Find all Cpanel User logins from access_log

To find all logins to cpanel by a user

grep CPANEL_USERNAME /usr/local/cpanel/logs/access_log | awk -F' ' '{print $1}' | uniq

Example

[email protected] [~]# grep akaniorg /usr/local/cpanel/logs/access_log | awk -F' ' '{print $1}' | uniq
114.143.87.53
114.143.81.86
114.143.91.80
196.215.218.158
[email protected] [~]#


Find all Cpanel User logins from session_log

grep CPANEL_USERNAME /usr/local/cpanel/logs/session_log


Find All Cpanel Logins From An IP

To find all cpanel sites an IP logged in

grep 114.143.87.53 /usr/local/cpanel/logs/access_log | awk -F' ' '{print $3}' | sort | uniq

To get list of all sites a list of IPs logged in

egrep '114.143.87.53|114.143.81.86|114.143.91.80' /usr/local/cpanel/logs/access_log | awk -F' ' '{print $3}' | sort | uniq



log