I just created a chroot jail with inetutils, coreutils and bash. Most of the things seem to work. I can ping ip addresses and hosts that are inside
/etc/hosts, however, I can't ping hosts that are not in
/etc/hosts. I copied both
protocols to the chroot jail, but I still cannot ping hostnames. Which file am I supposed to put inside the jail so I can resolve hostnames? I have also read some stuff about
scutil, but I want to avoid copying more binaries as much as possible.
$ ping 126.96.36.199 PING 188.8.131.52 (184.108.40.206): 56 data bytes 64 bytes from 220.127.116.11: icmp_seq=0 ttl=120 time=22.322 ms 64 bytes from 18.104.22.168: icmp_seq=1 ttl=120 time=26.672 ms $ ping google.com # Host not in /etc/hosts ping: unknown host $ ping example.com # Host in /etc/hosts PING example.com (22.214.171.124): 56 data bytes 64 bytes from 126.96.36.199: icmp_seq=0 ttl=50 time=160.226 ms 64 bytes from 188.8.131.52: icmp_seq=1 ttl=50 time=147.602 ms