#16 (permalink)  
Old 10-11-2004, 03:18 PM
Registered User
 
Join Date: Aug 2003
Posts: 47
greengiant
If you have any fedora core 2 server that are running Brute Force Detection (BFD), here is a modification to the ssh rule to stop it form adding ffff to APF's deny_hosts list. You have to add "| awk -F: '{print$4":"$5}'" to the end or ARG_VAL2. I finally found this solution after a long time searching the web. The ARG_VAL2 line in the ssh rules should look like this now.

ARG_VAL2=`$TLOGP $LP $TLOG_TF.2 | grep sshd | grep -iwf $PATTERN_FILE | grep -w "for illegal" | awk '{print$13":"$11}' | awk -F: '{print$4":"$5}' >> $TMP/.sshd`


The file you want to edit is /usr/local/bfd/rules/sshd
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 10-11-2004, 03:21 PM
Registered User
 
Join Date: Feb 2004
Location: Chicago
Posts: 196
ThaMATRiX
Quote:
Originally Posted by greengiant
The file you want to edit is /usr/local/bfd/rules/sshd
That file doesnt exist?
Also, does this mean I already have APF? Do I just need to install the BFD?
__________________
Paul B
President/CEO
OneReseller.net Webhosting Services
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 10-11-2004, 04:06 PM
Registered User
 
Join Date: Aug 2003
Posts: 47
greengiant
You need to run APF (available from the same site) in order to run BFD.

If you have installed bfd to a different location then you sill have to edit the ssd file that is in teh bfd rules directory. The default location for bfd to install is /usr/local/bfd
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 10-11-2004, 11:42 PM
Registered User
 
Join Date: Aug 2004
Posts: 84
preleaf is on a distinguished road
Quote:
Originally Posted by SarcNBit
What OS are you running?

Try running using the full path to iptables or using 'su -' when su'ing to root.
my OS is fedora
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 10-11-2004, 11:56 PM
Registered User
 
Join Date: Aug 2004
Posts: 84
preleaf is on a distinguished road
Quote:
Originally Posted by anup123
Run following commands from ssh and paste the output.

lsmod
ie Determine the loaded modules

modinfo ip_tables
ie Determine if the iptables kernel module is installed on your system

rpm -q iptables
ie Determine if the iptables user-space package is installed on your system



Anup
root@host [~]# lsmod
Module Size Used by Not tainted
ipt_mark 984 1 (autoclean)
ipt_MARK 1368 13 (autoclean)
ipt_TOS 1656 7 (autoclean)
iptable_mangle 2776 1
ip_conntrack_ftp 5392 0 (unused)
ip_conntrack_irc 4240 0 (unused)
ipt_unclean 8056 3
ipt_REJECT 4344 4
ipt_LOG 4344 8
ipt_limit 1688 20
iptable_filter 2412 1
ipt_multiport 1176 4
ipt_state 1016 19
ip_conntrack 32168 2 [ip_conntrack_ftp ip_conntrack_irc ipt_state]
ip_tables 16448 11 [ipt_mark ipt_MARK ipt_TOS iptable_mangle ipt_unclean ipt_REJECT ipt_LOG ipt_limit iptable_filter ipt_multiport ipt_state]
autofs 13844 0 (autoclean) (unused)
via-rhine 15888 1
mii 4124 0 [via-rhine]
crc32 3748 0 [via-rhine]
sg 37580 0 (autoclean) (unused)
scsi_mod 111092 1 (autoclean) [sg]
ext3 74500 5 (autoclean)
jbd 56624 5 (autoclean) [ext3]
keybdev 3136 0 (unused)
mousedev 5688 0 (unused)
hid 24708 0 (unused)
input 6144 0 [keybdev mousedev hid]
ehci-hcd 21768 0 (unused)
usb-uhci 27436 0 (unused)
usbcore 82592 1 [hid ehci-hcd usb-uhci]
root@host [~]# timed out waiting for input: auto-logout
root@host [~]# su -
root@host [~]# lsmod
Module Size Used by Not tainted
ipt_mark 984 1 (autoclean)
ipt_MARK 1368 13 (autoclean)
ipt_TOS 1656 7 (autoclean)
iptable_mangle 2776 1
ip_conntrack_ftp 5392 0 (unused)
ip_conntrack_irc 4240 0 (unused)
ipt_unclean 8056 3
ipt_REJECT 4344 4
ipt_LOG 4344 8
ipt_limit 1688 20
iptable_filter 2412 1
ipt_multiport 1176 4
ipt_state 1016 19
ip_conntrack 32168 2 [ip_conntrack_ftp ip_conntrack_irc ipt_state]
ip_tables 16448 11 [ipt_mark ipt_MARK ipt_TOS iptable_mangle ipt_unclean ipt_REJECT ipt_LOG ipt_limit iptable_filter ipt_multiport ipt_state]
autofs 13844 0 (autoclean) (unused)
via-rhine 15888 1
mii 4124 0 [via-rhine]
crc32 3748 0 [via-rhine]
sg 37580 0 (autoclean) (unused)
scsi_mod 111092 1 (autoclean) [sg]
ext3 74500 5 (autoclean)
jbd 56624 5 (autoclean) [ext3]
keybdev 3136 0 (unused)
mousedev 5688 0 (unused)
hid 24708 0 (unused)
input 6144 0 [keybdev mousedev hid]
ehci-hcd 21768 0 (unused)
usb-uhci 27436 0 (unused)
usbcore 82592 1 [hid ehci-hcd usb-uhci]
root@host [~]# modinfo ip_tables
filename: /lib/modules/2.4.25/kernel/net/ipv4/netfilter/ip_tables.o
description: <none>
author: <none>
license: "GPL"
root@host [~]# rpm -q iptables
iptables-1.2.9-1.0
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #21 (permalink)  
Old 10-12-2004, 01:50 AM
Registered User
 
