Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Entropy in /dev/random ?
PostPosted: Sun Feb 19, 2012 3:25 pm 
Offline
Junior Member

Joined: Wed Jul 01, 2009 3:19 pm
Posts: 43
I'm trying to configure a Linode as a nameserver (for learning purposes, I know other solutions are easier).

The Linode is running Debian 6. I'm following instructions at http://wiki.debian.org/Bind9, and I've already set up bind in a chroot as per instructions further down in that wiki.

When I try to generate a key for a TSIG signature, the dnssec-keygen command hangs:

dnssec-keygen -a HMAC-MD5 -b 512 -n USER ns-yyrrll-net_rndc-key

A little google-fu suggests the problem may be lack of entropy in /dev/random. When I cat /dev/random to a file, the file ends up empty.

So how do I get more entropy into /dev/random?


Top
   
 Post subject: Haveged
PostPosted: Sun Feb 19, 2012 3:55 pm 
Offline
Junior Member
User avatar

Joined: Tue Apr 28, 2009 8:57 pm
Posts: 38
Location: Pale Blue Dot
You can install Haveged. It has been backported to Squeeze.

http://packages.debian.org/squeeze-backports/haveged


Top
   
 Post subject:
PostPosted: Mon Feb 20, 2012 2:04 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
Because your Linode doesn't have a physical disk, keyboard, or mouse attached to it to generate interrupts, you'll see less entropy generated than on a desktop system. Just what is used as an entropy source varies quite a bit based on your kernel and specific configuration; things seem to have lately swung in the paranoid direction of trusting very few sources. cat /proc/sys/kernel/random/entropy_avail should tell you how much entropy is in the random subsystem (4096 bits is usually the max number you'll see here).

In addition to advocatux's suggestion, you can also feed the entropy pool by writing data to /dev/random. You could generate the data on your local machine (which presumably has plenty of entropy) with a command like dd if=/dev/random of=~/datafile count=1.


Top
   
 Post subject:
PostPosted: Mon Feb 20, 2012 5:50 am 
Offline
Senior Member

Joined: Mon Jul 05, 2010 5:13 pm
Posts: 392
Or just run the following in another terminal on the Linode:

Code:
while true ; do mandb ; done


I find that's the quickest way to generate entropy when I need it.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group