Netgate m1n1wall

Author Topic: how to block facebook?  (Read 24717 times)

0 Members and 1 Guest are viewing this topic.

Offline iamthed

  • Jr. Member
  • **
  • Posts: 88
  • Karma: +0/-0
  • i'm dumb.. but i have a desire to learn
    • View Profile
how to block facebook?
« on: May 06, 2009, 01:42:55 am »
i'm having trouble with squid and squid guard..
let's say i want to block facebook so i already installed squid and squid guard..

and i already set the configuration like tutorial do..
but i want to enable transparent proxy so i don't need to setup proxy browser on every client..
i put the default rule to deny all traffic.. (just for test that squid and squid guard is working)
but yet i still can browse anything..
but when i disable the transparent proxy and setup proxy browser it's work..
do u have any idea how to solve it??
regards
« Last Edit: May 06, 2009, 02:12:51 am by iamthed »
i'm dumb.. but i have a desire to learn

Offline tommyboy180

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 976
  • Karma: +0/-0
    • View Profile
    • TomSchaefer.org
Re: how to block facebook?
« Reply #1 on: May 06, 2009, 03:25:28 am »
I would block facebook in Squid on the access control setting page. When you start adding huge lists squid may act a little strange but small lists will do perfect.
If its just one domain you want to block I would recommend just using squid, uninstall SquidGuard.
-Tom Schaefer
SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM
TomSchaefer.org/pfsense
Please support Countryblock | IP-Blocklist | File Browser | Strikeback Here

Offline iamthed

  • Jr. Member
  • **
  • Posts: 88
  • Karma: +0/-0
  • i'm dumb.. but i have a desire to learn
    • View Profile
Re: how to block facebook?
« Reply #2 on: May 06, 2009, 03:52:40 am »
I would block facebook in Squid on the access control setting page. When you start adding huge lists squid may act a little strange but small lists will do perfect.
If its just one domain you want to block I would recommend just using squid, uninstall SquidGuard.

actually i want to block all the porn sites too.. it's too many of them if i'm not using squidguard..
and what's the solution about transparent proxy failed??
if i'm using transparent proxy i don't need to setup browser proxy right?
i'm dumb.. but i have a desire to learn

Offline jigpe

  • Sr. Member
  • ****
  • Posts: 371
  • Karma: +0/-0
    • View Profile
Re: how to block facebook?
« Reply #3 on: May 13, 2009, 05:46:38 am »
I think it will work in Firewall>Rules>Lan.. Im not sure if you cn block there.
jigp
Davao City

Offline josey

  • Full Member
  • ***
  • Posts: 199
  • Karma: +0/-0
    • View Profile
Re: how to block facebook?
« Reply #4 on: May 13, 2009, 06:20:55 am »
well,
alow all
and on chat or socialnetwork set deny and thats it ...

Offline jigpe

  • Sr. Member
  • ****
  • Posts: 371
  • Karma: +0/-0
    • View Profile
Re: how to block facebook?
« Reply #5 on: May 13, 2009, 06:51:08 am »
Ok thanks ill try that too.
OT: is there a way to change the default proxy squid host and port 3128? I have a private proxy and port but upon reading the /var/squid its not there anymore...
jigp
Davao City

Offline josey

  • Full Member
  • ***
  • Posts: 199
  • Karma: +0/-0
    • View Profile
Re: how to block facebook?
« Reply #6 on: May 14, 2009, 12:34:14 am »
just use transparent proxy it is easy way to set it up

Offline iamthed

  • Jr. Member
  • **
  • Posts: 88
  • Karma: +0/-0
  • i'm dumb.. but i have a desire to learn
    • View Profile
Re: how to block facebook?
« Reply #7 on: May 14, 2009, 01:27:30 am »
just use transparent proxy it is easy way to set it up


i have some problem with transparent proxy since i used bridge method..
dvserg say bridge method can't use transparent proxy..
and if i'm not using bridge method.. i can't connect to internet..
weird isn't it?
or i'm dumb enough..
dunno which one
i'm dumb.. but i have a desire to learn

Offline Bern

  • Full Member
  • ***
  • Posts: 135
  • Karma: +0/-0
    • View Profile
Re: how to block facebook?
« Reply #8 on: May 14, 2009, 01:39:30 am »
How about using OpenDNS?

So far it's worked perfectly for me in about 10 clients' offices.

We had to make squid use OpenDNS's DNS servers and kept everything else on the respective ISP's DNS servers because OpenDNS was occasionally blocking access to hotmail's MX records etc, which caused problems with outbound mail.

Offline jigpe

  • Sr. Member
  • ****
  • Posts: 371
  • Karma: +0/-0
    • View Profile
Re: how to block facebook?
« Reply #9 on: May 14, 2009, 02:34:25 am »
Thanks. I will use opendns again. Though some sites are blocked without setting up the menu there in the opendns site :(
Sometimes i disabled opendns just to access the site..

thanks,
jigp
Davao City

Offline MikeKulls

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: how to block facebook?
« Reply #10 on: March 31, 2011, 03:55:30 am »
My solution was to create an Alias with the following network entries
66.220.144.0/20
69.63.176.0/20
204.15.20.0/22

and then block that Alias in firewall rules.

Offline john doe

  • Jr. Member
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: how to block facebook?
« Reply #11 on: April 03, 2011, 11:13:43 am »
FACEBOOK_ALLOW="192.168.1.12 192.168.1.14 192.168.1.111"
iptables -N FACEBOOK
 
iptables -I FORWARD -m tcp -p tcp -m iprange --dst-range 66.220.144.0-66.220.159.255 --dport 443 -j FACEBOOK
iptables -I FORWARD -m tcp -p tcp -m iprange --dst-range 69.63.176.0-69.63.191.255 --dport 443 -j FACEBOOK
iptables -I FORWARD -m tcp -p tcp -m iprange --dst-range 204.15.20.0-204.15.23.255 --dport 443 -j FACEBOOK
iptables -I FORWARD -m tcp -p tcp -m iprange --dst-range 66.220.144.0-66.220.159.255 --dport 80 -j FACEBOOK
iptables -I FORWARD -m tcp -p tcp -m iprange --dst-range 69.63.176.0-69.63.191.255 --dport 80 -j FACEBOOK
iptables -I FORWARD -m tcp -p tcp -m iprange --dst-range 204.15.20.0-204.15.23.255 --dport 80 -j FACEBOOK
 
## FACEBOOK ALLOW
for face in $FACEBOOK_ALLOW; do
    iptables -A FACEBOOK -s $face -j ACCEPT
done
iptables -A FACEBOOK -j REJECT

Offline Cry Havok

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2793
  • Karma: +1/-0
  • Backup: n. What you should have done yesterday.
    • View Profile
Re: how to block facebook?
« Reply #12 on: April 03, 2011, 11:48:34 am »
Which would be better if pfSense was Linux ;)
If you're planning on PMing me to ask me to look at a thread, or for individual support, don't.

Offline john doe

  • Jr. Member
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: how to block facebook?
« Reply #13 on: April 03, 2011, 11:51:54 am »
no no..... list of IP's facebook use. Thats all. Should have made that clear.

Offline jigpe

  • Sr. Member
  • ****
  • Posts: 371
  • Karma: +0/-0
    • View Profile
Re: how to block facebook?
« Reply #14 on: August 12, 2011, 06:56:44 pm »
Hi try my post. It work for me and the rest of my friends. Search "How to block facebook in 4 ways" or click this link http://forum.pfsense.org/index.php/topic,39849.msg205547.html#msg205547

jigp