Advertisement
mightyroot

ACL Multicast Dlink

Sep 24th, 2011
728
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.91 KB | None | 0 0
  1. delete access_profile profile_id 2
  2. # критерием выборки трафика считаем dscp метку
  3. create access_profile ip dscp profile_id 2
  4. # трафику с 25 и 26 порта с dscp 32 и 56 назначаем приоритет 4 и 7
  5. config access_profile profile_id 2 add access_id 1 ip dscp 32 port 25-26 permit priority 4
  6. config access_profile profile_id 2 add access_id 3 ip dscp 56 port 25-26 permit priority 7
  7.  
  8. delete access_profile profile_id 5
  9. # критерием выборки трафика считаем адрес получателя
  10. create access_profile ip destination_ip_mask 255.255.255.255 profile_id 5
  11. # поднимаем приоритет трафика адресованного серврам телефонии
  12. config access_profile profile_id 5 add access_id 1 ip destination_ip XXX.XXX.XXX.XXX port 1-26 permit priority 7
  13. config access_profile profile_id 5 add access_id 27 ip destination_ip ip XXX.XXX.XXX.XXX port 1-26 permit priority 7
  14.  
  15. # фильтруем трафик на основание протокола и порта получателя
  16. delete access_profile profile_id 6
  17. create access_profile packet_content_mask offset_16-31 0x0 0x0 0x000000ff 0x0 offset_32-47 0x0 0x0 0xffff0000 0x0 profile_id 6
  18. # фильтруем 139 , 445 ,135 порты tcp на всех портах
  19. config access_profile profile_id 6 add access_id 1 packet_content_mask offset_16-31 0x0 0x0 0x00000006 0x0 offset_32-47 0x0 0x0 0x01bd0000 0x0 port 1-26 deny
  20. config access_profile profile_id 6 add access_id 27 packet_content_mask offset_16-31 0x0 0x0 0x00000006 0x0 offset_32-47 0x0 0x0 0x00870000 0x0 port 1-26 deny
  21. config access_profile profile_id 6 add access_id 53 packet_content_mask offset_16-31 0x0 0x0 0x00000006 0x0 offset_32-47 0x0 0x0 0x008b0000 0x0 port 1-26 deny
  22. # фильтруем 137 138 1900 UDP на всех портах
  23. config access_profile profile_id 6 add access_id 79 packet_content_mask offset_16-31 0x0 0x0 0x00000011 0x0 offset_32-47 0x0 0x0 0x00890000 0x0 port 1-26 deny
  24. config access_profile profile_id 6 add access_id 105 packet_content_mask offset_16-31 0x0 0x0 0x00000011 0x0 offset_32-47 0x0 0x0 0x008a0000 0x0 port 1-26 deny
  25. config access_profile profile_id 6 add access_id 131 packet_content_mask offset_16-31 0x0 0x0 0x00000011 0x0 offset_32-47 0x0 0x0 0x076c0000 0x0 port 1-26 deny
  26. # фильтруем 1234 UDP на портах 1-24
  27. config access_profile profile_id 6 add access_id 157 packet_content_mask offset_16-31 0x0 0x0 0x00000011 0x0 offset_32-47 0x0 0x0 0x04d20000 0x0 port 1-24 deny
  28.  
  29. #занижаем приоритет трафика с 10/8 -> 10/8
  30. # при этом хождение трафика автоматом разрешается
  31. # по этому эти правила после всех фильтров
  32. delete access_profile profile_id 7
  33. create access_profile ip source_ip_mask 255.0.0.0 destination_ip_mask 255.0.0.0 profile_id 7
  34. config access_profile profile_id 7 add access_id 1 ip destination_ip 10.0.0.0 source_ip 10.0.0.0 port 1-26 permit priority 1
  35.  
  36. # включаем igmp_snooping и фильтруем левый мультикаст трафик
  37. # юзеры в влане "default"
  38. enable igmp_snooping
  39. config igmp_snooping querier default state disable
  40. config igmp_snooping default state enable
  41. config multicast port_filtering_mode all filter_unregistered_groups
  42.  
  43. # фильтры на мультикаст группы
  44. # диапазоны вещания и обновления прошивки
  45. create multicast_range 1 from 224.0.0.2 to 224.0.0.2
  46. create multicast_range 2 from 225.100.0.0 to 225.100.255.255
  47. create multicast_range 4 from 239.60.8.1 to 239.60.8.1
  48. config limited_multicast_addr ports 1-26 add multicast_range 1
  49. config limited_multicast_addr ports 1-26 add multicast_range 2
  50. config limited_multicast_addr ports 1-26 add multicast_range 4
  51. config limited_multicast_addr ports 1-26 access permit state enable
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement