In order to block an IP on your Linux server you need to use iptables firewall. First you need to log into shell as root user. To block IP address you need to type iptables command as follows:
iptables -A INPUT -s IP-ADDRESS -j DROP
Replace IP-ADDRESS with actual IP address. For example if you wish to [...]
Archive for March, 2007
How do I block an IP on my Linux server?
Posted in Linux on March 21, 2007 | Leave a Comment »
How do I block music files using squid content filtering ACL?
Posted in Linux on March 21, 2007 | Leave a Comment »
First open squid.conf file
/etc/squid/squid.conf:
#vi /etc/squid/squid.conf
Now add following lines to your
squid ACL section:
acl blockfiles urlpath_regex “/etc/squid/blocks.files.acl”
You want display custom error message
when a file is blocked:
#Deny all blocked extension
deny_info
ERR_BLOCKED_FILES blockfiles
http_access
deny blockfiles
Save and close the file.
Create custom error message HTML file called ERR_BLOCKED_FILES in
/etc/squid/error/ directory or /usr/share/squid/errors/English directory.
#vi ERR_BLOCKED_FILES
Append following content:
<HTML>
<HEAD>
<TITLE>ERROR:
Blocked file content</TITLE>
</HEAD>
<BODY>
<H1>File is blocked due to new [...]
