Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Wed Apr 23, 2014 8:24 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: DNSmasq ?
PostPosted: Fri Dec 03, 2010 6:37 am 
Offline
Newbie
User avatar

Joined: Fri Dec 03, 2010 6:22 am
Posts: 9
Location: Atlanta, GA USA
I am the (unpaid) "IT guy" for a friend's small office network: 3 PCs, a printer, and a Linkstation Pro Duo running version 3 (3.03, maybe? I am away from the machine) software. I've broken in to the machine with acp_commander (thanks, Georg!) but have made no software or config changes. DHCP comes from the DSL router.

I would dearly love to have local DNS so I can say "printer" instead of 192.168.1.113.

I think DNSmasq is probably the right tool for the job, but I am an x86 guy with no ARM9 toolchain and probably without the ability to set one up.

Does anyone know where I can get a statically-linked DNSmasq binary that will run on the Linkstation Pro Duo? (I did search first, and I think this question hasn't been answered. If I'm wrong, please accept my apologies and point me to the answer.)


Top
 Profile  
 
 Post subject: Re: DNSmasq ?
PostPosted: Fri Dec 03, 2010 7:28 am 
Offline
Moderator

Joined: Fri Jun 29, 2007 10:39 am
Posts: 2538
Two solutions:
1) Buy a new router. There are lots of routers supporting what
you want (especially the ones supporting fixed IP addresses).

2) Search for "optware" in this forum/wiki. This is a package
system for precompiled stuff. The only "problem" you are facing,
is to find the right feed for your box.
Depending on the cpu in your box, you have to take the right
optware feed. My old boxes (orion5 based) need "cs05q3armel",
my new boxes (Feroceon-Kirkwood based) need "cs08q1armel".
Unfortunately "LS Pro Duo" is not enough to identify the model.
Buffalo "recycled" the model name in the course of time and now
there are several models with the same name but different hardware
(and this is not restricted to the LS Pro Duo).

cs05q3armel == http://ipkg.nslu2-linux.org/feeds/optware/cs05q3armel/cross/stable/lspro-bootstrap_1.2-7_arm.xsh
cs08q1armel == http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/ls-mvkw-bootstrap_1.2-7_arm.xsh

_________________
Please do not use private mail (PN/M) to ask questions. Use the proper forum instead. (me)

If there is no verified backup of a dataset, the dataset, by definition, is unimportant. (c't 2012)

RAID (no matter which level) never ever substitutes a backup. (me)


Top
 Profile  
 
 Post subject: Re: DNSmasq ?
PostPosted: Fri Dec 03, 2010 3:40 pm 
Offline
Site Admin
User avatar

Joined: Sun Jul 17, 2005 4:34 pm
Posts: 5330
Location: Cologne, Germany
3) Use Static DHCP on the router (i.e., assign IP addresses to MAC addresses), and add lines like

192.168.1.113 printer

to /etc/hosts. There's a hosts file on Windows systems, too, which a search will reveal.

_________________
HG ยท Debian squeeze
Linux Kernel 2.6/PPC (and more!) for Linkstation/KuroBox/HG/HS/Terastation from http://hvkls.dyndns.org


Top
 Profile  
 
 Post subject: Re: DNSmasq ?
PostPosted: Sat Dec 04, 2010 4:42 am 
Offline
Newbie
User avatar

Joined: Fri Dec 03, 2010 6:22 am
Posts: 9
Location: Atlanta, GA USA
kenatonline wrote:
Depending on the cpu in your box, you have to take the right
optware feed. My old boxes (orion5 based) need "cs05q3armel",
my new boxes (Feroceon-Kirkwood based) need "cs08q1armel".

Thank you very much. I'll poke at that. Since I've broken in to the box, I can probably coerce it into telling me what kind of CPU is inside.

Thanks for the suggestion about the router, too. I actually have a router running DD-WRT on the workbench at the moment; it is how I know about DNSmasq. Unhappily, my friend subscribes to a billing service and they provide their own router for the purpose of providing their own VPN tunnel. So, the router is off limits to me, or I'd stick DD-WRT in there.


Top
 Profile  
 
 Post subject: Re: DNSmasq ?
PostPosted: Sat Dec 04, 2010 4:53 am 
Offline
Newbie
User avatar

Joined: Fri Dec 03, 2010 6:22 am
Posts: 9
Location: Atlanta, GA USA
andre wrote:
/etc/hosts. There's a hosts file on Windows systems, too, which a search will reveal.

Thanks! That's sort-of what I've done. Although the router is off-limits to me, there are addresses not in the DCHP pool, and I've assigned fixed addresses from that range. I know about the Windows hosts file and have changed it on the three PCs, but haven't changed /etc/hosts on the Linkstation.

This, of course, works, but it seems so 1980's to me that it offends my sensibilities. {grin} I can get the guys who maintain the router to turn DHCP off. If I can get DNSmasq running, I'll have a network that is at least in the right century.


Top
 Profile  
 
 Post subject: Re: DNSmasq ?
PostPosted: Thu Dec 09, 2010 6:42 pm 
Offline
Newbie
User avatar

Joined: Fri Dec 03, 2010 6:22 am
Posts: 9
Location: Atlanta, GA USA
bbrown wrote:
Thank you very much. I'll poke at that. Since I've broken in to the box, I can probably coerce it into telling me what kind of CPU is inside.

Looking in /proc/cpuinfo I find the following:
Code:
Processor       : ARM926EJ-Sid(wb) rev 0 (v5l)
BogoMIPS        : 266.24
Features        : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant     : 0x0
CPU part        : 0x926
CPU revision    : 0


