Hello,
I need to block some ports for subscribers like telnet, ssh but need to allow access for some address.
I've created the filters like:
set firewall family inet filter MY-FILTER-10M interface-specific
set firewall family inet filter MY-FILTER-10M term 10 from source-prefix-list MY-WHITELISTLIST
set firewall family inet filter MY-FILTER-10M term 10 then policer LIMIT-10M
set firewall family inet filter MY-FILTER-10M term 10 then accept
set firewall family inet filter MY-FILTER-10M term BLOCK-SSH from destination-port 22
set firewall family inet filter MY-FILTER-10M term BLOCK-SSH then discard
set firewall family inet filter MY-FILTER-10M term BLOCK-TELNET from destination-port 23
set firewall family inet filter MY-FILTER-10M term BLOCK-TELNET then discard
set firewall family inet filter MY-FILTER-10M term BLOCK-DNS from destination-port 53
set firewall family inet filter MY-FILTER-10M term BLOCK-DNS then discard
set firewall family inet filter MY-FILTER-10M term LAST then policer LIMIT-10M
set firewall family inet filter MY-FILTER-10M term LAST then accept
set firewall family inet filter MY-FILTER-20M interface-specific
set firewall family inet filter MY-FILTER-20M term 10 from source-prefix-list MY-WHITELISTLIST
set firewall family inet filter MY-FILTER-20M term 10 then policer LIMIT-20M
set firewall family inet filter MY-FILTER-20M term 10 then accept
set firewall family inet filter MY-FILTER-20M term BLOCK-SSH from destination-port 22
set firewall family inet filter MY-FILTER-20M term BLOCK-SSH then discard
set firewall family inet filter MY-FILTER-20M term BLOCK-TELNET from destination-port 23
set firewall family inet filter MY-FILTER-20M term BLOCK-TELNET then discard
set firewall family inet filter MY-FILTER-20M term BLOCK-DNS from destination-port 53
set firewall family inet filter MY-FILTER-20M term BLOCK-DNS then discard
set firewall family inet filter MY-FILTER-20M term LAST then policer LIMIT-20M
set firewall family inet filter MY-FILTER-20M term LAST then accept
set dynamic-profiles PPPoE interfaces pp0 unit "$junos-interface-unit" family inet filter output $junos-output-filter
The filters are huge. I need to create a lot of those.
Juniper subscriber doesn't support filter list like would be:
set dynamic-profiles PPPoE interfaces pp0 unit "$junos-interface-unit" family inet filter output-list [ MY-GENERAL-FILTER $junos-output-filter]
The ideia is create a general filters and the policer filter will be just:
set firewall family inet filter MY-FILTER-xxM term LAST then policer LIMIT-xxM
set firewall family inet filter MY-FILTER-xxM term LAST then accept
Is that possibible to simplify the filters without loss of performance?