本站已运行

攻城狮论坛

作者: httpurl
查看: 614|回复: 9

主题标签Tag

more +今日重磅推荐Recommend No.1

所有IT类厂商认证考试题库下载所有IT类厂商认证考试题库下载

more +随机图赏Gallery

【新盟教育】2023最新华为HCIA全套视频合集【网工基础全覆盖】---国sir公开课合集【新盟教育】2023最新华为HCIA全套视频合集【网工基础全覆盖】---国sir公开课合集
【新盟教育】网工小白必看的!2023最新版华为认证HCIA Datacom零基础全套实战课【新盟教育】网工小白必看的!2023最新版华为认证HCIA Datacom零基础全套实战课
原创_超融合自动化运维工具cvTools原创_超融合自动化运维工具cvTools
重量级~~30多套JAVA就业班全套 视频教程(请尽快下载,链接失效后不补)重量级~~30多套JAVA就业班全套 视频教程(请尽快下载,链接失效后不补)
链接已失效【超过几百G】EVE 国内和国外镜像 全有了 百度群分享链接已失效【超过几百G】EVE 国内和国外镜像 全有了 百度群分享
某linux大佬,积累多年的电子书(约300本)某linux大佬,积累多年的电子书(约300本)
乾颐堂现任明教教主Python完整版乾颐堂现任明教教主Python完整版
乾颐堂 教主技术进化论 2018-2019年 最新31-50期合集视频(各种最新技术杂谈视频)乾颐堂 教主技术进化论 2018-2019年 最新31-50期合集视频(各种最新技术杂谈视频)
Python学习视频 0起点视频 入门到项目实战篇 Python3.5.2视频教程 共847集 能学102天Python学习视频 0起点视频 入门到项目实战篇 Python3.5.2视频教程 共847集 能学102天
约21套Python视频合集 核心基础视频教程(共310G,已压缩)约21套Python视频合集 核心基础视频教程(共310G,已压缩)
最新20180811录制 IT爱好者-清风羽毛 - 网络安全IPSec VPN实验指南视频教程最新20180811录制 IT爱好者-清风羽毛 - 网络安全IPSec VPN实验指南视频教程
最新20180807录制EVE开机自启动虚拟路由器并桥接物理网卡充当思科路由器最新20180807录制EVE开机自启动虚拟路由器并桥接物理网卡充当思科路由器

[其他] 求助juniper srx 策略模式ip sec v p n问题

[复制链接]
httpurl [VIP@钻石] 发表于 2019-3-14 16:31:06 | 显示全部楼层 |阅读模式
查看: 614|回复: 9
开通VIP 免金币+免回帖+批量下载+无广告
现在采用juniper srx 210  2台做ipsec v p n   采用基于策略  野蛮模式

在测试时 参考文档  然后发现问题  两边内网无法互相ping通  

查看发现隧道建立  并且显示有数据   想问下是不是还需要做什么放行条件???
配置见下面楼层:        

CCNA考试 官方正规报名 仅需1500元
回复 论坛版权

使用道具 举报

httpurl [VIP@钻石] 发表于 2019-3-14 16:31:45 | 显示全部楼层
设备A

