[ESR] Фильтрация трафика с помощью firewall в одном широковещательном домене
Рассмотрим пример, в котором необходимо Хосту 1 запретить отправлять трафик ICMP, проходящий через ESR, то есть ESR выступает в качестве firewall, а также узла коммутации. В данном примере используется ESR-1000.
Конфигурация ESR:
esr-1000# sh ru
object-group network host_1
ip address-range 192.168.1.10
exit
system fan-speed auto
no spanning-tree
ecurity zone trusted
exit
bridge 1
ports firewall enable
security-zone trusted
enable
exit
interface gigabitethernet 1/0/23
mode hybrid
bridge-group 1
exit
interface gigabitethernet 1/0/24
mode hybrid
bridge-group 1
exit
security zone-pair trusted trusted
rule 1
action deny
match protocol icmp
match source-address host_1
enable
exit
rule 2
action permit
enable
exit
exit
В данной конфигурации блокируется протокол ICMP для ip пакетов, имеющих src ip 192.168.1.10.
Дамп трафика при запросе по ICMP Хоста 2 с Хоста 1:
esr-1000# monitor gigabitethernet 1/0/23 protocol icmp packets 4
17:37:18.952310 a8:f9:4b:ac:9f:32 > a8:f9:4b:aa:38:1c, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 11170, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.1.10 > 192.168.1.20: ICMP echo request, id 77, seq 1, length 64
17:37:19.953428 a8:f9:4b:ac:9f:32 > a8:f9:4b:aa:38:1c, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 11270, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.1.10 > 192.168.1.20: ICMP echo request, id 77, seq 2, length 64
17:37:20.954509 a8:f9:4b:ac:9f:32 > a8:f9:4b:aa:38:1c, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 11286, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.1.10 > 192.168.1.20: ICMP echo request, id 77, seq 3, length 64
17:37:21.955584 a8:f9:4b:ac:9f:32 > a8:f9:4b:aa:38:1c, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 11370, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.1.10 > 192.168.1.20: ICMP echo request, id 77, seq 4, length 64
В данном дампе трафика отсутствуют ICMP echo reply.
Дамп трафика при запросе по ICMP Хоста 1 с Хоста 2:
esr-1000# monitor gigabitethernet 1/0/24 protocol icmp packets 4
17:38:23.125035 a8:f9:4b:aa:38:1c > a8:f9:4b:ac:9f:32, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 3332, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.1.20 > 192.168.1.10: ICMP echo request, id 32, seq 1, length 64
17:38:23.125467 a8:f9:4b:ac:9f:32 > a8:f9:4b:aa:38:1c, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 14488, offset 0, flags [none], proto ICMP (1), length 84)
192.168.1.10 > 192.168.1.20: ICMP echo reply, id 32, seq 1, length 64
17:38:24.126133 a8:f9:4b:aa:38:1c > a8:f9:4b:ac:9f:32, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 3383, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.1.20 > 192.168.1.10: ICMP echo request, id 32, seq 2, length 64
17:38:24.126536 a8:f9:4b:ac:9f:32 > a8:f9:4b:aa:38:1c, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 14560, offset 0, flags [none], proto ICMP (1), length 84)
192.168.1.10 > 192.168.1.20: ICMP echo reply, id 32, seq 2, length 64
Источник:
docs.eltex-co.ru