Quantcast
Viewing all articles
Browse latest Browse all 20028

Edgerouter IPSEC VPN two tunnels: to 2nd Edgerouter and to Juniper NS5GT - can't ping remote devices

Hi guys,

This is an interesting problem that is baffling me.

 

Setup:

Site A: Edgerouter 192.168.9.0/24 - Primary VPN

Site B: Edgerouter 192.168.2.0/24 - IPSEC VPN to Site A

Site C: Juniper NS5GT: 192.168.3.0/24 - IPSEC VPN to Site A

 

There is no problems with the A to C tunnel. It works as expected.

 

The problem is that from Site A, I can ONLY ping the router IP (.1) on Site B's network and not other devices. However from site B, I can ping everything on Site A. This does not make sense to me, I've studied the configs inside out. Please help!

 

I'm posting Configs to site A and site B. I've put as much as possible without revealing sensative information. I've had a few posts here with issues lately so I would really appreciate it if the experts could take a look and help me resolve some of this and figure out what's wrong. Feel free to rip this config apart Image may be NSFW.
Clik here to view.
Man Happy

 

Thanks!

 

SITE A:

firewall {
    all-ping enable
    broadcast-ping disable
    group {
        address-group TrustedSource {
            [***SOME IPS****]
            description "Trusted Source IPs"
        }
    }
    ipv6-receive-redirects disable
    ipv6-src-route disable
    ip-src-route disable
    log-martians enable
    name WAN_IN {
        default-action drop
        description "WAN to internal"
        rule 10 {
            action accept
            description "Admin Internal"
            log enable
            protocol all
            source {
                address 192.168.0.0/16
            }
        }
        rule 20 {
            action accept
            description "Trusted Source"
            log enable
            protocol tcp_udp
            source {
                group {
                    address-group TrustedSource
                }
            }
            state {
                established enable
                invalid enable
                new enable
                related enable
            }
        }
        rule 30 {
            action accept
            description "Allow established/related"
            state {
                established enable
                related enable
            }
        }
        rule 40 {
            action drop
            description "Drop invalid state"
            state {
                invalid enable
            }
        }
    }
    name WAN_LOCAL {
        default-action drop
        description "WAN to router"
        rule 10 {
            action accept
            description "Admin Internal"
            log enable
            protocol all
            source {
                address 192.168.0.0/16
            }
            state {
                established enable
                invalid disable
                new enable
                related enable
            }
        }
        rule 20 {
            action accept
            description "Admin External"
            destination {
                port 22,80,443
            }
            log enable
            protocol tcp
            source {
                group {
                    address-group TrustedSource
                }
            }
            state {
                established enable
                invalid disable
                new enable
                related enable
            }
        }
        rule 50 {
            action accept
            description "VPN UDP Ports"
            destination {
                port 500,1194,1701,4500
            }
            log enable
            protocol udp
        }
        rule 60 {
            action accept
            description "Allow established/related"
            state {
                established enable
                related enable
            }
        }
        rule 70 {
            action drop
            description "Drop invalid state"
            state {
                invalid enable
            }
        }
    }
    receive-redirects disable
    send-redirects enable
    source-validation disable
    syn-cookies enable
}
interfaces {
    ethernet eth0 {
        address 192.168.9.1/24
        description Local
        duplex auto
        speed auto
    }
    ethernet eth1 {
        address dhcp
        description Internet
        duplex auto
        firewall {
            in {
                name WAN_IN
            }
            local {
                name WAN_LOCAL
            }
        }
        speed auto
    }
    ethernet eth2 {
        address 192.168.50.1/24
        description "Local 2"
        disable
        duplex auto
        speed auto
    }
    loopback lo {
    }

}
port-forward {
    auto-firewall enable
    hairpin-nat disable
    lan-interface eth0
    wan-interface eth1
}
service {
    dhcp-server {
        disabled false
        hostfile-update disable
        shared-network-name LAN1 {
            authoritative disable
            subnet 192.168.9.0/24 {
                default-router 192.168.9.1
                dns-server 192.168.9.1
                lease 86400
                start 192.168.9.21 {
                    stop 192.168.9.240
                }
            }
        }
        shared-network-name LAN2 {
            authoritative disable
            subnet 192.168.50.0/24 {
                default-router 192.168.50.1
                dns-server 192.168.50.1
                lease 86400
                start 192.168.50.21 {
                    stop 192.168.50.240
                }
            }
        }
        use-dnsmasq disable
    }
    dns {
        dynamic {
            interface eth1 {
                service dyndns {
                    host-name siteA.dyndns.org
                    login username
                    password xxxxxxxx
                    server members.dyndns.org
                }
                web dyndns
            }
        }
        forwarding {
            cache-size 150
            listen-on eth0
            listen-on eth2
        }
    }
    gui {
        http-port 80
        https-port 443
        older-ciphers enable
    }
    nat {
        rule 5010 {
            description "masquerade for WAN"
            log disable
            outbound-interface eth1
            protocol all
            type masquerade
        }
    }
    ssh {
        port 22
        protocol-version v2
    }
    telnet {
        port 23
    }
}
system {
    domain-name MyRouter01
    host-name MyRouter01
    login {
        user User {
            authentication {
                encrypted-password xxxxx/
                plaintext-password ""
            }
            full-name "John Doe"
            level admin
        }
    }
    name-server 8.8.8.8
    ntp {
        server 0.ubnt.pool.ntp.org {
        }
        server 1.ubnt.pool.ntp.org {
        }
        server 2.ubnt.pool.ntp.org {
        }
        server 3.ubnt.pool.ntp.org {
        }
    }
    syslog {
        global {
            facility all {
                level notice
            }
            facility protocols {
                level debug
            }
        }
    }
    time-zone America/Chicago
}
vpn {
    ipsec {
        auto-firewall-nat-exclude enable
        esp-group FOO0 {
            compression disable
            lifetime 3600
            mode tunnel
            pfs enable
            proposal 1 {
                encryption aes128
                hash sha1
            }
        }
        esp-group FOO1 {
            compression disable
            lifetime 3600
            mode tunnel
            pfs enable
            proposal 1 {
                encryption aes128
                hash sha1
            }
        }
        ike-group FOO0 {
            ikev2-reauth no
            key-exchange ikev1
            lifetime 28800
            proposal 1 {
                dh-group 14
                encryption aes128
                hash sha1
            }
        }
        ike-group FOO1 {
            ikev2-reauth no
            key-exchange ikev1
            lifetime 28800
            proposal 1 {
                dh-group 14
                encryption aes128
                hash sha1
            }
        }
        site-to-site {
            peer siteB.dyndns.org {
                authentication {
                    mode pre-shared-secret
                    pre-shared-secret secretkey
                }
                connection-type initiate
                description ""
                ike-group FOO1
                ikev2-reauth inherit
                local-address any
                tunnel 1 {
                    allow-nat-networks disable
                    allow-public-networks disable
                    esp-group FOO1
                    local {
                        prefix 192.168.0.0/16
                    }
                    remote {
                        prefix 192.168.2.0/24
                    }
                }
            }
        }
    }
    l2tp {
        remote-access {
            authentication {
                local-users {
                    username User {
                        password secretkey
                    }
                }
                mode local
            }
            client-ip-pool {
                start 192.168.9.240
                stop 192.168.9.242
            }
            dhcp-interface eth1
            dns-servers {
                server-1 8.8.8.8
                server-2 8.8.4.4
            }
            ipsec-settings {
                authentication {
                    mode pre-shared-secret
                    pre-shared-secret secretkey
                }
                ike-lifetime 3600
            }
            mtu 1492
        }
    }
}

