I have a jailed user , that cannot ping hostnames (only ip addresses):
[dimitar@nl ~]$ ping google.com
ping: unknown host google.com
Dig is working without any problem:
[dimitar@nl ~]$ dig google.com
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.4 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14169
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION:
google.com. 300 IN A 173.194.78.101
google.com. 300 IN A 173.194.78.113
google.com. 300 IN A 173.194.78.139
google.com. 300 IN A 173.194.78.100
google.com. 300 IN A 173.194.78.102
google.com. 300 IN A 173.194.78.138
;; Query time: 11 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sun Jul 28 15:49:06 2013
;; MSG SIZE rcvd: 124
Any idea ? Thanks .
Have a look at the name resolution mechanism in the jail: like the (local?) copy of /etc/resolv.conf
(This answer is based on a lot of assumptions, because the question is not very precise. If the configuration of the name resolution is ok, I would do a 'nslookup google.com' or even a 'strace -f nslookup google.com' to see where it fails.)