disable ICMP on M10i platform

m4rtinm4rtin Member Posts: 170
sI tried to disable ICMP on Juniper M10i platform for testing purposes. At first I applied group firewall:router-protect to lo0 interface. Inside the firewall:router-protect group I defined router-protect filter, which disables ICMP protocol. However, for some reason, I'm still able to ping:
[email protected]_lab> show configuration interfaces lo0 | display inheritance    
##
## '0' was inherited from group 'firewall:router-protect'
##
unit 0 {
    ##
    ## 'inet' was inherited from group 'firewall:router-protect'
    ##
    family inet {
        ##
        ## 'filter' was inherited from group 'firewall:router-protect'
        ##
        filter {
            ##
            ## 'router-protect' was inherited from group 'firewall:router-protect'
            ## 'accept' was inherited from group 'firewall:router-protect'
            ##
            input-list [ router-protect accept ];
        }
    }
}

[email protected]_lab> ...ps firewall:router-protect | display inheritance          
error: groups is not part of inherited configuration

[email protected]_lab> show configuration groups firewall:router-protect            
interfaces {
    lo0 {
        unit 0 {
            family inet {
                filter {
                    input-list [ router-protect accept ];
                }
            }
        }
    }
}
firewall {
    filter router-protect {
        term icmp {
            from {
                protocol icmp;
            }
            then {
                count manage-discard-icmp;
                discard;
            }
        }
    }
}                                       

[email protected]_lab> ping 10.10.10.2 source 10.10.10.1 count 1                    
PING 10.10.10.2 (10.10.10.2): 56 data bytes
64 bytes from 10.10.10.2: icmp_seq=0 ttl=255 time=1.202 ms

--- 10.10.10.2 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.202/1.202/1.202/0.000 ms

[email protected]_lab> 



Then I made another firewall setup, which sets only one filter to lo0 interface:
[email protected]_lab> show configuration interfaces lo0 | display inheritance      
##
## '0' was inherited from group 'firewall:router-protect'
##
unit 0 {
    ##
    ## 'inet' was inherited from group 'firewall:router-protect'
    ##
    family inet {
        ##
        ## 'filter' was inherited from group 'firewall:router-protect'
        ##
        filter {
            ##
            ## 'router-protect' was inherited from group 'firewall:router-protect'
            ##
            input-list router-protect;
        }
    }
}

[email protected]_lab> show configuration groups firewall:router-protect          
interfaces {
    lo0 {
        unit 0 {
            family inet {
                filter {
                    input-list router-protect;
                }
            }
        }
    }
}
firewall {
    filter router-protect {
        term icmp {
            from {
                protocol icmp;
            }
            then {
                count manage-discard-icmp;
                discard;
            }
        }
        term allow {
            then accept;                
        }
    }
}

[email protected]_lab> ping 10.10.10.2 source 10.10.10.1 count 1                  
PING 10.10.10.2 (10.10.10.2): 56 data bytes
64 bytes from 10.10.10.2: icmp_seq=0 ttl=255 time=1.179 ms

--- 10.10.10.2 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.179/1.179/1.179/0.000 ms

[email protected]_lab> 


..but still ICMP works. Any ideas why protocol ICMP is still allowed while it's discarded according to configuration? icon_rolleyes.gif

Comments

Sign In or Register to comment.