SITE B

    all-ping enable
    broadcast-ping disable
    group {
        address-group TrustedSource {
            [***SOME IPS****]
            description "Trusted Source IPs"
        }
    }
    ipv6-receive-redirects disable
    ipv6-src-route disable
    ip-src-route disable
    log-martians enable
    name WAN_IN {
        default-action drop
        description "WAN to internal"
        rule 10 {
            action accept
            description "Admin Internal"
            log enable
            protocol all
            source {
                address 192.168.0.0/16
            }
        }
        rule 20 {
            action accept
            description "Trusted Source IPs"
            log disable
            protocol tcp_udp
            source {
                group {
                    address-group TrustedSource
                }
            }
            state {
                established enable
                invalid enable
                new enable
                related enable
            }
        }
        rule 30 {
            action accept
            description "Allow established/related"
            state {
                established enable
                related enable
            }
        }
        rule 40 {
            action drop
            description "Drop invalid state"
            state {
                invalid enable
            }
        }
    }
    name WAN_LOCAL {
        default-action drop
        description "WAN to router"
        rule 10 {
            action accept
            description "Admin Internal"
            destination {
            }
            log enable
            protocol all
            source {
                address 192.168.0.0/16
            }
            state {
                established enable
                invalid disable
                new enable
                related enable
            }
        }
        rule 20 {
            action accept
            description "Admin External"
            destination {
                port 22,80,443
            }
            log enable
            protocol tcp
            source {
                group {
                    address-group TrustedSource
                }
            }
            state {
                established enable
                invalid disable
                new enable
                related enable
            }
        }
        rule 40 {
            action accept
            description "VPN UDP Ports"
            destination {
                port 500,1194
            }
            log enable
            protocol udp
        }
        rule 50 {
            action accept
            description "Allow established/related"
            state {
                established enable
                related enable
            }
        }
        rule 60 {
            action drop
            description "Drop invalid state"
            state {
                invalid enable
            }
        }
    }
    receive-redirects disable
    send-redirects enable
    source-validation disable
    syn-cookies enable
}
interfaces {
    ethernet eth0 {
        address 192.168.2.1/24
        description Local
        duplex auto
        speed auto
    }
    ethernet eth1 {
        address dhcp
        description Internet
        duplex auto
        firewall {
            in {
                name WAN_IN
            }
            local {
                name WAN_LOCAL
            }
        }
        speed auto
    }
    ethernet eth2 {
        address 192.168.56.1/24
        description "Local 2"
        disable
        duplex auto
        speed auto
    }
    loopback lo {
    }
}
port-forward {
    auto-firewall enable
    hairpin-nat disable
    lan-interface eth0
    wan-interface eth1
}
service {
    dhcp-server {
        disabled false
        hostfile-update disable
        shared-network-name LAN1 {
            authoritative enable
            subnet 192.168.2.0/24 {
                default-router 192.168.2.1
                dns-server 192.168.2.1
                dns-server 8.8.8.8
                lease 86400
                start 192.168.2.20 {
                    stop 192.168.2.40
                }
        }
        shared-network-name LAN2 {
            authoritative enable
            subnet 192.168.56.0/24 {
                default-router 192.168.56.1
                dns-server 192.168.56.1
                lease 86400
                start 192.168.56.38 {
                    stop 192.168.56.243
                }
            }
        }
        use-dnsmasq disable
    }
    dns {
        dynamic {
            interface eth1 {
                service dyndns {
                    host-name siteB.dyndns.org
                    login user
                    password mypass
                    server members.dyndns.org
                }
                web dyndns
            }
        }
        forwarding {
            cache-size 150
            listen-on eth0
            listen-on eth2
            listen-on vtun0
        }
    }
    gui {
        http-port 80
        https-port 443
        older-ciphers enable
    }
    nat {
        rule 5010 {
            description "masquerade for WAN"
            outbound-interface eth1
            type masquerade
        }
    }
    ssh {
        port 22
        protocol-version v2
    }
    telnet {
        port 23
    }
}
system {
    domain-name MyRouter02
    host-name MyRouter02
    login {
        user User {
            authentication {
                encrypted-password xxxxxxxxxxxxxxxxxxx/
                plaintext-password ""
            }
            full-name "John Doe"
            level admin
        }
    }
    ntp {
        server 0.ubnt.pool.ntp.org {
        }
        server 1.ubnt.pool.ntp.org {
        }
        server 2.ubnt.pool.ntp.org {
        }
        server 3.ubnt.pool.ntp.org {
        }
    }
    syslog {
        global {
            facility all {
                level notice
            }
            facility protocols {
                level debug
            }
        }
    }
    time-zone America/Chicago
}
vpn {
    ipsec {
        auto-firewall-nat-exclude enable
        esp-group FOO0 {
            compression disable
            lifetime 3600
            mode tunnel
            pfs enable
            proposal 1 {
                encryption aes128
                hash sha1
            }
        }
        ike-group FOO0 {
            ikev2-reauth no
            key-exchange ikev1
            lifetime 28800
            proposal 1 {
                dh-group 14
                encryption aes128
                hash sha1
            }
        }
        site-to-site {
            peer siteA.dyndns.org {
                authentication {
                    mode pre-shared-secret
                    pre-shared-secret secretkey
                }
                connection-type initiate
                description ""
                ike-group FOO0
                ikev2-reauth inherit
                local-address siteB.dyndns.org
                tunnel 1 {
                    allow-nat-networks disable
                    allow-public-networks disable
                    esp-group FOO0
                    local {
                        prefix 192.168.2.0/24
                    }
                    remote {
                        prefix 192.168.0.0/16
                    }
                }
            }
        }
    }
}

 

 


Viewing all articles
Browse latest Browse all 20028

Trending Articles