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