## Last changed: 2019-03-14 15:09:23 GMT
version 12.1X44-D40.2;
system {
    host-name zenni;
    time-zone GMT;
    root-authentication {
        encrypted-password "$1$twUJGRID$Fz0N1F24APP0e1FZuoLXq/";

    services {
        ssh;
        telnet;
        web-management {
            http {
                interface [ vlan.1 ge-0/0/0.0 ];
            }
            https {
                system-generated-certificate;
                interface [ vlan.1 ge-0/0/0.0 ];
            }
            session {
                idle-timeout 60;
            }
  
    syslog {
        archive size 100k files 3;
        user * {
            any emergency;
        }
        file messages {
            any critical;
            authorization info;
        }
        file interactive-commands {
            interactive-commands error;
        }
    }
    max-configurations-on-flash 5;
    max-configuration-rollbacks 5;
    license {
        autoupdate {
            url https://ae1.juniper.net/junos/key_retrieval;
        }

interfaces {
    ge-0/0/0 {
        unit 0 {
            family inet {
                address 218.2.2.2/24;
            }
        }
    }
    fe-0/0/2 {
        unit 0 {
            family ethernet-switching {
                vlan {
                    members vlan1;

    }
    vlan {
        unit 1 {
            family inet {
                address 192.168.2.1/24;
            }
        }
    }
}
routing-options {
    static {
        route 0.0.0.0/0 next-hop [ 218.2.2.3 ];
    }
}
protocols {
    stp;
}
security {
    ike {
        proposal ike-pro {
            authentication-method pre-shared-keys;
            dh-group group2;
            authentication-algorithm md5;
            encryption-algorithm aes-256-cbc;
        }
        policy ike-pol {
            mode aggressive;
            proposals ike-pro;
            pre-shared-key ascii-text "$9$N0dYgaZUH.PJZ9AuORE";
        }
        gateway ike-ga {
            ike-policy ike-pol;
            address 218.2.2.3;
            external-interface ge-0/0/0.0;
        }
    }
    ipsec {
        proposal ipsec-pro {
            protocol esp;
            authentication-algorithm hmac-md5-96;
            encryption-algorithm aes-256-cbc;
            lifetime-seconds 3600;
        }
        policy ipsec-pol {
            proposals ipsec-pro;
        }
        *** ipsec*** {
            ike {
                gateway ike-ga;
                ipsec-policy ipsec-pol;
            }
            establish-tunnels immediately;
        }
    }
    screen {
        ids-option untrust-screen {
            icmp {
                ping-death;
            }
            ip {
                source-route-option;
                tear-drop;
            }
            tcp {
                syn-flood {
                    alarm-threshold 1024;
                    attack-threshold 200;
                    source-threshold 1024;
                    destination-threshold 2048;
                    timeout 20;
                }
                land;
            }
        }
    }
    nat {
        source {
            rule-set nsw_srcnat {
                from zone Internal;
                to zone Internet;
                rule nsw-src-interface {
                    match {
                        source-address 0.0.0.0/0;
                        destination-address 0.0.0.0/0;
                    }
                    then {
                        source-nat {
                            interface;
                        }
                    }
                }
            }
        }
    }
    policies {
        from-zone Internal to-zone Internet {
            policy ***_out {
                match {
                    source-address net;
                    destination-address remote;
                    application any;
                }
                then {
                    permit {
                        tunnel {
                            ipsec-*** ipsec***;
                        }
                    }
                }
            }
            policy All_Internal_Internet {
                match {
                    source-address any;
                    destination-address any;
                    application any;
                }
                then {
                    permit;
                }
            }
        }
        from-zone Internet to-zone Internal {
            policy ***_in {
                match {
                    source-address remote;
                    destination-address net;
                    application any;
                }
                then {
                    permit {
                        tunnel {
                            ipsec-*** ipsec***;
                        }
                    }
                }
            }
        }
    }
    zones {
        security-zone Internal {
            address-book {
                address net 192.168.2.0/24;
            }
            host-inbound-traffic {
                system-services {
                    all;
                }
                protocols {
                    all;
                }
            }
            interfaces {
                vlan.1 {
                    host-inbound-traffic {
                        system-services {
                            all;
                        }
                        protocols {
                            all;
                        }
                    }
                }
            }
        }
        security-zone Internet {
            address-book {
                address remote 192.168.1.0/24;
            }
            host-inbound-traffic {
                system-services {
                    all;
                }
                protocols {
                    all;
                }
            }
            interfaces {
                ge-0/0/0.0 {
                    host-inbound-traffic {
                        system-services {
                            all;
                        }
                        protocols {
                            all;
                        }
                    }
                }
            }
        }
    }
}
vlans {
    vlan1 {
        vlan-id 3;
        l3-interface vlan.1;
    }
}        
回复 支持 反对

使用道具 举报

httpurl [VIP@钻石] 发表于 2019-3-14 16:32:25 | 显示全部楼层
设备B

## Last changed: 2019-03-14 06:31:52 GMT
version 11.4R10.3;
system {
    host-name juniper;
    time-zone GMT;
    root-authentication {
        encrypted-password "$1$twUJGRID$Fz0N1F24APP0e1FZuoLXq/";

    services {
        ssh;
        telnet;
        web-management {
            http {
                interface [ vlan.1 ge-0/0/0.0 ];
            }
            https {
                system-generated-certificate;
                interface [ vlan.1 ge-0/0/0.0 ];
            }
            session {
                idle-timeout 60;
            }
        }
    }
    syslog {
        archive size 100k files 3;
        user * {
            any emergency;
        }
        file messages {
            any critical;
            authorization info;
        }
        file interactive-commands {
            interactive-commands error;
        }
    }
    max-configurations-on-flash 5;
    max-configuration-rollbacks 5;
    license {
        autoupdate {
            url https://ae1.juniper.net/junos/key_retrieval;
        }
    }
}
interfaces {
    ge-0/0/0 {
        unit 0 {
            family inet {
                address 218.2.2.3/24;
            }
        }
    }
    fe-0/0/2 {
        unit 0 {
            family ethernet-switching {
                vlan {
                    members vlan1;

    vlan {
        unit 1 {
            family inet {
                address 192.168.1.1/24;
            }
        }
    }
}
routing-options {
    static {
        route 0.0.0.0/0 next-hop 218.2.2.2;
    }
}
protocols {
    stp;
}
security {
    ike {
        proposal ike-pro {
            authentication-method pre-shared-keys;
            dh-group group2;
            authentication-algorithm md5;
            encryption-algorithm aes-256-cbc;
        }
        policy ike-pol {
            mode aggressive;
            proposals ike-pro;
            pre-shared-key ascii-text "$9$N0dYgaZUH.PJZ9AuORE";
        }
        gateway ike-ga {
            ike-policy ike-pol;
            address 218.2.2.2;
            external-interface ge-0/0/0;
        }
    }
    ipsec {
        proposal ipsec-pro {
            protocol esp;
            authentication-algorithm hmac-md5-96;
            encryption-algorithm aes-256-cbc;
            lifetime-seconds 3600;
        }
        policy ipsec-pol {
            proposals ipsec-pro;
        }
        *** ipsec*** {
            ike {
                gateway ike-ga;
                ipsec-policy ipsec-pol;
            }
            establish-tunnels immediately;
        }
    }
    screen {
        ids-option untrust-screen {
            icmp {
                ping-death;
            }
            ip {
                source-route-option;
                tear-drop;
            }
            tcp {
                syn-flood {
                    alarm-threshold 1024;
                    attack-threshold 200;
                    source-threshold 1024;
                    destination-threshold 2048;
                    timeout 20;
                }
                land;
            }
        }
    }
    nat {
        source {
            rule-set nsw_srcnat {
                from zone Internal;
                to zone Internet;
                rule nsw-src-interface {
                    match {
                        source-address 0.0.0.0/0;
                        destination-address 0.0.0.0/0;
                    }
                    then {
                        source-nat {
                            interface;
                        }
                    }
                }
            }
        }
    }
    policies {
        from-zone Internal to-zone Internet {
            policy ***_out {
                match {
                    source-address net;
                    destination-address remote;
                    application any;
                }
                then {
                    permit {
                        tunnel {
                            ipsec-*** ipsec***;
                        }
                    }
                }
            }
            policy All_Internal_Internet {
                match {
                    source-address any;
                    destination-address any;
                    application any;
                }
                then {
                    permit;
                }
            }
        }
        from-zone Internet to-zone Internal {
            policy ***_in {
                match {
                    source-address remote;
                    destination-address net;
                    application any;
                }
                then {
                    permit {
                        tunnel {
                            ipsec-*** ipsec***;
                        }
                    }
                }
            }
        }
    }
    zones {
        security-zone Internal {
            address-book {
                address net 192.168.1.0/24;
            }
            host-inbound-traffic {
                system-services {
                    all;
                }
                protocols {
                    all;
                }
            }
            interfaces {
                vlan.1 {
                    host-inbound-traffic {
                        system-services {
                            all;
                        }
                        protocols {
                            all;
                        }
                    }
                }
            }
        }
        security-zone Internet {
            address-book {
                address remote 192.168.2.0/24;
            }
            host-inbound-traffic {
                system-services {
                    all;
                }
                protocols {
                    all;
                }
            }
            interfaces {
                ge-0/0/0.0 {
                    host-inbound-traffic {
                        system-services {
                            all;
                        }
                        protocols {
                            all;
                        }
                    }
                }
            }
        }
    }
}
vlans {
    vlan1 {
        vlan-id 3;
        l3-interface vlan.1;
    }        
回复 支持 反对

使用道具 举报

httpurl [VIP@钻石] 发表于 2019-3-14 16:32:56 | 显示全部楼层
备查看隧道信息:

root@zenni> show security ike security-associations
Index   State  Initiator cookie  Responder cookie  Mode           Remote Address

584897  UP     4062d1de85d99220  5ea161560201b6ee  Aggressive     218.2.2.3

root@zenni> show security ipsec statistics
ESP Statistics:
  Encrypted bytes:            37560
  Decrypted bytes:            16920
  Encrypted packets:            313
  Decrypted packets:            282
AH Statistics:
  Input bytes:                    0
  Output bytes:                   0
  Input packets:                  0
  Output packets:                 0
Errors:
  AH authentication failures: 0, Replay errors: 0
  ESP authentication failures: 0, ESP decryption failures: 0
  Bad headers: 0, Bad trailers: 0

root@zenni> show security flow session
Session ID: 32855, Policy name: self-traffic-policy/1, Timeout: 4, Valid
  In: 218.2.2.2/21602 --> 218.2.2.3/5;icmp, If: ge-0/0/0.0, Pkts: 1, Bytes:
60
  Out: 218.2.2.3/5 --> 218.2.2.2/21602;icmp, If: .local..0, Pkts: 1, Bytes:
60

Session ID: 32856, Policy name: All_Internal_Internet/4, Timeout: 4, Valid
  In: 192.168.2.2/20707 --> 218.2.2.2/1;icmp, If: vlan.1, Pkts: 1, Bytes: 60
  Out: 218.2.2.3/1 --> 218.2.2.2/6998;icmp, If: ge-0/0/0.0, Pkts: 1, Bytes:
60
回复 支持 反对

使用道具 举报

httpurl [VIP@钻石] 发表于 2019-3-14 16:33:28 | 显示全部楼层
求大佬指导下
回复 支持 反对

使用道具 举报

cnwzm [Lv8 技术精悍] 发表于 2019-3-18 22:49:55 | 显示全部楼层
求金币,求金币。
回复 支持 反对

使用道具 举报

hugo_26 [Lv10 举世无双] 发表于 2020-12-18 00:31:04 | 显示全部楼层
dddddddddddddddd
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|无图浏览|手机版|网站地图|攻城狮论坛

GMT+8, 2025-5-22 18:05 , Processed in 0.108151 second(s), 15 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4 © 2001-2013 Comsenz Inc.

Designed by ARTERY.cn