So I have 2 CentOs machines, server1 has 2 interfaces, enp0s3 and enp0s8. enp0s3 is connected to virtual's box NAT network while enp0s8 is connected to a private network. network id for enp0s3 is 10.0.2.0 and for enp0s8 192.168.1.0. So far I can ping from server 1 to server 2. However, while enp0s8 on server 1 is enabled DNS doesn't work. I can ping 18.104.22.168 but I can't ping google.com.
Disabling enp0s8 solves the problem
Currently, setting /etc/resolv.conf nameserver 22.214.171.124 solves the problem