I found out that it will disconnect from the Internet every a few days. It will resumed after about 0.5-1 day if it is ignored.
I tried to keep it pinging the nas every few minutes to keep the Internet up but it didn't help.
When the vm is disconnected, if I disable and enable the network interface, it will connect to Internet. So, I also tried to monitor the network interface every hour and disable then enable the network interface if it is disconnected. It still cannot help. I don't know why it cannot bring up the Internet when the script is run by crontab. However, when I found it disconnected yesterday I executed the script manually the Internet was up again.
P.S. The script I used is
Code: Select all
nmcli networking off
nmcli networking on