ITPub博客

首页 > 应用开发 > IT综合 > juniper SRX 地址端口映射设置

juniper SRX 地址端口映射设置

原创 IT综合 作者:Caomeinico 时间:2021-10-26 13:24:45 0 删除 编辑

需求说明:外网IP:123.123.123.123:22222 映射 内网 10.100.200.22:22



定义内网地址池(ssh-22)和端口号

set security nat destination pool ssh-22 address 10.100.200.22/32

set security nat destination pool ssh-22 address port 22


定义外网地址端口


edit security nat destination #进入nat destination 编辑界面

set rule-set u-t0-t from zone untrust #设置 u-to-t 流量从那个区域进入

set rule-set u-t0-t rule ssh22 match source-address 0.0.0.0/0 #原地址

set rule-set u-to-t rule ssh22 match destination-address 123.123.123.123/32 #目标地址

set rule-set u-to-t rule ssh22 match destination-port 22222 #对外开放端口

set rule-set u-to-t rule ssh22 match protocol tcp #使用协义

set rule-set u-to-t rule ssh22 then destination-nat pool ssh-22 #转换到那个地址池

exit(退出 nat destination 编辑界面)


定义内网协议端口


set applications application tcp-22 protocol tcp

set applications application tcp-22 destination-port 22


定义内网地址


set security zones security-zone trust address-book address ssh22 10.100.200.22


定义策略


edit security policies from-zone untrust to-zone trust

set policy linux-ssh22 match source-address any

set policy linux-ssh22 match destination-address ssh22 #address-book 地址

set policy linux-ssh22 match application tcp-22 #设置为内网真实端口

set policy linux-ssh22 match application junios-ssh

set policy linux-ssh22 then permit



更多建站及源码交易信息请见 GoodMai



来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/70008684/viewspace-2839308/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2021-10-20

  • 博文量
    14
  • 访问量
    5254