Conversation
|
@yundantianchang , how hard it would be to modify it to alternatively accept local hosts file in case more than just localhost needs to be defined in /etc/hosts? |
|
Hi, The configuration to But I don't know why |
|
@nlzy, in "/etc/nsswitch.conf", there is a line "hosts: files dns". This means that dns queries will first use the "/etc/hosts" file and then "/etc/resolv.conf". However, if there are certain lines in "/etc/hosts" for the host to block certain domains, the application in nsproxy will use the same "/etc/hosts" file and will also be blocked. With this patch, nsproxy and the host are isolated, and the host's "/etc/hosts" file does not have any impact on applications in nsproxy. |
|
@janedoe-lab, for the current codes, may need to edit the code directly. |
Local hosts may have effects on hosts in network namespace.