Quantcast
Viewing all articles
Browse latest Browse all 60861

Re: Fail-over config - dropping connection

AS requested: 

 

firewall {
    all-ping enable
    broadcast-ping disable
    group {
        network-group PRIVATE_NETS {
            network 192.168.0.0/16
            network 172.16.0.0/12
            network 10.0.0.0/8
        }
    }
    ipv6-receive-redirects disable
    ipv6-src-route disable
    ip-src-route disable
    log-martians disable
    modify balance {
        rule 10 {
            action modify
            description "do NOT load balance lan to lan"
            destination {
                group {
                    network-group PRIVATE_NETS
                }
            }
            modify {
                table main
            }
        }
        rule 20 {
            action modify
            description "do NOT load balance destination public address"
            destination {
                group {
                    address-group ADDRv4_eth0
                }
            }
            modify {
                table main
            }
        }
        rule 30 {
            action modify
            description "do NOT load balance destination public address"
            destination {
                group {
                    address-group ADDRv4_eth1
                }
            }
            modify {
                table main
            }
        }
        rule 40 {
            action modify
            description RDP
            destination {
                address 85.17.XX.XX/28
            }
            modify {
                lb-group RDP
            }
            protocol all
        }
        rule 41 {
            action modify
            description Voys
            destination {
                address 195.35.114.0/24
            }
            log disable
            modify {
                lb-group RDP
            }
            protocol all
        }
        rule 42 {
            action modify
            description Voys2
            destination {
                address 195.35.115.0/24
            }
            log disable
            modify {
                lb-group RDP
            }
            protocol all
        }
        rule 100 {
            action modify
            modify {
                lb-group G
            }
        }
    }
    name WAN1_IN {
        default-action drop
        description "WAN1 to internal"
        rule 10 {
            action accept
            description "Allow established/related"
            state {
                established enable
                related enable
            }
        }            
        rule 20 {
            action drop
            description "Drop invalid state"
            state {
                invalid enable
            }
        }
    }
    name WAN_IN {
        default-action drop
        description "WAN to internal"
        rule 10 {
            action accept
            description "Allow established/related"
            state {
                established enable
                related enable
            }
        }
        rule 20 {
            action drop
            description "Drop invalid state"
            state {
                invalid enable
            }
        }
    }
    name WAN_LOCAL {
        default-action drop
        description "WAN to router"
        rule 10 {
            action accept
            description "Allow established/related"
            state {
                established enable
                related enable
            }
        }
        rule 20 {
            action accept
            description "Allow ext Ping"
            log enable
            protocol icmp
            source {
                address 85.17.XX.XX/28
            }
        }
        rule 30 {
            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 84.53.XX.XX/30
        description "WAN 1"
        duplex auto
        firewall {
            in {
                name WAN1_IN
            }
            local {
                name WAN_LOCAL
            }
        }
        speed auto
    }
    ethernet eth1 {
        address 92.111.XX.XX/30
        description "WAN 2"
        duplex auto
        firewall {
            in {
                name WAN_IN
            }
            local {
                name WAN_LOCAL
            }
        }
        speed auto
    }
    ethernet eth2 {
        address 192.168.1.1/24
        description DGW
        duplex auto
        firewall {
            in {
                modify balance
            }
        }
        speed auto
    }
    ethernet eth3 {
        address dhcp
        duplex auto
        speed auto
    }
    ethernet eth4 {
        duplex auto
        speed auto
    }
    ethernet eth5 {
        duplex auto
        speed auto
    }
    ethernet eth6 {
        duplex auto
        speed auto
    }
    ethernet eth7 {
        duplex auto
        speed auto
    }
    loopback lo {
    }
}
load-balance {
    group G {
        interface eth0 {
            route-test {
                initial-delay 60
                interval 10
                type {
                    ping {
                        target 84.53.XX.XX
                    }
                }
            }
        }
        interface eth1 {
            route-test {
                count {
                    failure 15
                    success 2
                }
                initial-delay 60
                interval 10
                type {
                    ping {
                        target 92.111.XX.XX
                    }
                }
            }
        }
        lb-local disable
        sticky {
            dest-addr enable
        }
    }
    group RDP {
        interface eth0 {
            route-test {
                count {
                    failure 2
                    success 5
                }
                initial-delay 60
                interval 10
                type {
                    ping {
                        target 85.17.XX.XX
                    }
                }
            }
        }
        interface eth1 {
            failover-only
            route-test {
                count {
                    failure 25
                    success 5
                }
                initial-delay 60
                interval 10
                type {
                    ping {
                        target 85.17.XX.XX
                    }
                }
            }
        }
        lb-local disable
    }
}
port-forward {
    auto-firewall disable
    hairpin-nat disable
    lan-interface eth2    
    wan-interface eth0
}
protocols {
    static {
        route 0.0.0.0/0 {
            next-hop 84.53.XX.XX {
            }
            next-hop 92.111.XX.XX {
            }
        }
    }
}
service {
    dns {
        forwarding {
            cache-size 150
            listen-on eth2
            listen-on br0
        }
    }
    gui {
        http-port 80
        https-port 443
        older-ciphers enable
    }
    nat {
        rule 5000 {
            description "masquerade for WAN"
            outbound-interface eth0
            type masquerade
        }
        rule 5002 {
            description "masquerade for WAN 2"
            outbound-interface eth1
            type masquerade
        }
    }
    ssh {
        port 22
        protocol-version v2
    }
    ubnt-discover {
        disable
    }
}
system {
    config-management {
        commit-revisions 150
    }
    conntrack {
        expect-table-size 4096
        hash-size 4096
        modules {
            h323 {
                disable
            }
            sip {
                disable
            }
        }
        table-size 32768
        tcp {
            half-open-connections 512
            loose enable
            max-retrans 3
        }
        timeout {
            icmp 30
            other 600
            udp {
                other 360
                stream 360
            }
        }
    }
    domain-name XX.XX
    host-name XXX
    login {
        user admin {
            authentication {
                encrypted-password ****************
            }
            level admin
        }
    }
    name-server 8.8.4.4
    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 {
        }
    }
    offload {
        hwnat disable
        ipv4 {
        }
    }
    syslog {
        global {
            facility all {
                level notice
            }
            facility protocols {
                level debug
            }
        }
    }
    time-zone Europe/Amsterdam
    traffic-analysis {
        dpi enable
        export enable
    }
}

2 notes:

  • I changed the Voys destination (should be /24 instead of /23) but that is imho not a problem
  • I set the failure count ont eth1 in the load-balance to a higher value to stop the problem i had for the moment. 

 


Viewing all articles
Browse latest Browse all 60861

Trending Articles