Sponsored Content
Special Forums Cybersecurity /var/log/secure* mysteriously empty! Post 302509239 by antondev on Wednesday 30th of March 2011 10:52:39 AM
Old 03-30-2011
/var/log/secure* mysteriously empty!

Hello everyone. I'm a newbie and this is my first post, and I'm hoping to get some help understanding what happened on my server. I did as much research as I could, but now I turn to the forums for help Smilie

I've set up a VPS server and I "thought" I had good enough security on it, but all of a sudden I notice my /var/log/secure is empty and all the other syslog files, and rsyslogd stopped working (though I was able to restart it)... I'm wondering if this is sufficient security and what to do to prevent hackers: I've got a CentOS 5 box with iptables locking everything but ports 53,80,443 out. SSH is on a secret port using RSA/2048 encryption and public/private key login with root login not allowed. Password login also not allowed. Ports MySQL, SSH, and FTP only open with port knocker. I'm wondering if I've got weak settings and what to do about security. Also wondering if there's a way to know if I've been hacked, though I can't seem to find any traces of anything gone wrong, just empty log files. I checked that the conf for rsyslog is set to write authpriv.* to /var/log/secure.

I guess my biggest question is, did rsyslog just fail, and empty all my log files as a result? And is this configuration enough to be reasonably secure and what more can/should I be doing? Thank you for all your help!!

iptables info:

#what I type to start and not lock self out:
sudo iptables -P INPUT ACCEPT
sudo iptables -F

#local:
sudo iptables -A INPUT -i lo -j ACCEPT
sudo iptables -A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT

#http and https:
sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 443 -j ACCEPT

#dns:
sudo iptables -A INPUT -p tcp --dport 53 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 53 -j ACCEPT

#mail:
sudo iptables -A INPUT -p tcp --dport 25 -j ACCEPT

#dbs & sphinx:
sudo iptables -A INPUT -p tcp -s [DB SERVER IP] --dport 3306 -j ACCEPT
sudo iptables -A INPUT -p tcp -s [DB SERVER IP] --dport 9312 -j ACCEPT
sudo iptables -A INPUT -p tcp -s [DB SERVER IP] --dport 9306 -j ACCEPT

#block rest but allow outgoing
sudo iptables -P INPUT DROP
sudo iptables -P FORWARD DROP
sudo iptables -P OUTPUT ACCEPT

#knock settings (upon successful port knock sequence):
iptables -A INPUT -s %IP% -p tcp -m multiport --dports [SSL PORT],3306,9312,9306,21 -j ACCEPT
#and on close:
iptables -D INPUT -s %IP% -p tcp -m multiport --dports [SSL PORT],3306,9312,9306,21 -j ACCEPT
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

while var not empty

Hi! How can I run a cicle while one var is not empty? Or better saying how can I see if the var has something? thanks (1 Reply)
Discussion started by: ruben.rodrigues
1 Replies

2. Red Hat

/var/log/messages and secure not updating

Hello all, I recently deleted some lines from the messages and secure files, in /var/log and now they are not keeping a log anymore. The last update shows the date of when I deleted the lines. I had to delete some failed login attempts to stop denyhosts from blocking the ips (probably not the... (3 Replies)
Discussion started by: z1dane
3 Replies

3. Solaris

diff b/w /var/log/syslog and /var/adm/messages

hi sirs can u tell the difference between /var/log/syslogs and /var/adm/messages in my working place i am having two servers. in one servers messages file is empty and syslog file is going on increasing.. and in another servers message file is going on increasing but syslog file is... (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies

4. Solaris

/var/adm/meesages file empty

Do not know the reason y messages file is empty already restarted the syslog daemon but still its showing empty . xxxxxxx# more /var/adm/messages xxxxxx# # ps -efo zone,pid,ppid,time,comm | grep syslog | grep global global 11861 1 00:10 /usr/sbin/syslogd svcs... (2 Replies)
Discussion started by: fugitive
2 Replies

5. UNIX for Dummies Questions & Answers

Check to see if string var is empty

i have a veriable set var1 set var2 = abcd how can i check if var 1 is empty and if var 2 is not empty ??? (2 Replies)
Discussion started by: nirnir26
2 Replies

6. Linux

Disable connection logging for a specfic service (/var/log/secure)

Hello, is there a way to disable connection logging for a specific service? Or eventually to disable /var/log/secure in general? Closed. Double post (0 Replies)
Discussion started by: TehOne
0 Replies

7. UNIX for Advanced & Expert Users

Disable connection logging for a specfic service (/var/log/secure)

Hello, is there a way to disable connection logging for a specific service? Or eventually to disable /var/log/secure in general? (2 Replies)
Discussion started by: TehOne
2 Replies

8. Solaris

Difference between /var/log/syslog and /var/adm/messages

Hi, Is the contents in /var/log/syslog and /var/adm/messages are same?? Regards (3 Replies)
Discussion started by: vks47
3 Replies

9. Solaris

/var/adm/messages empty

Hi all, One of the server is showing empty messages # logger -p user.error HELLO_SYSLOGD # dmesg Mon Apr 23 15:11:19 MYT 2012 /etc/syslog.conf file, i tried copy the conf file from another server, still it is not working *.err;kern.notice;auth.notice /dev/sysmsg... (8 Replies)
Discussion started by: beginningDBA
8 Replies

10. Shell Programming and Scripting

Transfer the logs being thrown into /var/log/messages into another file example /var/log/volumelog

I have been searching and reading about syslog. I would like to know how to Transfer the logs being thrown into /var/log/messages into another file example /var/log/volumelog. tail -f /var/log/messages dblogger: msg_to_dbrow: no logtype using missing dblogger: msg_to_dbrow_str: val ==... (2 Replies)
Discussion started by: kenshinhimura
2 Replies
nlcontrol(8)						    BSD System Manager's Manual 					      nlcontrol(8)

NAME
nlcontrol -- NETLOGON secure channel utility SYNOPSIS
nlcontrol [reconfigure] status [options] status nlcontrol [options] verify nlcontrol [options] change-password DESCRIPTION
The NETLOGON channel is a secure connection to a Windows Domain Controller that is used for non-Kerberos user authentication. nlcontrol can be used to manipulate and test the status of the NETLOGON channel. OPTIONS
-domain The service will log extensive debug information and may perform extra diagnostic checks. This option is typically only useful for debugging. -help Prints a usage message and exits. -server list The service will listen on each of the TCP ports specified in the comma-separated list. This option is typically only used for debugging. nlcontrol supports the following commands: reconfigure Force the NETLOGON service to re-read its configuration information. This is not necessary in normal operation, since the NETLOGON service will detect relevant configuration changes and re-establish the secure channel automatically. status Print the current status of the NETLOGON channel without altering its state. verify Attempt to verify that the NETLOGON channel is available and working correctly. change-password Bring up the NETLOGON channel and change the password of the machine account. The machine account is used to authenticate to the Domain Controller in order to secure the channel. DIAGNOSTICS
nlcontrol will exit with a non-zero error code if the command fails. It may also display a Windows error code, which is typically self- explanatory. HISTORY
The nlcontrol utility first appeared in Mac OS 10.7. Darwin June 1, 2019 Darwin
All times are GMT -4. The time now is 11:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy