Block Facebook Chat on Your Network

2 05 2008

I don’t have a lot of time to post right now, but I just wanted to leave this note.  Now that Facebook has completely rolled out their Facebook chat integration, I had to block it at work (The only chat allowed is our internal XMPP server.) Blocking the feature is as simple as blacklisting a single URL, drumroll….

http://facebook.com/ajax/chat/

Done, now users will see how many friends are online, but if they go to send anyone a message, it will never go through, and chat history does not show up.  I am sure you can block more extensively, but for a quick and dirty fix, this does the trick.  Love being an administrator…


Actions

Information

17 responses

13 05 2008
Zaghloul

Thank you so much, It is very elegant.

25 05 2008
KC

Thank you! Very useful. Simple and effective.

23 07 2008
Shylo

Thanks! AWsome ! Have a nice summer!!!

4 08 2008
snixx

Thanks alot, noticed quite a few of our clients using this when they shouldnt (Ive banned chat) so this will do the trick.

8 08 2008
Arckane

Added that to Squid and it’s still working.

Checked the page source and it doesn’t mention that url at all.

11 08 2008
jaredb.

@Arckane: It does not mention it in the source however if you run a TCP Dump you will see HTTP POST to that address. If you want to tighten it up even more you can block facebook.com/images/chat/ which will (obviously) block all images related to the chat interface. We could block certain javascript libraries/classes but that would break other things as well.

On another note, users will be able to receive messages, but not send using this block.

10 03 2009
danci1973

You can also block the ‘Online friends’:

http://www.facebook.com/ajax/presence

This way the number of online friend will always be 0.

18 04 2009
mark

tried all these in my router and they didn’t block anything. it all worked fine. should i be adding them somewhere other than my blocked keywords list?

1 05 2009
Rich

I’ve tried this in hosts file and on Linksys router exceptions list.
These blocks do not work for me, what am I doing wrong?

18 05 2009
Mark Stephan

This no longer works. Facebook must have changed things.

14 07 2009
BigWhale

I found that blocking facebook.com/ajax/presence works.

21 08 2009
Christian Rioux

Anyone have a working solution?

10 09 2009
sandrar

Hi! I was surfing and found your blog post… nice! I love your blog. :) Cheers! Sandra. R.

10 09 2009
Jane

You are EVIL!

10 09 2009
Jane

I don’t think your clients will be very happy either. They may not want to be your clients anymore! Ah, I get it, you’re just losers! Ok.

16 09 2009
Christian Rioux

I’ve blocked 69.63.176.193 at the firewall, and it seems to work

24 09 2009
Christian Rioux

@Jane
You don’t know what you are talking about. We are in a SCHOOL, the students are not supposed to chat during class. It is normal to block chat.
Internet acces is a privilege, not a right.

Leave a comment