具有动态 pppoe 的 Juniper 端口转发范围的端口

网络工程 纳特 网络 杜松 杜松-srx 脱氧核糖核酸
2022-02-07 18:45:43

我有瞻博网络 SRX300。由于一些限制,我不能使用静态 WAN IP 地址。我需要转发一系列端口,它只能使用这样的nat 静态部分:

username# show security nat static rule-set FORWARD
from zone untrust;
rule RANGE1 {
    match {
        destination-address 1.2.3.4/32;
        destination-port 20001 to 21000;
    }
    then {
        static-nat {
            prefix {
                10.1.2.3/32;
                mapped-port 20001 to 21000;
            }
        }
    }
}

但是有时由于电源故障,与我的提供商的 pppoe 连接会重新启动,并且每次我获得新的 WAN IP 地址时,我都需要手动配置

set security nat static rule-set FORWARD rule RANGE1 match destination-address 1.2.3.4/32

我也尝试指定

set security nat static rule-set FORWARD rule RANGE1 match destination-address 0.0.0.0/32;

但这也不起作用。

使用nat 目标的端口范围内的端口转发不起作用。

我试过的nat 目的地的配置:

username# show security nat destination
pool LOCALSERVER {
    address 10.1.2.3/32;
}
rule-set DNAT-FORWARD {
    from zone untrust;
    rule RANGE {
        match {
            destination-address 0.0.0.0/0;
            destination-port {
                20001 to 21000;
            }
        }
        then {
            destination-nat {
                pool {
                    LOCALSERVER ;
                }
            }
        }
    }

而且我无法为安全 nat 目标池指定端口范围,因此此配置不起作用。

我可以使用什么配置,这样它就可以在不需要我指定任何东西的情况下工作?

1个回答

你非常接近......你应该使用 0.0.0.0/0 而不是 0.0.0.0/32。