Quantcast
Channel: EdgeRouter topics
Viewing all articles
Browse latest Browse all 20028

NAT with Fail over connection

$
0
0

I am trying to setup a 1:1 nat with a router that is behind an Edge Router

 

A->B 

 

It works fine but as soon as I do the load balance wizard to setup a failover connection, then setup the nat, it will not actually NAT any traffic.  

 

Take a look at my config below. 

 

firewall {
    all-ping enable
    broadcast-ping disable
    ipv6-receive-redirects disable
    ipv6-src-route disable
    ip-src-route disable
    log-martians enable
    modify MDF {
        rule 10 {
            action modify
            modify {
                lb-group LB
            }
        }
    }
    receive-redirects disable
    send-redirects enable
    source-validation disable
    syn-cookies enable
}
interfaces {
    ethernet eth0 {
        address 192.168.50.1/24
        duplex auto
        firewall {
            in {
                modify MDF
            }
        }
        speed auto
    }
    ethernet eth1 {
        address 192.168.1.100/24
        duplex auto
        speed auto
    }
    ethernet eth2 {
        address 10.1.50.100/24
        duplex auto
        speed auto
    }
    loopback lo {
    }
}
load-balance {
    group LB {
        interface eth1 {
            route {
                table 1
            }
            route-test {
                initial-delay 60
                interval 10
                type {
                    ping {
                        target 192.168.1.1
                    }
                }
            }
        }
        interface eth2 {
            failover-only
            route {
                table 2
            }
            route-test {
                initial-delay 60
                interval 10
                type {
                    ping {
                        target 10.1.50.1
                    }
                }
            }
        }
    }
}
protocols {
    static {
        table 1 {
            route 0.0.0.0/0 {
                next-hop 192.168.1.1 {
                }
            }
        }
        table 2 {
            route 0.0.0.0/0 {
                next-hop 10.1.50.1 {
                }
            }
        }
    }
}
service {
    gui {
        http-port 80
        https-port 443
        older-ciphers enable
    }
    nat {
        rule 1 {
            inbound-interface eth1
            inside-address {
                address 192.168.50.2
            }
            log disable
            protocol all
            source {
                address 192.168.1.100
                group {
                }
            }
            type destination
        }
        rule 5000 {
            log disable
            outbound-interface eth1
            type masquerade
        }
        rule 5001 {
            log disable
            outbound-interface eth2
            type masquerade
        }
    }
    ssh {
        port 22
        protocol-version v2
    }
}
system {
    gateway-address 192.168.1.1
    host-name ubnt
    login {
        user ubnt {
            authentication {
                encrypted-password $1$zKNoUbAo$gomzUbYvgyUMcD436Wo66.
            }
            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 {
        }
    }
    offload {
        hwnat disable
        ipsec enable
        ipv4 {
            forwarding enable
        }
        ipv6 {
            forwarding disable
        }
    }
    syslog {
        global {
            facility all {
                level notice
            }
            facility protocols {
                level debug
            }
        }
    }
    time-zone UTC
}

Viewing all articles
Browse latest Browse all 20028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>