LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 11-11-2009, 08:39 AM   #1
Raheel Hassan
LQ Newbie
 
Registered: Mar 2009
Posts: 24

Rep: Reputation: 0
Need to know authentication failure attempts and forward them to another machine FC11


Hello,

I need to know where i can see(which is the file) all the login failures in my fedora core 11. Secondly i need to forward those logs to another Linux machine. What changes i need to do in which file.

Regards,
RAHEEL.
 
Old 11-11-2009, 08:57 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,632

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Raheel Hassan View Post
Hello,

I need to know where i can see(which is the file) all the login failures in my fedora core 11. Secondly i need to forward those logs to another Linux machine. What changes i need to do in which file.

Regards,
RAHEEL.
They're probably in /var/log/messages. If not, reference any one of the many syslog configuration guides for Linux, to make sure the messages are going to that file. You can also configure syslog to write those messages to whatever file you want, too.

After that, just mirror your syslogs to another server, by putting the correct option in the syslog configuration file, usually something like
Code:
*.auth   <remote server ip address>
 
Old 11-11-2009, 07:46 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
lastb shows a list of bad login attempts http://linux.die.net/man/1/lastb
 
Old 11-12-2009, 04:04 AM   #4
Raheel Hassan
LQ Newbie
 
Registered: Mar 2009
Posts: 24

Original Poster
Rep: Reputation: 0
problem not solved about syslog in FC11

Well i checked by adding,
*.auth <remote server ip address>
but it did not work then i tried
*.* @<remote server ip address>
which worked. I have seen the messages using tcpdump -i eth0 that are going towards the syslog server where i have to store them, but the problem is that they are not present at the server the ip of my server is 192.168.0.3 and my IP is 192.168.0.4.

For the lastb i checked it trying openeing (/var/log/wtmp
/var/log/btmp) these file but it says that they are binary files.

Regards,
 
Old 11-12-2009, 04:56 AM   #5
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
Quote:
Originally Posted by Raheel Hassan View Post
Well i checked by adding,
*.auth <remote server ip address>
but it did not work then i tried
*.* @<remote server ip address>
which worked. I have seen the messages using tcpdump -i eth0 that are going towards the syslog server where i have to store them, but the problem is that they are not present at the server the ip of my server is 192.168.0.3 and my IP is 192.168.0.4.

For the lastb i checked it trying openeing (/var/log/wtmp
/var/log/btmp) these file but it says that they are binary files.

Regards,
You have to use last to view wtmp and btmp:
Code:
last /var/log/wtmp
So you can make a shell script"
Code:
#!/bin/bash
last /var/log/wtmp >>/var/log/wtmp.txt
rsync /var/log/wtmp newip:/var/log/
If your just looking for failed logins, those would probably be in /var/log/messages and /var/log/secure

You can log remotely, and securely with rsyslogd, which should already be on your FC11. syslog does not send the logs encrypted by default.
 
Old 11-12-2009, 07:51 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,632

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Raheel Hassan View Post
Well i checked by adding,
*.auth <remote server ip address>
but it did not work then i tried
*.* @<remote server ip address>
which worked. I have seen the messages using tcpdump -i eth0 that are going towards the syslog server where i have to store them, but the problem is that they are not present at the server the ip of my server is 192.168.0.3 and my IP is 192.168.0.4.

For the lastb i checked it trying openeing (/var/log/wtmp
/var/log/btmp) these file but it says that they are binary files.

Regards,
Right, and they won't be until you configure syslog on your remote server, to ACCEPT the incoming messages, and log them.

Again, read the documentation on syslog/syslog-ng, which has complete descriptions on how to set up everything you're trying to do.
 
Old 11-12-2009, 07:09 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Typically, on the target/remote server, edit /etc/sysconfig/syslog, adding '-r' to SYSLOGD_OPTIONS.

On the src/local system

*.auth @192.168.1.1 (ie remote server ip)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
System boot failure after installation of fedora fc11 in dual boot with windows xp npsdevan Fedora - Installation 1 08-10-2009 04:45 AM
how to transfer ssh login attempts to linux machine junust Linux - Software 5 07-22-2008 09:13 AM
How do I find the source IP of failed SASL authentication attempts? sunhak Linux - Security 7 10-24-2007 04:22 PM
SSH forward from a Windows machine to a Linux machine isn't working nickj6282 Linux - Networking 3 08-13-2006 02:47 PM
Limit the amount of login attempts to machine jester_69 Linux - Security 4 10-14-2003 02:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration