• srv lookup in record

    From Marc Roos@21:1/5 to bind-users on Sat Aug 22 00:26:02 2020
    Is it possible to use srv lookups, like eg cname. I do not want to
    create SRV record, I just want to 'get' the ip addresses, that I would
    get vai srv lookup.

    Say I have this task

    [@temp3]$ dig +short server.test.marathon.mesos
    192.168.123.101
    192.168.124.50
    192.168.124.52
    192.168.124.51
    192.168.123.100
    192.168.123.102

    [@temp3]$ dig +short srv _http-apps._server.test._tcp.marathon.mesos
    0 1 31024 server.test-usbzr-s3.marathon.mesos.
    0 1 31852 server.test-z9x84-s3.marathon.mesos.
    0 1 31790 server.test-k7g8r-s4.marathon.mesos.

    [marc@os0 temp3]$ dig +short srv
    _http-demo._server.test._tcp.marathon.mesos
    0 1 31791 server.test-c8g8b-s4.marathon.mesos.
    0 1 31025 server.test-wtbza-s3.marathon.mesos.
    0 1 31853 server.test-d0x87-s3.marathon.mesos.

    I would like to only make available the ip addresses that are in the
    same range. If I would use a cname like this:

    server.local. CNAME server.test.marathon.mesos.

    I would get 6 of which 3 ip addresses are not in the same range. So I
    need to have something like

    server.local. ??? _http-apps._server.test._tcp.marathon.mesos.

    Is this possible in bind-9.8.2-0.68.rc1.el6_10.3.x86_64?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Warren@21:1/5 to Marc Roos on Fri Aug 21 22:00:25 2020
    On 2020-08-21 16:26, Marc Roos wrote:
    Is it possible to use srv lookups, like eg cname. I do not want to
    create SRV record, I just want to 'get' the ip addresses, that I would
    get vai srv lookup.

    I don't think so, nor does it seem to make sense to me that you would
    want such a thing (in the general case, you may have a use-case).

    SRV records are more than just pointers to a specific server, there is
    also the priority and weight that need to be considered at the
    application level.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Roos@21:1/5 to bind-users on Sat Aug 22 11:45:01 2020
    To: dw@thedave.ca (dw)

    I don't think so, nor does it seem to make sense to me that you would
    want such a thing (in the general case, you may have a use-case).

    What would be better way to solve this then? To filter out only the ip addresses that are in the same netmask?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Taylor@21:1/5 to Marc Roos on Tue Aug 25 17:48:09 2020
    This is a cryptographically signed message in MIME format.

    On 8/21/20 4:26 PM, Marc Roos wrote:
    Is it possible to use srv lookups, like eg cname. I do not want to
    create SRV record, I just want to 'get' the ip addresses, that I
    would get vai srv lookup.

    I don't know of any over the counter - if you will - way to do what - I
    think - you want to do.

    Say I have this task

    [@temp3]$ dig +short server.test.marathon.mesos
    192.168.123.101
    192.168.124.50
    192.168.124.52
    192.168.124.51
    192.168.123.100
    192.168.123.102

    Are these the IP addresses that the names in the following SRV records
    resolve to?

    [@temp3]$ dig +short srv _http-apps._server.test._tcp.marathon.mesos
    0 1 31024 server.test-usbzr-s3.marathon.mesos.
    0 1 31852 server.test-z9x84-s3.marathon.mesos.
    0 1 31790 server.test-k7g8r-s4.marathon.mesos.

    [marc@os0 temp3]$ dig +short srv
    _http-demo._server.test._tcp.marathon.mesos
    0 1 31791 server.test-c8g8b-s4.marathon.mesos.
    0 1 31025 server.test-wtbza-s3.marathon.mesos.
    0 1 31853 server.test-d0x87-s3.marathon.mesos.

    I would like to only make available the ip addresses that are in the
    same range. If I would use a cname like this:

    What does "same range" mean in this context?

    Is it the client's IP range? Or is it the server's IP range? Or some reference to _http-apps vs _http-demo?

    To me, the following three owner names are completely independent of
    each other.

    - server.test.marathon.mesos
    - _http-apps._server.test._tcp.marathon.mesos
    - _http-demo._server.test._tcp.marathon.mesos

    I see how we as humans can probably correlate the three. But I don't
    see how BIND will do it.

    server.local. CNAME server.test.marathon.mesos.

    That seems like a simple enough alias. Simple enough that I think that
    it's existence can largely be ignored and focus on the IP extraction
    from SRV record(s) that I think you're asking about.

    I would get 6 of which 3 ip addresses are not in the same range. So I
    need to have something like

    server.local. ??? _http-apps._server.test._tcp.marathon.mesos.

    How are you going to convey the "???" portion in the owner name of the
    DNS query?

    Is this possible in bind-9.8.2-0.68.rc1.el6_10.3.x86_64?

    I don't think what - I'm speculating - you want is possible as is with
    stock BIND.

    I do wonder if you might be able to write a custom Dynamic Loadable Zone database (?) driver that might be able to do what you want.

    Specifically, if you could create a DLZ driver that could take the query
    name, apply some logic to it (to determine the "???" above), perform the
    proper resolution of the SRV record(s), post process, and return the
    desired result to the original DNS query.

    $Marc's_Request IN CNAME bind-dlz.sourceforge.net

    Link - BIND DLZ Home
    - http://bind-dlz.sourceforge.net/

    Aside: I think this is atypical of BIND. But I also think that it
    /may/ be in BIND's wheel house to ... hack a possible solution to.

    Further aside: I have wondered about a custom DLZ that would return the client's IP address (as seen by the server). I'd like to roll my own
    "what's my IP" type service. }:-)



    --
    Grant. . . .
    unix || die


    MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC CzkwggUhMIIECaADAgECAhA53zcXtFD9dENby64EqrKqMA0GCSqGSIb3DQEBCwUAMIGWMQsw CQYDVQQGEwJHQjEbMBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxm b3JkMRgwFgYDVQQKEw9TZWN0aWdvIExpbWl0ZWQxPjA8BgNVBAMTNVNlY3RpZ28gUlNBIENs aWVudCBBdXRoZW50aWNhdGlvbiBhbmQgU2VjdXJlIEVtYWlsIENBMB4XDTE5MTExOTAwMDAw MFoXDTIwMTExODIzNTk1OVowKzEpMCcGCSqGSIb3DQEJARYaZ3RheWxvckB0bmV0Y29uc3Vs dGluZy5uZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCwIZcEJcuE7mUfxJnD I8oOSX/TvAhoP11agD++8L7Ok8fFJhJK0lOVRsq1M6lF2E2Vzuyffg2ppbecWvHcIRadsaiG imnrJQasdkhj/JUtqPUXnC0SVA0AzYLrLReQB+9j/jTgB5JnFLyC2lEn9KTA6JmDGjvVkv2T k+I2+v24nI4/2lGjD+jIKQiFXkE1uqablXJAw1c9Mh9d4/wjnIM9zLGv1i3xxOLdQ1PXSUZL 12wOy1r7CsGAnNSNhGaceB2tdhdleFEyIHgSgDWtWResHdu/ubZqFiHxaLRJlafOHMj3yC6x NOA1IdcNJsaRkQHxSkayKzeE5JK3TxlV83dbAgMBAAGjggHTMIIBzzAfBgNVHSMEGDAWgBQJ wPL8C9qU21/+K9+omULPyeCtADAdBgNVHQ4EFgQUU6bXebmKM+efFHN0MBjYuJO9Za8wDgYD VR0PAQH/BAQDAgWgMAwGA1UdEw
  • From John Levine@21:1/5 to you on Tue Aug 25 22:43:54 2020
    Copy: gtaylor@tnetconsulting.net

    In article <mailman.838.1598399252.942.bind-users@lists.isc.org> you write:
    [@temp3]$ dig +short srv _http-apps._server.test._tcp.marathon.mesos
    0 1 31024 server.test-usbzr-s3.marathon.mesos.
    0 1 31852 server.test-z9x84-s3.marathon.mesos.
    0 1 31790 server.test-k7g8r-s4.marathon.mesos.

    These SRV records say that the service is on ports 31024, 31852, and 31790 on the respective servers. CNAME does not give you a port number. There is no way to fake SRV using CNAME.

    R's,
    John

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Taylor@21:1/5 to John Levine on Tue Aug 25 21:40:50 2020
    This is a cryptographically signed message in MIME format.

    On 8/25/20 8:43 PM, John Levine wrote:
    These SRV records say that the service is on ports 31024, 31852,
    and 31790 on the respective servers. CNAME does not give you a
    port number. There is no way to fake SRV using CNAME.

    Agreed.

    I've had some off-line conversations with Marc about some related
    things, so I thought he was only looking for the IP aspect and not
    worried about the port aspect of the SRV records.



    --
    Grant. . . .
    unix || die


    MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC CzkwggUhMIIECaADAgECAhA53zcXtFD9dENby64EqrKqMA0GCSqGSIb3DQEBCwUAMIGWMQsw CQYDVQQGEwJHQjEbMBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxm b3JkMRgwFgYDVQQKEw9TZWN0aWdvIExpbWl0ZWQxPjA8BgNVBAMTNVNlY3RpZ28gUlNBIENs aWVudCBBdXRoZW50aWNhdGlvbiBhbmQgU2VjdXJlIEVtYWlsIENBMB4XDTE5MTExOTAwMDAw MFoXDTIwMTExODIzNTk1OVowKzEpMCcGCSqGSIb3DQEJARYaZ3RheWxvckB0bmV0Y29uc3Vs dGluZy5uZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCwIZcEJcuE7mUfxJnD I8oOSX/TvAhoP11agD++8L7Ok8fFJhJK0lOVRsq1M6lF2E2Vzuyffg2ppbecWvHcIRadsaiG imnrJQasdkhj/JUtqPUXnC0SVA0AzYLrLReQB+9j/jTgB5JnFLyC2lEn9KTA6JmDGjvVkv2T k+I2+v24nI4/2lGjD+jIKQiFXkE1uqablXJAw1c9Mh9d4/wjnIM9zLGv1i3xxOLdQ1PXSUZL 12wOy1r7CsGAnNSNhGaceB2tdhdleFEyIHgSgDWtWResHdu/ubZqFiHxaLRJlafOHMj3yC6x NOA1IdcNJsaRkQHxSkayKzeE5JK3TxlV83dbAgMBAAGjggHTMIIBzzAfBgNVHSMEGDAWgBQJ wPL8C9qU21/+K9+omULPyeCtADAdBgNVHQ4EFgQUU6bXebmKM+efFHN0MBjYuJO9Za8wDgYD VR0PAQH/BAQDAgWgMAwGA1UdEw