add support for dns

@cjellick