(I've captured the whole thing in case I've omitted something important. I also have the output of board_info.)

However, I don't know enough about ARM processors to figure out what distribution I need. Searching with Google finds a lot of stuff related to DD-WRT, but nothing that helps me focus on the right distribution. Searching in this forum finds lots of hits on the CPU ID, but nothing in combination with "optware." Back to Google and it appears that cs05q3armel is the right tool for the job, but I'd really like to be sure.

I'd really appreciate it if someone would point me in the right direction. Thanks!

[Edited to fix typo.]


Last edited by bbrown on Sat Dec 11, 2010 5:56 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: DNSmasq ?
PostPosted: Sat Dec 11, 2010 5:55 am 
Offline
Newbie
User avatar

Joined: Fri Dec 03, 2010 6:22 am
Posts: 9
Location: Atlanta, GA USA
When I finally got some time to search more thoroughly, I've found http://forum.buffalo.nas-central.org/viewtopic.php?f=19&t=4075&p=39162#p39162 which appears to confirm that this machine needs cs05q3armel and also provides excellent instructions for bootstrapping the ipkg stuff.

I'm going to upgrade to the 3.10 firmware before I proceed. I've untarred it on an x86 Linux box and determined that telnetd, sshd, and wget are present. Thanks to those who provided the password info!


Top
 Profile  
 
 Post subject: [Solved] DNSmasq ?
PostPosted: Sun Dec 12, 2010 12:01 am 
Offline
Newbie
User avatar

Joined: Fri Dec 03, 2010 6:22 am
Posts: 9
Location: Atlanta, GA USA
I've got DNSMasq running. Thanks for the help. This is on a LinkStation Pro Duo LS-WTGL/R1-V3 that reports a processor type of: ARM926EJ-Sid(wb) rev 0 (v5l)

To help others who may be searching on "dnsmasq" here is what I did.

Install the 3.10 software from the Buffalo site. It does contain sshd, telnetd, and wget. It does work with acp_commander. However, be sure you are running Version 3 software before you do this; you'll brick your machine if you try to install 3.10 over 1.xx.

Remove root password and enable telnet with acp_commander, then fix sshd to start automagically on reboot using steps 1.1 to 1.5 from this article: http://buffalo.nas-central.org/index.php/Open_Stock_Firmware. (I skipped adding telnet to the startup.)

Log in using ssh and 'cat /proc/cpuinfo' to verify that the CPU is ARM926EJ-Sid(wb) rev 0 (v5l) (If it's not, you may need a different version of optware, and I don't have the experience to help figure that out. Sorry.)

Bootstrap the optware stuff as follows:
Code:
mkdir /mnt/array1/tmp
cd /mnt/array1/tmp
wget http://ipkg.nslu2-linux.org/feeds/optware/cs05q3armel/cross/stable/teraprov2-bootstrap_1.2-7_arm.xsh
# If 404, check for newer version of bootstrap
sh teraprov2-bootstrap_1.2-7_arm.xsh
ipkg update
ipkg upgrade

I installed the nano editor as well as DNSmasq because I'm slow with vi:
Code:
ipkg install nano
ipkg install dnsmasq


Make a place for the "leases" file in the /opt directory:
Code:
cd /opt/lib
mkdir misc
cd misc
touch dnsmasq.leases
chown nobody dnsmasq.leases

Make a backup of the configuration file:
Code:
cd /opt/etc
cp dnsmasq.conf dnsmasq.conf.original

Now edit the configuration file to suit you; be sure you change the location of "dnsmasq.leases". Search for it.

Rebooting the Linkstation overwrites /etc/hosts. If you want to use a hosts file, create one in /opt/etc/hosts, add an "addn-hosts=/opt/etc/hosts" line to dnsmasq.conf, and populate your hosts file.

Rebooting the Linkstation overwrites /etc/resolve.conf. Create and edit /opt/etc/resolv.conf to give DNSmasq some "outside" name servers to use. You must specify resolv-file=/opt/etc/resolv.conf in the DNSmasq configuration. See the sample below.
Code:
# Only local requests go here; dnsmasq ignores this
nameserver 127.0.0.1
# OpenDNS Public Nameservers
nameserver 208.67.222.222
nameserver 208.67.220.220
# Google's public nameservers
nameserver 8.8.8.8
nameserver 8.8.4.4
# AT&T's nameservers  (Use your own ISP's name servers if not an AT&T customer)
nameserver 205.152.37.23
nameserver 205.152.144.23

Start DNSmasq and See What Happens(tm):
Code:
/opt/etc/init.d/S56dnsmasq

I have a cut-down configuration file that may be easier than starting with the one that comes with the package. Once I've been using it for a week or so, I can make it available to anyone who wants it. Edit: You can find my cut-down configuration file here: http://www.hardcastle.us/network/dnsmasq_conf.html

PS: If you have a router running DD-WRT (or several other newer routers, I am told) you don't need this because you have DNSmasq and web-based configuration right in your router.

Edits:
2010-12-24 12:01 Rebooting the Linkstation overwrites /etc/resolv.conf and /etc/hosts. Provide alternates /opt/etc/resolv.conf and /opt/etc/hosts and include them in the DNSmasq configuration.
2010-12-20 16:23 Added link to my cut-down config file and a comment in the resolv.conf code not to use AT&T's name servers if one is not an AT&T customer.
2010-12-11 21:59 Added "LS-WTGL/R1-V3" to the description of the LinkStation Pro Duo and rearranged the first paragraphs.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Protected by Anti-Spam ACP
Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group