1. Store
  2. Apps
  3. Hardware
  4. Support
  5. Solutions

ClearFoundation

Forums
Welcome, Guest
want to restrict https://facebook.com
(1 viewing) 1 Guest
Go to bottomPage: 1
TOPIC: want to restrict https://facebook.com
#44704
want to restrict https://facebook.com 10 Months, 1 Week ago  
hi i was restrict the facebook.com, but the users are able to access the facebook with facebook.com,
so i want to block the facebook with https protocal
please help me some one
prashanth
Fresh Boarder
Posts: 11
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2012/08/10 05:24 By prashanth.chowla@yahoo.co.
The administrator has disabled public write access.
 
#44773
Re: want to restrict https://facebook.com 10 Months, 1 Week ago  
Hi,

Firstly, make sure that your browsers are configured with the Proxy/Filter (your firewall IP:8080 for all protocols). This is a must. You can hard code these or use WPAD, policies or similar to get the info out. If you are dealing with just a few home PCs then just manually set them but if you have an Enterprise that is probably the hardest part to achieve.

Once the above is set, drop to the Firewall CLI (as root) and enter this based upon which version of ClearOS you are using:
V5:
nano /etc/rc.d/rc.firewall.local
V6:
nano /etc/clearos/firewall.d/local

Code:


# Drop all HTTPS traffic from passing through NAT global internal
iptables -I FORWARD -p tcp -s 10.0.0.0/8 --dport 443 -j DROP
# Allow specific subnets to pass 
iptables -I FORWARD -p tcp -s 10.1.1.0/24 --dport 443 -j ACCEPT
iptables -I FORWARD -p tcp -s 10.1.10.0/24 --dport 443 -j ACCEPT
# Administration Static IPs  allow unconfigured browser access
iptables -I FORWARD -p tcp -s 10.2.1.16 --dport 443 -j ACCEPT
iptables -I FORWARD -p tcp -s 10.2.1.5 --dport 443 -j ACCEPT



Now restart the firewall service:

Code:


service firewall restart



The above will drop all HTTPS/443 from passing through NAT but allow the Firewall itself to connect. This causes anyone not configured to use the Proxy(Firewall) to be blocked. As there is *always* that special user or group of users - I put you a couple of examples of how to allow specific subnets & IPs to pass whilst denying the rest.

Once all your browsers *have* to use the proxy for access, URL Filtering at least (not word analysis) will take place on HTTPS. It is transparent that is currently unable, by design, to filter HTTPS streams. Then make sure facebook.com is in your list of bad sites and you should be in business.

Note that you can reverse the iptables rules to allow access to a set of HTTPS sites like local banks and other frequently used HTTPS sites with a rule like this in the above file:

Code:


iptables -I FORWARD -p tcp -d 167.192.222.0/24 --dport 443 -j ACCEPT



Hope that helps.

Jim
Jim Robinson
Senior Boarder
Posts: 63
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2012/08/12 07:15 By Jimsngc.Reason: Still can't type ;)
The administrator has disabled public write access.
Insert Your Choice Of Funny Tag Line Here---->
 
#44932
Re: want to restrict https://facebook.com 10 Months, 1 Week ago  
Hi jim,
Thank you for reply, here whenever i block the FB, all the https sites are blocking, even i open the site like yahoo and gmail, so my associates are unable to open the gmail and yahoo sites

have a look the below rules which i was configured in firewall

to block the FB
iptables -I FORWARD -p tcp -s 192.168.0.0/24 --dport 443 -j DROP

for open the yahoo


iptables -I FORWARD -p tcp -d 119.160.0.0/16 --dport 443 -j ACCEPT
iptables -I FORWARD -p tcp -d 124.108.0.0 /16 --dport 443 -j ACCEPT

for gmail
iptables -I FORWARD -p tcp -d 74.125.0.0/16 --dport 443 -j ACCEPT
iptables -I FORWARD -p tcp -d 216.239.32.0/19 --dport 443 -j ACCEPT

is there any method to block as using ip address for facebook

in the rules is there anything wrong please let me know
prashanth
Fresh Boarder
Posts: 11
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#44941
Re: want to restrict https://facebook.com 10 Months, 1 Week ago  
Have you seen this thread and the one I link to in that thread?
Nick Howitt
Platinum Boarder
Posts: 4232
graphgraph
User Online Now Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
  get the latest posts directly to your desktop