DNS / Proxy Server

  • Thread starter Thread starter pc3957
  • Start date Start date
P

pc3957

Hi everyone,

I'm trying to write a VB.net program that will act as a DNS server for
my network taking requests, looking up the domain in its database and
if it is a banned domain forwarding to a specified page, otherwise
requesting the real DNS from another DNS server and returning the
result to the client. I'm a fair programmer when it comes to desktop
applications, but I know very little about network applications. Does
anyone know of any samples, or articles I can read so I could learn to
write such a program?

Thanks.
 
pc3957,

I think rather than a DNS server, you are thinking of a proxy server. There
are many examples out there of how to acomplish this (Google: "vb.net" proxy
server), such as:

http://www.vbdotnetheaven.com/Uploadfile/psingh/WebServer04162005083342AM/WebServer.aspx
http://www.mentalis.org/soft/projects/proxy/
http://www.c-sharpcorner.com/UploadFile/psingh/web_proxy11162005001036AM/web_proxy.aspx

The basic idea is to use the System.Net namespace to create a socket to
listen on an ip address and port, and accept and forward requests. Make
sure it is multithreaded to handle multiple clients.

Also, you can setup Internet Explorer and FireFox to automatically use your
proxy, and make it unchangable to the user in an AD environment.
- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet
Settings

Hope this helps,

Steve
 
Back
Top