ubuntu.com resolves but
not google.com! That's some rabbit-hole you're in :(
If I had to guess I'd look at your nameserver settings (which is odd
if apache is giving a restriction error). Depending on whether you use Network Manager (unlikely) or "network service" and whether you use static or DHCP (some people use DHCP even for a fixed IP address - go figure), or BIND, you may have to look in several locations - and it may turn out to be a firewall/SELinux, or Linode issue. Tricky.
Test that by finding out what nameservers you are using and changing them to know working ones - if you get localhost you are running the nameserver (but you'd know this). If you know, try temporarily replacing them with known working ones like the Google Public DNS nameservers I've given below.
If you don't know where you are setting the nameservers try the following to find them. Bear in mind that I didn't configure the CentOS server I'm using as a reference, and it's not hosted by Linode - their documentation would be a place to look, I haven't and don't currently use Linode). Change eth0 to the device (or pseudo device you are using).
Check if you are using Network Manager
ifcfg-eth0 | grep NM_CONTROLLED If the result is YES, either disable Network Manager or check the nameservers being used (if it's set to static, unlikely as you previously had no problems). Most people won't use Network Manager for a computer that has a static IP address. Linode VPS have static IP addresses - but many people use DHCP to set them (go figure).
Check if DHCP or static is used
ifcfg-eth0 | grep BOOTPROTO If the result is "static" check the nameservers being used
ifcfg-eth0 | grep 'DNS1\|DNS2'
If NM_CONTROLLED shows NO check "network service"
grep PEERDNS /etc/sysconfig/network-scripts/ifcfg-eth0
If the result is
yes, edit it to
no to prevent it being changed by the Peer
grep BOOTPROTO /etc/sysconfig/network-scripts/ifcfg-eth0 will tell you if you are using DHCP or static IP addressing.
grep 'DNS1'|DNS2' /etc/sysconfig/network-scripts/ifcfg-eth0 will tell you if you have the nameservers directly set in network-scripts. You can test if that is the problem by replacing them with the Google DNS nameservers (see below). If those settings exist you can ignore the values in
/etc/resolv.conf as that's where they come from.
If
PEERDNS=no check your nameserver settings with cat
/etc/resolv.conf In which case you can test the nameservers (there should be two) by using
nameserver 8.8.8.8
nameserver 8.8.8.4
[/color]which is Google's public DNS nameservers (you won't need to restart any services for them to apply)
If you are using BIND... I can't really help you (this server doesn't have BIND installed, and I'd have to read the man files which I can't do any better than you).
Good luck