LinuxQuestions.org
Help answer threads with 0 replies.
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
 
LinkBack Search this Thread
Old 02-04-2009, 05:40 PM   #1
noir911
Member
 
Registered: Apr 2004
Location: Baltimore, MD
Posts: 680

Rep: Reputation: Disabled
TCPWrapper block IP


I'm trying to block a single IP that's showing up in my apache log. I have put it in my /etc/hosts.deny as ALL: IP_Address (haven't restarted any daemon after making the change - not sure if I need to).

But that IP is still showing up in my apache log - how do I block it or know that it's been blocked?

I don't want to deny it via iptables or apache.

Thanks.
 
Old 02-04-2009, 05:54 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Debian, FreeBSD
Posts: 3,753
Blog Entries: 5

Rep: Reputation: Disabled
You can only use tcp wrappers if the binary was compiled to support it. Look at these two examples -- the first binary has tcp wrappers support compiled in; the second does not.

w/ tcp wrappers
Code:
%whereis -b sshd
sshd: /usr/sbin/sshd

%ldd /usr/sbin/sshd | grep 'libwrap'
        libwrap.so.0 => /usr/lib/libwrap.so.0 (0x00954000)
w/o tcp wrappers
Code:
%whereis -b httpd
httpd: /usr/sbin/httpd.worker /usr/sbin/httpd /etc/httpd /usr/lib/httpd

%ldd /usr/sbin/httpd | grep 'libwrap'
If recompiling Apache web server is not an option (I suspect it isn't), then you'll want to look at blocking the IP address with a host-level packet filtering firewall, or within the Apache config file itself.

What OS/version are you asking about? And what version of httpd?

-------

edit: Just saw this -
Quote:
Originally Posted by noir911
I don't want to deny it via iptables or apache.
Why is that?

Last edited by anomie; 02-04-2009 at 05:56 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error reading block "x" (Attempt to read block from....... pvandyk2005 Slackware 6 07-06-2008 05:25 AM
iptables quivalent of tcpwrapper prayag_pjs Linux - Newbie 5 02-15-2008 02:02 AM
VSFTP, tcpwrapper teruzzi Linux - Security 0 01-07-2008 09:44 PM
[DEBIAN SARGE] problems setting up sshd to use tcpwrapper nonutopia Linux - Security 1 08-23-2005 08:04 AM
IPTables and PPTPD :S (to block or not to block) thewonka Linux - Networking 0 03-24-2005 06:58 PM


All times are GMT -5. The time now is 04:45 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration