View Single Post
  #42 (permalink)  
Old 03-31-2006, 11:59 AM
chirpy's Avatar
chirpy chirpy is offline
Moderator
 
Join Date: Jun 2002
Location: Go on, have a guess
Posts: 13,495
chirpy will become famous soon enough
BTW, I've put together a perl script that's slightly different to the one posted by DigiCrimeas I found that missed out some of the ethernet devices:
Code:
#!/usr/bin/perl

@ips = `ifconfig`;
chomp @ips;

print "\n\nacl \"trusted\" {\n";
foreach my $line (@ips) {
	if ($line =~ /inet addr:(\d+\.\d+\.\d+\.\d+)/) {
		print "        $1;\n";
	}
}
print "};\n\n";
print "options {\n";
print "        directory \"/var/named\";\n";
print "        dump-file \"/var/named/data/cache_dump.db\";\n";
print "        statistics-file \"/var/named/data/named_stats.txt\";\n";
print "        version \"not currently available\";\n";
print "        allow-recursion { trusted; };\n";
print "        allow-notify { trusted; };\n";
print "        allow-transfer { trusted; };\n";
print "};\n\n"
Replace the options section in named.conf with the output from the script.
__________________
Jonathan Michaelson
cPanel Forum Moderator

Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com

Last edited by chirpy; 07-25-2006 at 05:34 PM.
Reply With Quote