Skip to content

Commit

Permalink
unjail tor
Browse files Browse the repository at this point in the history
Some of the Firejail restrictions seem to conflict with the systemd
service hardening.
  • Loading branch information
pigmonkey committed Jul 16, 2021
1 parent 658b373 commit 144226d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 36 deletions.
4 changes: 0 additions & 4 deletions roles/tor/files/tor-service-override.conf

This file was deleted.

2 changes: 0 additions & 2 deletions roles/tor/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---
dependencies:
- { role: firejail }
- { role: systemd }
- { role: nmtrust }
30 changes: 0 additions & 30 deletions roles/tor/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,6 @@
- torsocks
state: present

- name: Set Tor to run as tor
lineinfile: dest=/etc/tor/torrc
regexp=^User
state=present
line="User tor"

- name: Create Tor systemd unit file directory
file: path=/etc/systemd/system/tor.service.d state=directory
tags:
- firejail

- name: Push Tor socket unit file
copy: src=tor-service-override.conf dest=/etc/systemd/system/tor.service.d/override.conf
notify:
- reload systemd config
tags:
- firejail

- name: Verify Tor firejail local profile exists
file: path=/etc/firejail/tor.local state=touch
tags:
- firejail

- name: Allow Tor firejail /dev access
lineinfile:
dest: /etc/firejail/tor.local
line: "ignore private-dev"
tags:
- firejail

- include_tasks: roles/nmtrust/tasks/unit.yml
vars:
unit: tor.service
Expand Down

0 comments on commit 144226d

Please sign in to comment.