Blocking an IP address

PCTech

Verified User
Joined
Nov 27, 2005
Messages
104
Location
USA
How can I block an entire IP address *OR* domain from accessing my site? I found how to block an email from the domain but not to block them from the entire site.

Thanks!
 
Hi,
You can use a .htaccess file with the txt spec. under the line

---------------------------------------
order allow,deny
deny from 00.00.00.00
allow from all
---------------------------------------

change the zero's for the IP or put the domain in it.
 
Ok - I know that makes perfect sense to you, lol - but not to me. I'm assuming there is not way to do it through DirectAdmin? (where to I go to find this .htaccess file as in - what folder/directory is it in?)

-Thanks so much!
 
There is no way to block IP's in DirectAdmin so you have to use solution like htaccess

I have included a rar file in this reply, unpack it then you see a file with no txt label, don't change it.
You can open the file with txt editor like wordpad.
Change the IP and save.

Upload the file in your public html dir. where your index file is located.
after upload it is normal that you can't see the file but it is there. You can see it in the filemanager from DirectAdmin.

If needed more help contact me by pm.
 

Attachments

Last edited:
íYou can create .htaccess under public_html by
1. DA File Manager
2. FTP client

Note: Most ftp client filter file beginning with . (dot) from display, you have to find in the options setting of ftp program to display it, this difference on each ftp program.

Or you may globally block that ip in server firewall rule. (root)
 
@KKE

Read my message before yours.....already said what you wrote.
Problem is solved with the Topicstarter trough PM messages.

--
 
Last edited:
Back
Top