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

dnsmasq and CNAME

$
0
0

Hi to all

 

I'm trying to add a CNAME record using dnsmasq. But it does not work. I have a EdgeRouter X-SFP running with v1.9.0.

 

I ran the following line in order to add the CNAME record:

  • set service dns forwarding options cname=test,router.hika1

I cannot see why it doesn't work. I can ping "router.hika1" but not "test". Any hints?

 

Please see my whole config below:

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 {
        address dhcp
        description Internet
        duplex auto
        firewall {
            in {
                name WAN_IN
            }
            local {
                name WAN_LOCAL
            }
        }
        speed auto
    }
    ethernet eth1 {
        description Local
        duplex auto
        speed auto
    }
    ethernet eth2 {
        description Local
        duplex auto
        speed auto
    }
    ethernet eth3 {
        description Local
        duplex auto
        speed auto
    }
    ethernet eth4 {
        description Local
        duplex auto
        speed auto
    }
    ethernet eth5 {
        duplex auto
        speed auto
    }
    loopback lo {
    }
    switch switch0 {
        description Local
        mtu 1500
        switch-port {
            interface eth1 {
                vlan {
                    pvid 10
                    vid 20
                    vid 30
                }
            }
            interface eth2 {
                vlan {
                    pvid 10
                    vid 20
                    vid 30
                }
            }
            interface eth3 {
                vlan {
                    pvid 10
                    vid 20
                    vid 30
                }
            }
            interface eth4 {
                vlan {
                    pvid 10
                    vid 20
                    vid 30
                }
            }
            vlan-aware enable
        }
        vif 10 {
            address 192.168.182.1/26
            mtu 1500
        }
        vif 20 {
            address 192.168.182.65/26
            mtu 1500
        }
        vif 30 {
            address 192.168.182.129/26
            mtu 1500
        }
    }
}
service {
    dhcp-server {
        disabled false
        hostfile-update disable
        shared-network-name lan0 {
            authoritative enable
            subnet 192.168.182.0/26 {
                default-router 192.168.182.1
                dns-server 192.168.182.1
                lease 86400
                start 192.168.182.30 {
                    stop 192.168.182.62
                }
                static-mapping cisco-01 {
                    ip-address 192.168.182.5
                    mac-address xx:xx:xx:xx:xx:xx
                }
                static-mapping cp1525n {
                    ip-address 192.168.182.7
                    mac-address xx:xx:xx:xx:xx:xx
                }
                static-mapping gs105e {
                    ip-address 192.168.182.8
                    mac-address xx:xx:xx:xx:xx:xx
                }
                static-mapping nas {
                    ip-address 192.168.182.4
                    mac-address xx:xx:xx:xx:xx:xx
                }
                static-mapping qlproxy {
                    ip-address 192.168.182.2
                    mac-address xx:xx:xx:xx:xx:xx
                }
                static-mapping qlproxyP {
                    ip-address 192.168.182.15
                    mac-address xx:xx:xx:xx:xx:xx
                }
                static-mapping radio {
                    ip-address 192.168.182.6
                    mac-address xx:xx:xx:xx:xx:xx
                }
                static-mapping router {
                    ip-address 192.168.182.1
                    mac-address xx:xx:xx:xx:xx:xx
                }
                static-mapping uap {
                    ip-address 192.168.182.3
                    mac-address xx:xx:xx:xx:xx:xx
                }
                static-mapping vbox {
                    ip-address 192.168.182.9
                    mac-address xx:xx:xx:xx:xx:xx
                }
            }
        }
        shared-network-name lan1 {
            authoritative enable
            subnet 192.168.182.64/26 {
                default-router 192.168.182.65
                dns-server 192.168.182.65
                lease 86400
                start 192.168.182.66 {
                    stop 192.168.182.99
                }
            }
        }
        shared-network-name lan2 {
            authoritative enable
            subnet 192.168.182.128/26 {
                default-router 192.168.182.129
                dns-server 192.168.182.129
                lease 86400
                start 192.168.182.130 {
                    stop 192.168.182.149
                }
            }
        }
        use-dnsmasq enable
    }
    dns {
        forwarding {
            cache-size 400
            listen-on switch0.10
            listen-on switch0.20
            listen-on switch0.30
            options cname=test,router.hika1
        }
    }
    gui {
        http-port 80
        https-port 443
        older-ciphers enable
    }
    nat {
        rule 5010 {
            description "masquerade for WAN"
            outbound-interface eth0
            type masquerade
        }
    }
    ssh {
        port 22
        protocol-version v2
    }
}
system {
    domain-name hika1
    host-name ubnt
    login {
        user admin {
            authentication {
                encrypted-password xyz
                plaintext-password ""
            }
            level admin
        }
    }
    name-server 127.0.0.1
    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 enable
    }
    syslog {
        global {
            facility all {
                level notice
            }
            facility protocols {
                level debug
            }
        }
    }
    time-zone Europe/Berlin
}


/* 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 */

Thanks a lot!

 

Best regards,

chgruem


Viewing all articles
Browse latest Browse all 20028

Trending Articles