Privacy Policy

March 09, 2016

Whonix AppVM won't connect to Tor after hybernate

It happen to Fabrizio, a friend of mine, that he isn't able to re-connect to tor if his computer is hibernated for more than 8 hours. The reason behind this is that (if I understood properly) is that the tor network won't accept any connection from node who's clock is that much wrong. As a consequence, you need to restart your virtual machine and sync the clock again.

So, the quick fix is to go in dom0 and call:

crontab -e

and then insert:
*/1 * * * * qvm-run --pass-io whonix "sudo date -s '`date`'" 
*/1 * * * * qvm-run --pass-io whonix-gw "sudo date -s '`date`'" 

and save.
 Instead of whonix and whonix-gw you have to put the name of your 2 AppVM.

This will update their date every minute, so tor will connect again.
For my qubes this would work, but it didn't work on Fabrizio's qubes. That's perhaps because he moved to another country, and he had to play with his date. He added a format string in the command, and the resulting lines to add are:
*/1 * * * * qvm-run --pass-io whonix "sudo date -s '`date+"%d %b %Y %T"`'" 
*/1 * * * * qvm-run --pass-io whonix-gw "sudo date -s '`date+"%d %b %Y %T"`'"