DNS not resolving in openvz container (VE)

After creating and starting a container on OpenVZ, dns was not functioning by default.? Pinging google receives the following error.

 

# ping -c 1 www.google.com
ping: unknown host www.google.com

 

Whoa, this page seems a bit overkill.
http://wiki.openvz.org/Setting_up_an_iptables_firewall

 

Instead, I simply added the following two lines to /etc/sysconfig/iptables

/etc/sysconfig/iptables (on HN)

-A RH-Firewall-1-INPUT -d #.#.#.# -j ACCEPT
-A RH-Firewall-1-INPUT -s #.#.#.# -j ACCEPT

Where #.#.#.# is the IP address of your container (VE).? Then restart iptables on the HN (hardware node).

 

# service iptables restart