Remove ip’s from squidguard file

You got an IP list

list:

172.36.2.10
172.36.2.12
172.36.2.14
172.36.2.15
172.36.2.17
172.36.2.17
172.36.2.202
172.36.2.21
172.36.2.23
172.36.2.38
172.36.2.40

Backup squidguard.conf

Execute sed with match whole word sintax to avoid problems removing aditional IP’s you don’t want to.

# for i in `cat list` ; do sed -i "/$i\b/d" squidguard.conf ; done

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s