juniper ex4200 acl限制telnet登录,求看看语法对不对
set policy-options prefix-list telnet-list 124.205.32.98/32set policy-options prefix-list telnet-list 124.205.32.99/32
set policy-options prefix-list telnet-list 203.158.16.20/32
set policy-options prefix-list telnet-list 218.241.11.253/32
set firewall filter telnet term 1 from destination-address 58.135.77.96/32
set firewall filter telnet term 1 from source-prefix-list telnet-list
set firewall filter telnet term 1 from destination-port telnet
set firewall filter telnet term 1 then accept
set firewall filter telnet term 2 from destination-address 58.135.77.96/32
set firewall filter telnet term 2 from destination-port telnet
set firewall filter telnet term 2 then reject
set firewall filter telnet term 3 then accept
然后挂接口
请问我这样写语法对不。只允许上面那4个IP地址telnet 58.135.77.96,但是不影响其他连通性
本帖最后由 motive6 于 2016-10-17 14:18 编辑
给你写好一个
filter mgmt-telnet {
term t1 {
from {
source-address {
124.205.32.98/32;
124.205.32.99/32;
203.158.16.20/32;
218.241.11.253/32;
}
protocol tcp;
destination-port telnet;
}
then accept;
}
term t3 {
from {
protocol tcp;
destination-port telnet;
}
then {
discard;
}
} 本帖最后由 gzyhh010518 于 2016-10-17 15:06 编辑
motive6 发表于 2016-10-17 14:16
给你写好一个
filter mgmt-telnet {
您好 请问您不写目的地址的话 这个挂在哪里?能否像cisco一样 在line vty 直接挂in方向 本帖最后由 gzyhh010518 于 2016-10-17 15:14 编辑
motive6 发表于 2016-10-17 14:16
给你写好一个
filter mgmt-telnet {
filter telnet {
term 1 {
from {
source-address {
124.205.32.98/32;
124.205.32.99/32;
203.158.16.20/32;
218.241.11.253/32;
}
destination-address {
115.47.0.254/32;
}
protocol tcp;
destination-port telnet;
}
then accept;
}
term 2 {
from {
destination-address {
115.47.0.254/32;
}
protocol tcp;
destination-port telnet;
}
then {
reject;
}
}
term 3 {
then accept;
}
}
}
这样是否可以
gzyhh010518 发表于 2016-10-17 15:00
您好 请问您不写目的地址的话 这个挂在哪里?能否像cisco一样 在line vty 直接挂in方向
不用写目的地址,你的管理地址在哪儿就挂在哪儿啊,比如你的目标地址是回环口,那么就是下面这样的
lo0 {
unit 0 {
family inet {
filter {
input mgmt-protect;
}
address 115.47.0.254/32 {
primary; motive6 发表于 2016-10-17 15:51
不用写目的地址,你的管理地址在哪儿就挂在哪儿啊,比如你的目标地址是回环口,那么就是下面这样的
lo ...
懂了 ,那是否需要最后加一条
term 3 {
then accept;
不加的话 会不会导致不通了 我还是想让他们ping之类的只是禁止telnet gzyhh010518 发表于 2016-10-17 16:59
懂了 ,那是否需要最后加一条
term 3 {
then accept;
我给你的就是现网运行的配置,只是把地址改成你需要的地址了 gzyhh010518 发表于 2016-10-17 16:59
懂了 ,那是否需要最后加一条
term 3 {
then accept;
我给你的就是现网运行的配置,只是把地址改成你需要的地址了 motive6 发表于 2016-10-18 10:46
我给你的就是现网运行的配置,只是把地址改成你需要的地址了
OK谢谢!!
页:
[1]