Hi Dan,

Currently everything is looking good. I will share the log output if I face 
issue in future.

Regards

Prakash

On Wednesday, June 7, 2017 at 6:49:16 PM UTC-7, dan (ddpbsd) wrote:
>
> On Wed, Jun 7, 2017 at 12:34 PM, prakash ranjan 
> <prakashr...@gmail.com <javascript:>> wrote: 
> > Hi, 
> > 
> > After running "/var/ossec/bin/agent_control -l " there are several 
> > servers/agents status is showing as "Disconnected". 
> > 
> > Process I have followed to fix this:- 
> > 
> > /var/ossec/bin/agent_control -l | grep Disconnected 
> > 
> > output:- ID: 1042, Name: rungps-nightly.networkfleet.com, IP: any, 
> > Disconnected 
> > 
> > /var/ossec/bin/manage_agents -r <1042> # the id no in above output 
> > This removes the key. 
> > service ossec restart 
> > 
> > then go to client:- 
> > add key again 
> > /var/ossec/bin/agent-auth -m 10.10.1.55 
> > service ossec-hids restart 
> > 
> > This solution is definitely working and fixing the issue. But, earlier I 
> had 
> > this issue for approx 10 agents. Now, I can see the same issue for few 
> more 
> > servers/agents. Even few servers reappeared even after fixing the 
> problem. 
> > Please help with some good solution.. 
> > 
>
> Have you checked the ossec.log files for the agents and server? 
>
> > 
> > Details about environment:- 
> > ****************************** 
> > OS = OEL Linux 6.8 
> > 
> > /var/ossec/bin/ossec-analysisd -V 
> > 
> > 
> > 
> > OSSEC HIDS v2.8 - Trend Micro Inc. 
> > 
> > 
> > 
> > cat /etc/ossec-init.conf 
> > 
> > 
> > 
> > DIRECTORY="/var/ossec/" 
> > 
> > VERSION="v2.8" 
> > 
> > DATE="Tue Jan 26 08:34:27 PST 2016" 
> > 
> > 
> > TYPE=“server" 
> > 
> > 
> > 
> > cat /var/ossec/etc/ossec.conf (Removed ip addresses) 
> > 
> > 
> > 
> > <ossec_config> 
> > 
> >   <global> 
> > 
> >     <email_notification>yes</email_notification> 
> > 
> >     <email_to></email_to> 
> > 
> >     <smtp_server>localhost</smtp_server> 
> > 
> >     <email_from></email_from> 
> > 
> >     <email_maxperhour>25</email_maxperhour> 
> > 
> >   </global> 
> > 
> > 
> > 
> >   <syslog_output> 
> > 
> >     <server>xx.xx.xx.xx</server> 
> > 
> >   </syslog_output> 
> > 
> > 
> > 
> >   <rules> 
> > 
> >     <include>rules_config.xml</include> 
> > 
> >     <include>pam_rules.xml</include> 
> > 
> >     <include>sshd_rules.xml</include> 
> > 
> >     <include>telnetd_rules.xml</include> 
> > 
> >     <include>syslog_rules.xml</include> 
> > 
> >     <include>arpwatch_rules.xml</include> 
> > 
> >     <include>symantec-av_rules.xml</include> 
> > 
> >     <include>symantec-ws_rules.xml</include> 
> > 
> >     <include>pix_rules.xml</include> 
> > 
> >     <include>named_rules.xml</include> 
> > 
> >     <include>smbd_rules.xml</include> 
> > 
> >     <include>vsftpd_rules.xml</include> 
> > 
> >     <include>pure-ftpd_rules.xml</include> 
> > 
> >     <include>proftpd_rules.xml</include> 
> > 
> >     <include>ms_ftpd_rules.xml</include> 
> > 
> >     <include>ftpd_rules.xml</include> 
> > 
> >     <include>hordeimp_rules.xml</include> 
> > 
> >     <include>roundcube_rules.xml</include> 
> > 
> >     <include>wordpress_rules.xml</include> 
> > 
> >     <include>cimserver_rules.xml</include> 
> > 
> >     <include>vpopmail_rules.xml</include> 
> > 
> >     <include>vmpop3d_rules.xml</include> 
> > 
> >     <include>courier_rules.xml</include> 
> > 
> >     <include>web_rules.xml</include> 
> > 
> >     <include>web_appsec_rules.xml</include> 
> > 
> >     <include>apache_rules.xml</include> 
> > 
> >     <include>nginx_rules.xml</include> 
> > 
> >     <include>php_rules.xml</include> 
> > 
> >     <include>mysql_rules.xml</include> 
> > 
> >     <include>postgresql_rules.xml</include> 
> > 
> >     <include>ids_rules.xml</include> 
> > 
> >     <include>squid_rules.xml</include> 
> > 
> >     <include>firewall_rules.xml</include> 
> > 
> >     <include>cisco-ios_rules.xml</include> 
> > 
> >     <include>netscreenfw_rules.xml</include> 
> > 
> >     <include>sonicwall_rules.xml</include> 
> > 
> >     <include>postfix_rules.xml</include> 
> > 
> >     <include>sendmail_rules.xml</include> 
> > 
> >     <include>imapd_rules.xml</include> 
> > 
> >     <include>mailscanner_rules.xml</include> 
> > 
> >     <include>dovecot_rules.xml</include> 
> > 
> >     <include>ms-exchange_rules.xml</include> 
> > 
> >     <include>racoon_rules.xml</include> 
> > 
> >     <include>vpn_concentrator_rules.xml</include> 
> > 
> >     <include>spamd_rules.xml</include> 
> > 
> >     <include>msauth_rules.xml</include> 
> > 
> >     <include>mcafee_av_rules.xml</include> 
> > 
> >     <include>trend-osce_rules.xml</include> 
> > 
> >     <include>ms-se_rules.xml</include> 
> > 
> >     <!-- <include>policy_rules.xml</include> --> 
> > 
> >     <include>zeus_rules.xml</include> 
> > 
> >     <include>solaris_bsm_rules.xml</include> 
> > 
> >     <include>vmware_rules.xml</include> 
> > 
> >     <include>ms_dhcp_rules.xml</include> 
> > 
> >     <include>asterisk_rules.xml</include> 
> > 
> >     <include>ossec_rules.xml</include> 
> > 
> >     <include>attack_rules.xml</include> 
> > 
> >     <include>openbsd_rules.xml</include> 
> > 
> >     <include>clam_av_rules.xml</include> 
> > 
> >     <include>dropbear_rules.xml</include> 
> > 
> >     <include>local_rules.xml</include> 
> > 
> >   </rules> 
> > 
> > 
> > 
> > 
> > 
> >   <rootcheck> 
> > 
> >     
> <rootkit_files>/var/ossec/etc/shared/rootkit_files.txt</rootkit_files> 
> > 
> > 
> > 
> <rootkit_trojans>/var/ossec/etc/shared/rootkit_trojans.txt</rootkit_trojans> 
>
> > 
> >     
> <system_audit>/var/ossec/etc/shared/system_audit_rcl.txt</system_audit> 
> > 
> > 
> > 
> <system_audit>/var/ossec/etc/shared/cis_debian_linux_rcl.txt</system_audit> 
> > 
> > 
> > 
> <system_audit>/var/ossec/etc/shared/cis_rhel_linux_rcl.txt</system_audit> 
> > 
> > 
> > 
> <system_audit>/var/ossec/etc/shared/cis_rhel5_linux_rcl.txt</system_audit> 
> > 
> >   </rootcheck> 
> > 
> > 
> > 
> >   <global> 
> > 
> >     <white_list>xx.xx.xx.xx</white_list> 
> > 
> >     <white_list>^localhost.localdomain$</white_list> 
> > 
> >     <white_list>xx.xx.xx.xx</white_list> 
> > 
> >     <white_list>xx.xx.xx.xx</white_list> 
> > 
> >   </global> 
> > 
> > 
> > 
> >   <remote> 
> > 
> >     <connection>syslog</connection> 
> > 
> >   </remote> 
> > 
> > 
> > 
> >   <remote> 
> > 
> >     <connection>secure</connection> 
> > 
> >   </remote> 
> > 
> > 
> > 
> >   <alerts> 
> > 
> >     <log_alert_level>1</log_alert_level> 
> > 
> >     <email_alert_level>10</email_alert_level> 
> > 
> >   </alerts> 
> > 
> > 
> > 
> >   <command> 
> > 
> >     <name>host-deny</name> 
> > 
> >     <executable>host-deny.sh</executable> 
> > 
> >     <expect>srcip</expect> 
> > 
> >     <timeout_allowed>yes</timeout_allowed> 
> > 
> >   </command> 
> > 
> > 
> > 
> >   <command> 
> > 
> >     <name>firewall-drop</name> 
> > 
> >     <executable>firewall-drop.sh</executable> 
> > 
> >     <expect>srcip</expect> 
> > 
> >     <timeout_allowed>yes</timeout_allowed> 
> > 
> >   </command> 
> > 
> > 
> > 
> >   <command> 
> > 
> >     <name>disable-account</name> 
> > 
> >     <executable>disable-account.sh</executable> 
> > 
> >     <expect>user</expect> 
> > 
> >     <timeout_allowed>yes</timeout_allowed> 
> > 
> >   </command> 
> > 
> > 
> > 
> >   <command> 
> > 
> >     <name>restart-ossec</name> 
> > 
> >     <executable>restart-ossec.sh</executable> 
> > 
> >     <expect></expect> 
> > 
> >   </command> 
> > 
> > 
> > 
> > 
> > 
> >   <command> 
> > 
> >     <name>route-null</name> 
> > 
> >     <executable>route-null.sh</executable> 
> > 
> >     <expect>srcip</expect> 
> > 
> >     <timeout_allowed>yes</timeout_allowed> 
> > 
> >   </command> 
> > 
> > 
> > 
> >   <!-- Files to monitor (localfiles) --> 
> > 
> > 
> > 
> >   <localfile> 
> > 
> >     <log_format>syslog</log_format> 
> > 
> >     <location>/var/log/messages</location> 
> > 
> >   </localfile> 
> > 
> > 
> > 
> >   <localfile> 
> > 
> >     <log_format>syslog</log_format> 
> > 
> >     <location>/var/log/secure</location> 
> > 
> >   </localfile> 
> > 
> > 
> > 
> >   <localfile> 
> > 
> >     <log_format>apache</log_format> 
> > 
> >     <location>/var/log/httpd/*log</location> 
> > 
> >   </localfile> 
> > 
> > 
> > 
> >   <localfile> 
> > 
> >     <log_format>syslog</log_format> 
> > 
> >     <location>/var/log/maillog</location> 
> > 
> >   </localfile> 
> > 
> > 
> > 
> >   <localfile> 
> > 
> >     <log_format>command</log_format> 
> > 
> >     <command>df -h</command> 
> > 
> >   </localfile> 
> > 
> > 
> > 
> >   <localfile> 
> > 
> >     <log_format>full_command</log_format> 
> > 
> >     <command>netstat -tan |grep LISTEN |grep -v xx.xx.xx.xx | 
> sort</command> 
> > 
> >   </localfile> 
> > 
> > 
> > 
> >   <localfile> 
> > 
> >     <log_format>full_command</log_format> 
> > 
> >     <command>last -n 5</command> 
> > 
> >   </localfile> 
> > 
> > 
> > 
> > 
> > </ossec_config> 
> > 
> > Regards 
> > Prakash 
> > 
> > -- 
> > 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "ossec-list" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to ossec-list+...@googlegroups.com <javascript:>. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"ossec-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ossec-list+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to