cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
879
Views
0
Helpful
2
Replies

Facebook block

obafemiboye
Level 1
Level 1

I currently administer a network. I use a Cisco 2821 as my gateway.Please i will need a configuration to block some users on my Network from accessing the following sites: www.facebook.com, www.youtube.com, Yahoo Chat.

My LAN IP: 172.16.0.0/24

WAN: 10.1.1.0/28

2 Replies 2

NickNac79
Level 1
Level 1

Hi Obafemiboye,

The best way to accomplish this is using a proper proxy with content filter - there are options ranging from very expensive to free.

(Try IPCOP with squidguard addon for example)

A very quick and dirty way to block facebook using only your router is to route all traffic to facebook Ip addresses to null


ip route 69.63.184.142 255.255.255.255 null0
ip route 69.63.187.17 255.255.255.255 null0
ip route 69.63.187.19 255.255.255.255 null0
ip route 69.63.181.11 255.255.255.255 null0
ip route 69.63.181.12  255.255.255.255 null0

If you want to only block access for certain users, then this is possible using Policy Based Routing


ip access-list extended ACL_BLOCK_FACEBOOK

   permit ip 192.168.1.0 0.0.0.255 host 69.63.184.142
   permit ip 192.168.1.0 0.0.0.255 host 69.63.187.17
   permit ip 192.168.1.0 0.0.0.255 host 69.63.187.19
   permit ip 192.168.1.0 0.0.0.255 host 69.63.181.11
   permit ip 192.168.1.0 0.0.0.255 host 69.63.181.12

   deny ip any any


route-map RM_BLOCK_FACEBOOK permit 10
   match ip address ACL_BLOCK_FACEBOOK
   set ip next-hop null0
!
route-map RM_BLOCK_FACEBOOK permit 20
!


Interface f0/1

  description Inside Interface

  ip policy route-map RM_BLOCK_FACEBOOK


This assumes the users you want to block are in the range 192.168.1.0/24

However this is easily circumvented by people using open proxies.

Hope this helps ;-)

Nick

Thanks. I will implement it and get back to you.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card