iptables block network access until sdwdate succeeded

Information

ID: 533
PHID: PHID-TASK-hvcz54zthvrpxrt43cqf
Author: Patrick
Status at Migration Time: open
Priority at Migration Time: Normal

Description

Iptables block network access until #sdwdate succeeded. Reasons:

  • cover cases where sdwdate is slow or failing
  • catch race conditions where sdwdate is slower than a user starting a client program, server or daemon that already issued network traffic and leaked the time

Previously this was implemented in form of the #timesync progress bar. But such a progress bar was bad for various reasons:

  • not enforced, easily ignored
  • does not stop automatically starting applications and/or the user from using the network
  • a popup which is bad for usability
  • two or more [when using multiple Whonix-Workstation’s] on the same desktop when using Qubes [due to its nature of using seamless mode]

A follow up task of T300.

Implementation:

  • after boot #whonix-gw-firewall / #whonix-ws-firewall should block the network for everything but Tor and #sdwdate
    ** should create a /var/run/whonix_firewall/first_run_current_boot.status file
    ** when Whonix firewall gets restarted and /var/run/whonix_firewall/first_run_current_boot.status already exists, it should unblock the network and create a status file /var/run/whonix_firewall/consecutive_run.status.
  • after the first time synchronization succeeded, sdwdate should issue unlocking the network
    ** sdwdate already creates a status file /var/run/sdwdate/first_success, then
    ** reload whonix_firewall
  • enabled by default
  • configuration options to disable all of this
  • all of this should safeguard allowing the user to allow network access even if one day a case is met where sdwdate is permanently failing
  • #sdwdate-gui should shows that status of network time synchronization

Testing:

sudo rm /var/run/sdwdate/* && sudo service sdwdate restart && sudo service tor restart && whonixcheck_tor_bootstrap_wait_max=10 whonixcheck --gui --cli

#TODO:

Better notification than sdwdate-gui if network access is limited or full.

Comments


HulaHoop

2016-08-23 18:38:02 UTC


Patrick

2016-08-23 19:15:32 UTC


Patrick

2016-08-24 19:52:00 UTC


Patrick

2016-08-25 04:11:51 UTC


Patrick

2016-08-26 20:55:43 UTC


Patrick

2016-08-26 21:02:16 UTC


HulaHoop

2016-08-27 18:31:46 UTC


HulaHoop

2016-08-28 01:56:13 UTC


Patrick

2016-08-29 21:53:02 UTC


HulaHoop

2016-08-29 22:18:47 UTC


Patrick

2016-08-29 22:59:34 UTC


HulaHoop

2016-09-01 17:22:41 UTC


Patrick

2016-09-04 17:18:28 UTC


Patrick

2016-09-04 20:10:04 UTC


Patrick

2016-09-05 15:02:43 UTC


HulaHoop

2016-09-07 16:07:32 UTC


Patrick

2016-09-09 15:25:33 UTC


Patrick

2016-09-15 23:00:00 UTC


marmarek

2016-09-15 23:16:50 UTC


Patrick

2016-09-15 23:36:48 UTC


marmarek

2016-09-15 23:40:38 UTC


Patrick

2016-12-16 16:48:40 UTC


Patrick

2016-12-23 20:48:59 UTC


marmarek

2016-12-23 20:53:12 UTC


Patrick

2016-12-23 22:31:13 UTC


Patrick

2016-12-23 23:27:56 UTC


Patrick

2016-12-24 18:51:38 UTC


Patrick

2016-12-25 02:52:40 UTC


Patrick

2017-02-15 23:27:05 UTC


Patrick

2017-05-26 15:25:50 UTC


Patrick

2017-12-21 16:55:35 UTC


Patrick

2021-01-12 07:51:54 UTC