Join Date: Aug 2004
Posts: 84
preleaf is on a distinguished road
please,help me my server is attacked
I used this command line :
root@host [~]# iptables -A INPUT -s 220.73.136.254 -j DROP
bash: iptables: command not found
why?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #22 (permalink)  
Old 10-12-2004, 04:04 AM
Registered User
 
Join Date: Nov 2003
Location: England, UK
Posts: 133
bullethost696 is an unknown quantity at this point
Odd, unfortunately I havent got a clue why iptables is not working for you
__________________
Chris Smith - My Cheap cPanel hosting reviews
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #23 (permalink)  
Old 10-12-2004, 04:08 AM
Registered User
 
Join Date: Oct 2002
Posts: 744
jamesbond is on a distinguished road
Quote:
Originally Posted by GotHosting
BFD has issues with the script that adds teh ffff in front of the IP. Has this been fixed?
What kind of issues exactly?

I found a thread about it here http://forums.rfxnetworks.com/viewtopic.php?t=305
Does it only affect Fedora?

Last edited by jamesbond; 10-12-2004 at 04:11 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #24 (permalink)  
Old 10-12-2004, 07:42 AM
Registered User
 
Join Date: Oct 2003
Posts: 1,020
SarcNBit is on a distinguished road
Quote:
Originally Posted by preleaf
please,help me my server is attacked
I used this command line :
root@host [~]# iptables -A INPUT -s 220.73.136.254 -j DROP
bash: iptables: command not found
why?
Try

/sbin/iptables -A INPUT -s 220.73.136.254 -j DROP
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #25 (permalink)  
Old 10-12-2004, 09:53 AM
Registered User
 
Join Date: Jun 2004
Posts: 76
picoyak
FWIW, I've run APF/BFD on RH9, Debian, FC1/2 and the only time I saw the 'ffff' problem was using APF 0.9.3 - and simply upgrading APF to the latest release solved it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #26 (permalink)  
Old 10-12-2004, 01:14 PM
Registered User
 
Join Date: Jan 2004
Posts: 68
evisions
Adding BFD sounds like a pretty good solution for anyone running a cpanel server. Will running it dramatically increase server load? It seems like everything I do to keep spammers and hackers off my machines ends up costing me greatly in increased processor/memory usage. How intensive is this to run?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #27 (permalink)  
Old 10-12-2004, 01:33 PM
dgbaker's Avatar
Moderator
cPanel Partner NOC Badge
 
Join Date: Sep 2002
Location: Toronto, Ontario Canada
Posts: 2,772
dgbaker is on a distinguished road
You won't even notice it. APF with BFD I feel is a must to have and works flawlessly 9 times out of ten.
__________________
Regards,
David
Forum Moderator
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #28 (permalink)  
Old 10-12-2004, 01:51 PM
Registered User
 
Join Date: Oct 2003
Posts: 1,020
SarcNBit is on a distinguished road
Quote:
Originally Posted by dgbaker
works flawlessly 9 times out of ten.
ouch

I hope it works better than that for you. It does for me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #29 (permalink)  
Old 10-12-2004, 02:02 PM
dgbaker's Avatar
Moderator
cPanel Partner NOC Badge
 
Join Date: Sep 2002
Location: Toronto, Ontario Canada
Posts: 2,772
dgbaker is on a distinguished road
It does, I've just learned never to say 100%, someone will always hold you to it. I can say I personally have never had any issues installing and maintaining AFP/BFD setups.
__________________
Regards,
David
Forum Moderator
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #30 (permalink)  
Old 10-13-2004, 03:22 AM
Registered User
 
Join Date: Aug 2004
Posts: 84
preleaf is on a distinguished road
Quote:
Originally Posted by SarcNBit
Try

/sbin/iptables -A INPUT -s 220.73.136.254 -j DROP
thank I have do your guide and it it inform any things ,what is go on?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:36 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© cPanel Inc