c++ - Windows - redirect domain request to localhost without modifying etc/hosts -
i need programmaticaly (c++) add kind of dns-resolving rule, redirect requests of specific domain localhost. there methods without modyfing etc/hosts file on windows?
you install local dns server machine (for example: bind). change ip settings on machine use own local dns server (127.0.0.1) instead of normal dns servers. create new domain (with name of dns name redirected) on local dns server, , include address record in zone file of domain, specifying desired ip address (127.0.0.1). there 1 more step might neccessary: if machine cannot reach internet dns servers directly, through normal dns servers, have configure dns request forwarding local dns server, every domain request forwarded original dns servers.
Comments
Post a Comment