Tuesday, March 1, 2011

Vyatta Router Configuration Example of vR0

vR0_FW0 acts as the primary router routing traffics in and out from my host machine. Here is the config.boot file of vR0_FW0 described in my previous article. You may tweak the file and upload that into your Vyatta router if you want to create a similar environment.

interfaces {
    ethernet eth0 {
        address 192.168.0.55/24
        description external
        duplex auto
        hw-id 00:0c:29:98:49:42
        smp_affinity auto
        speed auto
    }
    ethernet eth1 {
        address dhcp
        duplex auto
        hw-id 00:0c:29:98:49:4c
        smp_affinity auto
        speed auto
    }
    ethernet eth2 {
        address dhcp
        duplex auto
        hw-id 00:0c:29:98:49:56
        smp_affinity auto
        speed auto
    }
    ethernet eth3 {
        address 192.168.75.55/24
        duplex auto
        hw-id 00:0c:29:98:49:60
        smp_affinity auto
        speed auto
    }
    ethernet eth4 {
        address dhcp
        duplex auto
        hw-id 00:0c:29:98:49:6a
        smp_affinity auto
        speed auto
    }
    loopback lo {
    }
}
service {
    https
    nat {
        rule 10 {
            description "SNAT from any internal host"
            outbound-interface eth0
            type masquerade
        }
        rule 20 {
            description to_esx001_lans
            outbound-interface eth3
            type masquerade
        }
        rule 30 {
            description to_management_host
            outbound-interface eth4
            type masquerade
        }
    }
    telnet {
        port 23
    }
}
system {
    domain-name kein.com
    gateway-address 192.168.0.1
    host-name edge
    login {
        user vyatta {
            authentication {
                encrypted-password XXXXXXXXXX
            }
            level admin
        }
    }
    name-server 192.168.0.1
    package {
        auto-sync 1
        repository community {
            components main
            distribution stable
            password ""
            url http://packages.vyatta.com/vyatta
            username ""
        }
        repository lenny {
            components "main contrib non-free"
            distribution lenny
            password ""
            url http://mirrors.kernel.org/debian
            username ""
        }
    }
    syslog {
        global {
            facility all {
                level notice
            }
            facility protocols {
                level debug
            }
        }
    }
    time-zone GMT
}


Cheers

No comments:

Post a Comment