OpenWrt Forum Archive

Topic: How to create a Name Server

The content of this topic has been archived on 2 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Yup, this is a silly question, but I wander if I can use my router as a Name Server. Yup, something like ns1.nameofdomain.whatever that will make the connection between a domain name and it's server ip... I wander if I can do that with my router. I have OpenWrt (Kamikaze bleeding edge, r21387) and a DIR-825 Router with USB (I've managed to install PHP and lighttpd that worked ... well let's say, on my web server at a "hardcore" script the runtime was somewhere 0.006ms and on the router around 8 seconds). My DIR-825 has 64MB RAM, somewhere over 600 MHz clock speed, a 500 GB USB HDD and 1 GB of swap (i don't know what I am doing with this amount of swap, but whatever).

So, what do I need a name server for. Well, I am a web hosting reseller and I have contracts with more then one companies, and I personally don't like to use their nameservers and I wanna make my own. Yup, it's not professional to use a router to do that, I know, I already have a server that does that, but, I just wander, can I use my D-LINK router as a ns ? Could be fun, not for using the nameserver, just for tasting (same as php and lighttpd). The only "extra" reason I will use the router for will be as a storage device (a lil php, a lil ajax and proftpd mixed up nicely).

Can someone help me satisfy my curiosity?


Your sincerely,
Tanase Cosmin Romeo

I can't speak for Kamikaze, but I've got a nameserver running on Backfire (and a WZR-HP-G300NH). Just install bind-libs, bind-server and bind-tools, add your zones, tweak the options and enjoy. Pretty much like on any fully grown linux box.  No idea how it scales for large databases and/or workload.

MfG, Ulrich

Thanks for the tips, I will test this the following days and I will post back results and a little tutorial for those who are interested (that's if I managed to get it running).

The discussion might have continued from here.