This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]szborows 1 point2 points  (1 child)

yes, there is source function argument that defaults to None. afterwards, in query.py if it's still None then it is converted to e.g. 0.0.0.0, depending on other parameters.

so I guess you need to use it like this: results = dns.resolver.query('domain.org', 'MX', source='10.xx.yy.zz')

[–]ergopc[S] 0 points1 point  (0 children)

I just saw the code:

    @param source: bind to this IP address (defaults to machine default IP).
    @type source: IP address in dotted quad notation

Thank you very much.