you can do this with commands
nslookup google.com | grep Address | grep -v # | awk '{print $2}'
ipfw table 1 add <ip_address>
ipfw add 1 deny ip from $local_net to "table(1)"
but it is wrong way, because at one IP may hosts many site and if you block ip you block all sites, not only...