IP Deny Manager not working!!

JohnJacobes

Member
Aug 31, 2003
5
0
151
Apparently my IP Deny Manager is not working correctly. I mean, I add all of the IP's and domains, but it doesn't really ban anything. All the IP's I have banned, the users of those IP's are able to successfuly get in. We think it's a .htaccess file problem, so please help us figure out why it's not working. :(

cPanel.net Support Ticket Number: retarded people are getting in my site :(
 

JohnJacobes

Member
Aug 31, 2003
5
0
151
Eeek.. sorry I thought where it said Support Ticket Number, it said Topic Description. I use Invision Board.. sorry about that. However, please someone help me on this. :(

cPanel.net Support Ticket Number:
 

Jemshi

Well-Known Member
Sep 11, 2003
210
0
166
India
Originally posted by JohnJacobes
Apparently my IP Deny Manager is not working correctly. I mean, I add all of the IP's and domains, but it doesn't really ban anything. All the IP's I have banned, the users of those IP's are able to successfuly get in. We think it's a .htaccess file problem, so please help us figure out why it's not working. :(

cPanel.net Support Ticket Number: retarded people are getting in my site :(
I assume you are doing this for a domain from its control panel. Look in your public_html to see if a .htaccess file is created there with something like this.

deny from IP

the feature works fine for us :)

By the way, is this a frontpage enabled site ?

cPanel.net Support Ticket Number:
 

wills

Well-Known Member
Jan 29, 2003
202
1
168
I have a FrontPage enabled site with the IP deny not working properly. Anyone else having this issue?

cPanel.net Support Ticket Number:
 

Jemshi

Well-Known Member
Sep 11, 2003
210
0
166
India
Originally posted by wills
I have a FrontPage enabled site with the IP deny not working properly. Anyone else having this issue?

cPanel.net Support Ticket Number:
frontpage has no option to set this ? we should not modify the .htaccess manually which are made by frontpage. This breaks frontpage access - so there should be option to set IP deny from frontpage.

cPanel.net Support Ticket Number:
 

wills

Well-Known Member
Jan 29, 2003
202
1
168
FrontPage does not have that option. Unless I am looking at the wrong place.

The other thing is that when the IP Deny is working, the custom 403 error page does not show up. Even though it is sepcified in htaccess... any ideas?

cPanel.net Support Ticket Number:
 

rbrown

Active Member
Jun 11, 2003
35
0
156
Yes, this has never worked for me either. This is just a cPanel bug that has never been tested or verified by cPanel's staff. Let me provide a little more details:

I'm not sure if you would say it's a problem with "Frontpage (re)install" or with the "IP Deny Manager", but the problem is caused by a broken .htaccess configuration installed from FP Extensions. To fix the buggy .htaccess configuration, simply UNinstall Frontpage extensions and the bugs get deleted with it. (Never ever install frontpage extensions again or the bug will come back). Then whatever IPs you add using cPanel's "IP Deny Manager" will be banned perfectly. (You just need to add them again since uninstalling frontpage takes everything with it into the bit-bucket.)

If you want frontpage installed AND want to use IP Deny Manager, then you can add a cron using the "Stanard Cron Job Manager" to undo the cPanel bugs as follows:

* * * * * perl -p -i -e 's/deny,allow/allow,deny/' ~/public_html/.htaccess

Or set it to run every hour or every day or whatever. Or you can just run this perl line from command prompt after every time you install frontpage extensions. Running this command will perform the following repairs:

OLD EVIL:
order deny,allow

NEW GOOD:
order allow,deny

I'm surprised that Jemshi didn't just say that this is a bug instead of pretending like everything was working. I guess Jemshi just didn't have FrontPage enabled when testing.

Hopefully, someone is strong enough to convince Nick to repair the "IP Deny Manager" to start fixing the order command on-the-fly to ensure that "deny" is LAST in order to force the deny settings to override any allow settings.

cPanel.net Support Ticket Number:
 

wills

Well-Known Member
Jan 29, 2003
202
1
168
Well this is certainly a great help. Thank you!

cPanel.net Support Ticket Number:
 

rbrown

Active Member
Jun 11, 2003
35
0
156
Re: Re: IP Deny Manager not working!!

Originally posted by rbrown
If you want frontpage installed AND want to use IP Deny Manager, then you can add a cron using the "Stanard Cron Job Manager" to undo the cPanel bugs as follows:

* * * * * perl -p -i -e 's/deny,allow/allow,deny/' ~/public_html/.htaccess

Oh, and of course that "deny from all" might cause problems for those that are not explicitly banned. Better try this command instead:

perl -p -i -e 's/deny,allow/allow,deny/;s/^(d.*\ball)$/#$1/' ~/public_html/.htaccess

Sorry bout that :-D

cPanel.net Support Ticket Number:
 

rbrown

Active Member
Jun 11, 2003
35
0
156
Originally posted by wills
The other thing is that when the IP Deny is working, the custom 403 error page does not show up. Even though it is sepcified in htaccess... any ideas?
Yes, I've been having the same problem.

You cannot see the custom 403.shtml because that page is ALSO denied for the same reason that the other page you were trying to access. You probably see that "ADDITIONALLY" error which means apache hit another error while trying to catch the first error. It shows that "ADDITIONALLY" error to avoid an infinite loop.

You can fix this by putting these lines somewhere in the ~/public_html/.htaccess for each user:

Code:
<Files ~ 403.shtml>
order allow,deny
allow from all
</Files>
but if you have root access on the server, you can fix EVERYONE on the entire machine by putting this somewhere in /usr/local/apache/conf/httpd.conf:

Code:
<Location /403.shtml>
order deny,allow
allow from all
</Location>
Then the changes don't get wiped every time someone installs Frontpage. Wouldn't it be nice if cPanel just put that in the httpd.conf automatically like all that other stuff they put in there?

cPanel.net Support Ticket Number:
 

Rich Z

Member
Dec 28, 2002
7
0
151
Ah!

So tell me, is here any RISK associated with uninstalling the front page extensions from a live domain? I'm not running FrontPage, but there is a very active vBulletin message board on there that I don't want to screw around with.

Thanks for the help!