lab@R5# show | no-more
family inet {
filter protect-re {
term RSVP-allow {
from {
protocol rsvp;
}
then accept;
}
term LDP-allow {
from {
protocol [ tcp udp ];
port ldp;
}
then accept;
}
term BGP-allow {
from {
source-prefix-list {
configureed-bgp-neighbors;
}
protocol tcp;
port bgp;
}
then accept;
}
term OSPF-allow {
from {
protocol ospf;
}
then accept;
}
term VRRP-allow {
from {
protocol vrrp;
}
then accept;
}
term SSH-allow {
from {
source-address {
172.27.0.0/16;
192.168.0.0/16;
}
protocol tcp;
port ssh;
}
then {
log;
accept;
}
}
term SSH-block {
from {
source-address {
0.0.0.0/0;
}
protocol tcp;
port ssh;
}
then {
log;
discard;
}
}
term telnet-accept {
from {
source-address {
192.168.0.0/16;
}
protocol tcp;
port telnet;
}
then {
log;
accept;
}
}
term TRACEROUTE-allow {
from {
protocol udp;
ttl 1;
}
then accept;
}
term PING-allow {
from {
protocol icmp;
}
then accept;
}
term DNS-allow {
from {
protocol [ tcp udp ];
port 53;
}
then accept;
}
term RADIUS-allow {
from {
protocol udp;
port radius;
}
then accept;
}
term FTP-limit {
from {
protocol tcp;
port [ ftp ftp-data ];
}
then policer restrict-ftp;
}
term discard-all {
then {
discard;
}
}
}
}
policer restrict-ftp {
if-exceeding {
bandwidth-limit 100m;
burst-size-limit 1500;
}
then discard;
}
[edit firewall]
lab@R5# top show policy-options
prefix-list configureed-bgp-neighbors {
apply-path "protocols bgp group <*> neighbor <*>";
}
接口下应用
[edit]
lab@R5# top show interfaces lo0
unit 0 {
family inet {
filter {
input protect-re;
}
address 172.27.255.5/32;
}
}