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

Config Optimization

$
0
0

So I've just purchased and installed an ERLite3 at our office and I've managed to get the internet connection up and running. I would like to share my configuration file for you guys to review and recommend any poential changes. First, a little background:

The office has a BellAliant FTTH connection with an Alcatel ONT. The ERlite3 is connected directly to the ONT. A 48 port gigabit unmanaged switch (TPLink). There are two servers, a NAS box, two ASUS routers used as APs, a surveillance system, with about 30-40clients typically.

I have no formal training in network admin, and limited experience but I manage to get things working well most of the time using previous experience in computer repair and google.

Any way, here is my config:

firewall {
    all-ping enable
    broadcast-ping disable
    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 "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 drop
            description "Drop invalid state"
            state {
                invalid enable
            }
        }
    }
    receive-redirects disable
    send-redirects enable
    source-validation disable
    syn-cookies enable
}
interfaces {
    ethernet eth0 {
        duplex auto
        speed auto
        vif 35 {
            address dhcp
            description Internet
            firewall {
                in {
                    name WAN_IN
                }
                local {
                    name WAN_LOCAL
                }
            }
            mtu 1492
        }
    }
    ethernet eth1 {
        address 192.168.2.1/24
        description Local
        duplex auto
        speed auto
    }
    ethernet eth2 {
        address 192.168.3.1/24
        description "Local 2"
        duplex auto
        speed auto
    }
    loopback lo {
    }
}
port-forward {
    auto-firewall enable
    hairpin-nat enable
    lan-interface eth1
    rule 1 {
        description Camera0
        forward-to {
            address 0.0.0.0
            port 0
        }
        original-port 0
        protocol tcp_udp
    }
    rule 2 {
        description Camera0
        forward-to {
            address 0.0.0.0
            port 0
        }
        original-port 0
        protocol tcp_udp
    }
    rule 3 {
        description Camera0
        forward-to {
            address 0.0.0.0
            port 0
        }
        original-port 8554
        protocol tcp_udp
    }
    rule 4 {
        description JonasRemote
        forward-to {
            address 0.0.0.0
            port 8351
        }
        original-port 0
        protocol tcp_udp
    }
    rule 5 {
        description ServerRDP
        forward-to {
            address 0.0.0.0
            port 0
        }
        original-port 0
        protocol tcp_udp
    }
    rule 6 {
        description JonasRDP
        forward-to {
            address 0.0.0.0
            port 0
        }
        original-port 0
        protocol tcp_udp
    }
    wan-interface eth0.35
}
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
                lease 86400
                start 192.168.2.38 {
                    stop 192.168.2.243
                }
                static-mapping BrotherHL-2360D {
                    ip-address 192.168.2.132
                    mac-address 00:00:00:00:00:00
                }
                static-mapping BrotherHL-2360DW {
                    ip-address 192.168.2.26
                    mac-address 00:00:00:00:00:00
                }
                static-mapping CameraServer {
                    ip-address 192.168.2.254
                    mac-address 00:00:00:00:00:00
                }
                static-mapping CanonIPF605 {
                    ip-address 192.168.2.60
                    mac-address 00:00:00:00:00:00
                }
                static-mapping KC-BACKUP {
                    ip-address 192.168.2.150
                    mac-address 00:00:00:00:00:00
                }
                static-mapping KC-JONAS {
                    ip-address 192.168.2.10
                    mac-address 00:00:00:00:00:00
                }
                static-mapping KC-SERVER {
                    ip-address 192.168.2.8
                    mac-address 00:00:00:00:00:00
                }
                static-mapping MFC-9460CDN {
                    ip-address 192.168.2.219
                    mac-address 00:00:00:00:00:00
                }
                static-mapping XeroxCopier {
                    ip-address 192.168.2.75
                    mac-address 00:00:00:00:00:00
                }
            }
        }
        use-dnsmasq disable
    }
    dns {
        dynamic {
            interface eth0.35 {
                service dyndns {
                    host-name <url>
                    login <dyndns username>
                    password <dyndns password>
                }
            }
        }
        forwarding {
            cache-size 150
            listen-on eth1
            listen-on eth2
        }
    }
    gui {
        http-port 80
        https-port 443
        older-ciphers enable
    }
    nat {
        rule 5010 {
            description "masquerade for WAN"
            log disable
            outbound-interface eth0.35
            protocol all
            type masquerade
        }
    }
    ssh {
        port 22
        protocol-version v2
    }
}
system {
    host-name ubnt
    login {
        user <username> {
            authentication {
                encrypted-password <password>
            }
            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 UTC
}


/* Warning: Do not remove the following line. */
/* === vyatta-config-version: "config-management@1:conntrack@1:cron@1:dhcp-relay@1:dhcp-server@4:firewall@5:ipsec@5:nat@3:qos@1:quagga@2:system@4:ubnt-pptp@1:ubnt-util@1:vrrp@1:webgui@1:webproxy@1:zone-policy@1" === */
/* Release version: v1.9.0.4901118.160804.1131 */

I'd like to ensure that I have everything set up correctly, with the best possible network performance and minimal issues. Please comment below! Thanks!


Viewing all articles
Browse latest Browse all 20028

Trending Articles



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