Thread: hosts.allow
-
April 11th, 2012, 08:38 PM #1
hosts.allow
I have a Linux (Red Hat) web server. I've noticed some questionable activity in the access_log. I just need to block a few IP addresses (and later on maybe a few IP ranges).
The tutorials online are pretty straightforward; to block an IP from all services on the server, add the following line to hosts.allow:
However, when I try to test this with another server with a known IP, I can still successfully connect to my server. I just test by opening a telnet session on port 80 (I know, there's probably better ways, but this should work, right?).Code:ALL : x.x.x.x : deny
Another thing I noticed was that I have both a hosts.allow and hosts.deny, but I heard hosts.deny is deprecated (correct me if I'm wrong).
Is there something I'm doing wrong? Does anyone have better testing methods to try, or better syntax to use?
My Build (Jan 2011):
Intel Core i7-950 3.06GHz Quad-Core, 6gb Corsair DDR3 1600, 1TB HDD, 60GB SDD, GeForce GTX 460 1GB
-
April 12th, 2012, 04:31 AM #2
Do you have iptables configured and running on the box by chance?
-
April 12th, 2012, 02:55 PM #3
Looks like I do; I ran the following to make sure it was up and running:
Then, I found that the following can be run to block all packets from an IP:Code:service iptables status
Looks like I'm good to go! ThanksCode:iptables -I INPUT -s x.x.x.x -j DROP
My Build (Jan 2011):
Intel Core i7-950 3.06GHz Quad-Core, 6gb Corsair DDR3 1600, 1TB HDD, 60GB SDD, GeForce GTX 460 1GB
-
April 12th, 2012, 03:01 PM #4
Good to hear!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Some hosts doesn't work...
By hubuz in forum Networking and InternetReplies: 5Last Post: April 9th, 2009, 11:34 AM -
Who hosts my website?
By fourthbean in forum Networking and InternetReplies: 2Last Post: December 26th, 2005, 01:49 PM -
website hosts
By Klytie in forum Webmastering and ProgrammingReplies: 3Last Post: August 12th, 2004, 06:16 PM -
Need help with hosts.allow
By hav0c in forum Linux and UnixReplies: 1Last Post: April 3rd, 2004, 02:20 PM -
Looking for hosts, came up with this.
By Pakaraatzi in forum Webmastering and ProgrammingReplies: 11Last Post: December 8th, 2002, 05:21 PM



LinkBack URL
About LinkBacks



Reply With Quote

14 year old, Eruption, Van Halen...need I say more?? Van Halen - Eruption Guitar Cover - YouTube
Is It Just Me? v233893843