WORKING: Guide for creating a logging qube (I.E. sys-log) - WIP revisions

Go back to topic: WORKING: Guide for creating a logging qube (I.E. sys-log) - WIP

  1. v23 anchor; v23 full version
  2. v22 anchor; v22 full version
  3. v21 anchor; v21 full version
  4. v20 anchor; v20 full version
  5. v19 anchor; v19 full version
  6. v18 anchor; v18 full version
  7. v17 anchor; v17 full version
  8. v16 anchor; v16 full version
  9. v15 anchor; v15 full version
  10. v14 anchor; v14 full version
  11. v13 anchor; v13 full version
  12. v12 anchor; v12 full version
  13. v11 anchor; v11 full version
  14. v10 anchor; v10 full version
  15. v9 anchor; v9 full version
  16. v8 anchor; v8 full version
  17. v7 anchor; v7 full version
  18. v6 anchor; v6 full version
  19. v5 anchor; v5 full version
  20. v4 anchor; v4 full version
  21. v3 anchor; v3 full version
  22. v2 anchor; v2 full version

Revision #23

Edited on
2025-02-24
Edited by user
ddevz
- Should we recommend some specific security oriented operating systems for external logging (either amd64 or raspberry pi operating) instead of a normal one? - Should we recommend some specific security oriented operating systems for external logging (either amd64 or raspberry pi operating) instead of a normal one? **Alternate version** This is the start of a alternate version that while it wont work with all qubes (like windows qubes), it can work with many qubes. Its a systemd journal First, warning: systemd is excessively complicated, and it takes forever to figure out how to do the simplest things with it. Also, I don't have confirmation that this procedure works yet, as i'm in the middle of writing the procedure. in the sys-log qube, do: ``` sudo apt update; sudo apt install systemd-journal-remote sudo systemctl enable --now systemd-journal-remote.socket sudo systemctl enable systemd-journal-remote.service ``` this should start running the service on port 19532 The man page says you can test if its working by doing: ``` sudo systemctl enable systemd-journal-upload.service ``` But naturally, there is no command, and you'll get: ``` -bash: systemd-journal-remote: command not found ``` But that's just how the systemd user experience goes. :neutral_face: Anyway, moving on... In the templates of all the other qubes do: ``` sudo apt update; sudo apt install systemd-journal-remote sudo systemctl enable systemd-journal-upload.service ``` at this point, you aparently need to create a SSL certificate authority for your qubes system, add its certificate to the trusted certificates of the template of the sys-log qube (and possibly all of the qubes templates?), then go to every template of every qube and create a SSL certificate signing request, and send it to the SSL certificate authority qube, sign them, then send them back to the inidividual qubes and configure them in `/etc/systemd/journal-remote.conf` (not actually attempted because I'm expecting it to probably fail due to something checking the hostname and realizing that the certificate is not for disp2388, it's for tempalte-debian-12, and refusing to work. In this case we'd need to sign certificates for every qube, not just every template.

Revision #22

Edited on
2025-02-24
Edited by user
ddevz

Revision #21

Edited on
2023-09-07
Edited by user
deeplow

Revision #20

Edited on
2021-10-04
Edited by user
ddevz
***NOTE: While this guide is still a work in progress, it is now useful enough that many people should be able to use it to get logging working locally on their system***
This thread is the start of a guide for how to set up a logging qube that uses those new patches. We can use this thread to collect all the logging qube related information with the hope of having a complete guide by the time the patches are integrated into upstream. Remember, it is a work in progress, still with many open questions to get feedback on. Please shout out if you have a answer, see a potential security issue that isn't addressed, or have other input. This thread is the start of a guide for how to set up a logging qube that uses those new patches. We can use this thread to collect all the logging qube related information with the hope of having a complete guide by the time the patches are integrated into upstream. Remember, it is still a work in progress, still with many open questions to get feedback on. Please shout out if you have a answer, see a potential security issue that isn't addressed, or have other input.
5. TODO: We haven't mentioned getting logs from dom0 yet, which would be a important one.
Steps: 2. set up a external computer with a operating system. 2.a Options: 2.a.1 Set up a normal computer with a linux distribution other then Qubes (actually Qubes is more of a xen distribution, but that's beside the point). Recommended distributions. Debian is normal. Would we want to advise a security oriented distribution? Also mention that BSD is fine to install, but most people are probably not familiar with it. 2.a.2 Set up another computer with Qubes on it. (would require pointing to a guide for opening up listening ports to the outside world for a qubes qube) (hardware that can run Qubes 4.0 is valuable enough to a Qubes user that it'd probably be getting used for Qubes. possibly discuss potential issues with using that qubes system for logging *and* for other things?) 2.a.3 Set up a raspberry pi. (Depending on the traffic generated (which depends on *how many* qubes computers you have pointed at it), it's possible that not all raspberry pi models can handle the traffic, so maybe some kind of guidance on that?). Guidance on operating systems? Recommended distributions? Standard is raspbian (now renamed to something else), which is a mangled version of debian. Recommend a distribution more security oriented? (Also, if you don't feel Qubesy enough running a raspberry pi note that xen supposedly works fine on raspberry pi nowdays) 2.b install rsyslog on it 2.c TODO: explain how to set up rsyslog to allow receiving from the IP address of the qubes system 2.d TODO: add SSL to explanation *Sending the logging traffic from sys-log:* Sending the logging traffic from sys-log can be as easy as editing the /etc/rsyslog.conf file on sys-log and adding ```*.* @{ip address of your external log collector}``` This is the simplest configuration that will copy all logs from sys-log to that remote system. They will be forwarded unencrypted. (TODO: talk about setting up encryption) *Set up a external computer to recieving the logging traffic coming from sys-log:* 1. Options: 1.a Set up a normal computer with a linux distribution other then Qubes (actually Qubes is more of a xen distribution, but that's beside the point). Recommended distributions. Debian is normal. Would we want to advise a security oriented distribution? Also mention that BSD is fine to install, but most people are probably not familiar with it. 1.b Set up another computer with Qubes on it. (would require pointing to a guide for opening up listening ports to the outside world for a qubes qube) (hardware that can run Qubes 4.0 is valuable enough to a Qubes user that it'd probably be getting used for Qubes. possibly discuss potential issues with using that qubes system for logging *and* for other things?) 1.c Set up a raspberry pi. (Depending on the traffic generated (which depends on *how many* qubes computers you have pointed at it), it's possible that not all raspberry pi models can handle the traffic, so maybe some kind of guidance on that?). Guidance on operating systems? Recommended distributions? Standard is raspbian (now renamed to something else), which is a mangled version of debian. Recommend a distribution more security oriented? (Also, if you don't feel Qubesy enough running a raspberry pi note that xen supposedly works fine on raspberry pi nowdays) 2. install rsyslog on it 3. TODO: explain how to set up rsyslog to allow receiving from the IP address of the qubes system 4. TODO: add SSL to explanation

Revision #19

Edited on
2021-10-04
Edited by user
ddevz

Revision #18

Edited on
2021-10-01
Edited by user
ddevz
```qvm-create --template debian-10 --label-purple --property netvm=sys-firewall --property provides_network=True sys-log``` Or Create a sys-log-local qube with no networking: Example (typed from dom0): ```qvm-create --template debian-10 --label-purple --property netvm=none --property provides_network=True sys-log-local``` ``` qvm-create --template debian-10 --label-purple --property netvm=sys-firewall --property provides_network=True sys-log qvm-tags sys-log add collects-logs ``` Or Create a sys-log-local qube with no networking: Example (typed from dom0): ``` qvm-create --template debian-10 --label-purple --property netvm=none --property provides_network=True sys-log-local qvm-tags sys-log-local add collects-logs ```
sys-log sys-log allow sys-log sys-log deny @tag:collects-logs sys-log deny

Revision #17

Edited on
2021-10-01
Edited by user
ddevz
(Other options: If your planning to log all qubes, you could do: `@anyvm receivingVM allow`, or if your just testing, you could do: `@anyvm @anyvm ask`) (Other options: If your planning to log all qubes, you could do: ``` sys-log sys-log allow @anyvm sys-log allow ``` or if your just testing, you could do: `@anyvm @anyvm ask`)

Revision #16

Edited on
2021-10-01
Edited by user
ddevz
4. TODO: Add instructions specific windows instructions for configuring nxlog? 4. TODO: Add instructions specific windows instructions for configuring nxlog? **WARNING: Make sure your system will still be able to boot!** If you have added logging to the templates for the sys-net and sys-firewall qubes, then when you boot up, they will generate a significant amount of traffic which will get logged (more then 10000 lines each). The system will automatically try to boot sys-log, so all sounds fine. However during boot time, many other things are going on (for example the sys-net and sys-firewall qubes starting). This can slow down the system. If it slows it down enough so that it takes longer then 60 seconds to boot the sys-log qube, qrexec will kill the sys-log qube, and immediately try launching a new bootup of the sys-log qube, which causes new system load, and starts a infinte loop. Depending on the speed of your system, and how many things you configure in your auto-boot sequence(including possibly more the one sys-log qube), this may be a problem or not. There are 2 precautions to take: 1. Make backups of everything before you complete your logging configurations 2. Change the timeout for all qubes with: ```qubes-prefs default_qrexec_timeout 600``` or change the timeout for individual qubes with `qvm-prefs`

Revision #15

Edited on
2021-09-30
Edited by user
ddevz
**Configuring the sys-log qube to collect all the logs** **Setting up a sys-log qube to collect all the logs**
(Note: you could do both) (Note: you could do both. A thread has been made for discussing [if there is a benefit to doing both](https://forum.qubes-os.org/t/what-risks-do-we-add-to-a-qube-by-enabling-sys-firewall-networking-instead-of-none/6649https://forum.qubes-os.org/t/what-risks-do-we-add-to-a-qube-by-enabling-sys-firewall-networking-instead-of-none/6649) )
binds+=( '/run/log/journal' )

Revision #14

Edited on
2021-09-30
Edited by user
ddevz
(side note: it should be possible to add a copy of this section pointed to sys-log-forward to allow 2 seperate logging systems) (side note: it should be possible to add a copy of this section pointed to sys-log-local to allow 2 seperate logging systems)
1. Create the sys-log qube Example (typed from dom0): 1. Create a sys-log qube with networking: Example (typed from dom0):
Or Create a sys-log-local qube with no networking: Example (typed from dom0): ```qvm-create --template debian-10 --label-purple --property netvm=none --property provides_network=True sys-log-local``` (Note: you could do both)
1. TODO: put instructions for either enabling networking on the logVM, *or* maybe it's possible to make a separate sys-log-forward qube that has networking that also gets a copy of the logs from the qubes-rpc service, allowing us to leave sys-log with no networking?

Revision #13

Edited on
2021-09-30
Edited by user
ddevz
Now that you know why you want logs, you are ready to make decisions relating to them and we can move on to how to set up a logging qube **If it has not been integrated upstream** If you read this before the patch gets integrated upstream and distributed out through the normal update mechanisms, then you can install it yourself by doing this: * Start the template that you intend to use for the qube to log to. Now that you know why you want logs, you are ready to make decisions relating to them and we can move on to how to set up a logging qube **Install qubes.Syslog file** *(Note: You only need to do this if the patch has not been integrated upstream and distributed out through the normal update mechanisms yet.)* * Start the template that the qube that will collect the logs will use as its template.
If it has been integrated upstream and you are up to date, then the file wil already be there, and this step is unnecicary. **Setting up your templateVMs to log to logVM** As stated before, if it has been integrated upstream and you are up to date, then the file wil already be there, and this step is unnecicary. **Setting up your templateVMs to log to the sys-log logVM**
**Configuring the logVM to read the logs** 1. Option: Networking: Here we will be talking about creating a sys-log qube with no networking. You also have the option to create a logging qube with networking that can forward the logs to a external logging system (that I recommend calling this qube sys-log-forwarding so you have the option to have both logging qubes) 1. Option - VM type: Decide if you want to use a AppVM that uses a template, or create a standalone VM Note: While rsyslog is not strictly necessary for the logVM, you probably will want to use it. **Configuring the sys-log qube to collect all the logs** 1. Create the sys-log qube Example (typed from dom0): ```qvm-create --template debian-10 --label-purple --property netvm=sys-firewall --property provides_network=True sys-log``` Alternatives: * you could create it as a standalone qube instead of a AppVM that uses a template Notes: * We are basically checking the "provides network" box for the new qube, even though the qube does not provide networking, (or if creating sys-log-local does not even *have* networking. That checkbox is what determines if the qube is classified as a "service" qube in the menu or not.) Note: While rsyslog is not strictly necessary for the logVM, you probably will want to use it.
3. Create a new AppVM service qube called sys-log 4. Check the "provides network" box for the new qube, even though the qube does not provide networking, or even have networking. That checkbox is what determines if the qube is classified as a "service" qube or not.
5. The logs in sys-log will still dissapear after it reboots, so now we make the configuration and logs persistant 5. The logs in sys-log will still disappear after it reboots, so now we make the configuration and logs persistent
``` ``` 6. Networking options: * If you are not going to forward the logs to a external logging system, then instead of a sys-log qube, you could make a sys-log-local qube that has no networking. * If you are going to forward the logs but are concerned about the logging qube being attacked *from* the network, then you could create both sys-log with networking, and sys-log-local that has no networking.
Having a logging system outside of dom0 gives us a opportunity to have a copy of the logs that have the potential to keep a untained copy of a dom0 comprimise. Note that sys-log reads data from every qube. This seems like a possible attack vector. While they try to midigate that potential in the patches, it seems like a possible attack vector that can't be eliminated while still being functional. Also note that this same data will get forwarded to the external log. Having a logging system outside of dom0 gives us a opportunity to have a copy of the logs that have the potential to keep a untained copy of a dom0 compromise. Note that sys-log reads data from every qube. This seems like a possible attack vector. While they try to mitigate that potential in the patches, it seems like a possible attack vector that can't be eliminated while still being functional. Also note that this same data will get forwarded to the external log.

Revision #12

Edited on
2021-09-29
Edited by user
ddevz
* Turn off that template * Turn off that template If it has been integrated upstream and you are up to date, then the file wil already be there, and this step is unnecicary.
You need to do this for each template that you want all the appVMs that use that template to send logs to sys-log:
3. Then shut the template down and reboot any qubes you want to use it. 3. Then shut the template down and reboot any qubes you want to be using it.
(Note: if it's using a template you just added the rsyslog configuration to, then you probably need to disable the /etc/rsyslog.d/qubes_syslog.conf file or it could create a feedback loop. :)
2. If sys-log is using a template you just added the rsyslog configuration to, then you probably need to disable the /etc/rsyslog.d/qubes_syslog.conf file or it could create a feedback loop. :) (we could put here a explanation on how to disable it via /rw bind)

Revision #11

Edited on
2021-09-29
Edited by user
ddevz
**Enabling logging in qubes** TODO: put instructions on git cloneing the syslog branch of https://github.com/3hhh/qubes-core-agent-linux.git instead of the normal version, then compiling the qubes package, and installing the new qubes package. probably link to [build instructions](https://www.qubes-os.org/doc/qubes-iso-building/#build-using-manual-steps) (then remove this section once it's integrated upstream) **If it has not been integrated upstream** If you read this before the patch gets integrated upstream and distributed out through the normal update mechanisms, then you can install it yourself by doing this: * Start the template that you intend to use for the qube to log to. * Copy the file to https://github.com/QubesOS/qubes-core-agent-linux/blob/009e973b1eb3bbb14df59a25bf52a31d5f5f5043/qubes-rpc/qubes.Syslog to be /etc/qubes-rpc/qubes.Syslog in the template. * Turn off that template
(Other options: If your planning to log all qubes, you could do: `@anyvm receivingVM allow`, or if your just testing, you could do: `@anyvm @anyvm ask`) 4. Copy the file to https://github.com/QubesOS/qubes-core-agent-linux/blob/009e973b1eb3bbb14df59a25bf52a31d5f5f5043/qubes-rpc/qubes.Syslog to be /etc/qubes-rpc/qubes.Syslog in the sys-log qube. (Other options: If your planning to log all qubes, you could do: `@anyvm receivingVM allow`, or if your just testing, you could do: `@anyvm @anyvm ask`)
- add these lines: - add this line:
binds+=( '/etc/qubes-rpc/qubes.Syslog' )

Revision #10

Edited on
2021-09-27
Edited by user
ddevz
1.a it should already be installed in debian based distributions, but if you want to check, you can with: `apt-cache policy rsyslog`. If it's not there, you can install it in debian with: `apt-get install rsyslog` 1.b You can install it in fedora based distributions with: `dnf install rsyslog` 1.c Windows: one option is: `choco install nxlog` - it should already be installed in debian based distributions, but if you want to check, you can with: `apt-cache policy rsyslog`. If it's not there, you can install it in debian with: `apt-get install rsyslog` - You can install it in fedora based distributions with: `dnf install rsyslog` - Windows: one option is: `choco install nxlog`
5.a do: `sudo mkdir -p /rw/config/qubes-bind-dirs.d` 5.b do: `sudo nano /rw/config/qubes-bind-dirs.d/50_user.conf` 5.c add these lines: ``` binds+=( '/etc/qubes-rpc/qubes.Syslog' ) binds+=( '/var/log' ) ``` - do: `sudo mkdir -p /rw/config/qubes-bind-dirs.d` - do: `sudo nano /rw/config/qubes-bind-dirs.d/50_user.conf` - add these lines: ``` binds+=( '/etc/qubes-rpc/qubes.Syslog' ) binds+=( '/var/log' ) ```

Revision #9

Edited on
2021-09-27
Edited by user
ddevz
``` sendingVM receivingVM allow ``` (Other options: If your planning to log all qubes, you could do: `@anyvm receivingVM allow`, or if your just testing, you could do: `@anyvm @anyvm ask`) ``` sendingVM receivingVM allow ``` (Other options: If your planning to log all qubes, you could do: `@anyvm receivingVM allow`, or if your just testing, you could do: `@anyvm @anyvm ask`)
``` binds+=( '/etc/qubes-rpc/qubes.Syslog' ) binds+=( '/var/log' ) ``` ``` binds+=( '/etc/qubes-rpc/qubes.Syslog' ) binds+=( '/var/log' ) ```

Revision #8

Edited on
2021-09-27
Edited by user
ddevz
1. Create a new AppVM service qube called sys-log. While rsyslog is not strictly necicary for the logVM, you probably will want to be basing the sys-log qube on a debian or fedora template that you just verified that rsyslog is installed on. 1. Option: Networking: Here we will be talking about creating a sys-log qube with no networking. You also have the option to create a logging qube with networking that can forward the logs to a external logging system (that I recommend calling this qube sys-log-forwarding so you have the option to have both logging qubes) 1. Option - VM type: Decide if you want to use a AppVM that uses a template, or create a standalone VM (Note: if it's using a template you just added the rsyslog configuration to, then you probably need to disable the /etc/rsyslog.d/qubes_syslog.conf file or it could create a feedback loop. :) Note: While rsyslog is not strictly necessary for the logVM, you probably will want to use it. 3. Create a new AppVM service qube called sys-log 4. Check the "provides network" box for the new qube, even though the qube does not provide networking, or even have networking. That checkbox is what determines if the qube is classified as a "service" qube or not.
3. Copy the file to https://github.com/QubesOS/qubes-core-agent-linux/blob/009e973b1eb3bbb14df59a25bf52a31d5f5f5043/qubes-rpc/qubes.Syslog to be /etc/qubes-rpc/qubes.Syslog in the sys-log qube. 4. Copy the file to https://github.com/QubesOS/qubes-core-agent-linux/blob/009e973b1eb3bbb14df59a25bf52a31d5f5f5043/qubes-rpc/qubes.Syslog to be /etc/qubes-rpc/qubes.Syslog in the sys-log qube.
- Can more then one logging qube read full copies of all the logs being fed to the new service? (Update: Looks like the answer to this is yes!)

Revision #7

Edited on
2021-09-26
Edited by user
ddevz
5. TODO: put here instructions on how to bind-mount the new /etc/qubes-rpc/qubes.Syslog file to /rw 4. TODO: put here instructions on how to bind-mount the /var/logs directory to file to /rw , so they dont still dissapear after a reboot :) (Note: link to instructions at https://www.qubes-os.org/doc/bind-dirs/ ?) 5. The logs in sys-log will still dissapear after it reboots, so now we make the configuration and logs persistant 5.a do: `sudo mkdir -p /rw/config/qubes-bind-dirs.d` 5.b do: `sudo nano /rw/config/qubes-bind-dirs.d/50_user.conf` 5.c add these lines: ``` binds+=( '/etc/qubes-rpc/qubes.Syslog' ) binds+=( '/var/log' ) ```

Revision #6

Edited on
2021-09-26
Edited by user
ddevz
4. TODO: put here instructions on how to bind-mount the /var/logs directory to file to /rw , so they dont still dissapear after a reboot :) 4. TODO: put here instructions on how to bind-mount the /var/logs directory to file to /rw , so they dont still dissapear after a reboot :) (Note: link to instructions at https://www.qubes-os.org/doc/bind-dirs/ ?)

Revision #5

Edited on
2021-09-26
Edited by user
ddevz
* Create a new AppVM service qube called sys-log. It should be based on a debian or fedora template that you just installed rsyslog on. * Set the qubes policy in dom0 by creating a file at `/etc/qubes-rpc/policy/qubes.Syslog` containing: 1. Create a new AppVM service qube called sys-log. While rsyslog is not strictly necicary for the logVM, you probably will want to be basing the sys-log qube on a debian or fedora template that you just verified that rsyslog is installed on. 2. Set the qubes policy in dom0 by creating a file at `/etc/qubes-rpc/policy/qubes.Syslog` containing:
(Other options: If your planning to log all qubes, you could do: `@anyvm receivingVM allow`, or if your just testing, you could do: `@anyvm @anyvm ask`) * TODO: put here instructions on how to configure the sys-log rsyslog file to recieve the log messages from all qubes, including instructions on how to bind-mount the new /etc file to /rw (Other options: If your planning to log all qubes, you could do: `@anyvm receivingVM allow`, or if your just testing, you could do: `@anyvm @anyvm ask`) 3. Copy the file to https://github.com/QubesOS/qubes-core-agent-linux/blob/009e973b1eb3bbb14df59a25bf52a31d5f5f5043/qubes-rpc/qubes.Syslog to be /etc/qubes-rpc/qubes.Syslog in the sys-log qube. 4. Test it! Generate some logs in the sending VM by typing `logger "hello world"` in a appVM that has been rebooted and is using your new modified template. Then notice that the message can be observed in the `journalctl -b0` of the sys-log qube! 5. TODO: put here instructions on how to bind-mount the new /etc/qubes-rpc/qubes.Syslog file to /rw 4. TODO: put here instructions on how to bind-mount the /var/logs directory to file to /rw , so they dont still dissapear after a reboot :)
- Can more then one logging qube read full copies of all the logs being fed to the new service? - Can more then one logging qube read full copies of all the logs being fed to the new service? (Update: Looks like the answer to this is yes!)

Revision #4

Edited on
2021-09-26
Edited by user
ddevz
2. Configure rsyslog by modifying your rsyslog configuration file at /etc/rsyslog.d/qubes_syslog.conf as described at [https://github.com/QubesOS/qubes-core-agent-linux/blob/009e973b1eb3bbb14df59a25bf52a31d5f5f5043/qubes-rpc/qubes.Syslog#L50-L67 ](https://github.com/QubesOS/qubes-core-agent-linux/blob/009e973b1eb3bbb14df59a25bf52a31d5f5f5043/qubes-rpc/qubes.Syslog#L50-L67) except in the line, `binary="/usr/sbin/runuser -u user -- /usr/bin/qrexec-client-vm work qubes.Syslog"`, change `work` to `sys-log` 2. Configure rsyslog by modifying your rsyslog configuration file at /etc/rsyslog.d/qubes_syslog.conf as described at [https://github.com/QubesOS/qubes-core-agent-linux/blob/009e973b1eb3bbb14df59a25bf52a31d5f5f5043/qubes-rpc/qubes.Syslog#L50-L67 ](https://github.com/QubesOS/qubes-core-agent-linux/blob/009e973b1eb3bbb14df59a25bf52a31d5f5f5043/qubes-rpc/qubes.Syslog#L50-L67) except in the line, ```binary="/usr/sbin/runuser -u user -- /usr/bin/qrexec-client-vm work qubes.Syslog"``` , change `work` to `sys-log` so it looks like: ```binary="/usr/sbin/runuser -u user -- /usr/bin/qrexec-client-vm work qubes.Syslog"``` (side note: it should be possible to add a copy of this section pointed to sys-log-forward to allow 2 seperate logging systems)

Revision #3

Edited on
2021-09-26
Edited by user
ddevz
1. Install rsyslog 1.a debian based distributions: apt-get install rsyslog 1.b fedora based distributions: dnf install rsyslog 1.c windows: one option is: choco install nxlog 1. Make sure rsyslog is installed in the template. 1.a it should already be installed in debian based distributions, but if you want to check, you can with: `apt-cache policy rsyslog`. If it's not there, you can install it in debian with: `apt-get install rsyslog` 1.b You can install it in fedora based distributions with: `dnf install rsyslog` 1.c Windows: one option is: `choco install nxlog`
except in the line, `binary="/usr/sbin/runuser -u user -- /usr/bin/qrexec-client-vm work qubes.Syslog"`, change `work` to `sys-log`

Revision #2

Edited on
2021-09-26
Edited by user
ddevz
2. Configure rsyslog by putting in the file /etc/rsyslog.d/qubes_syslog.conf the following: > module(load="omprog") template(name="qubes_syslog" type="string" string="<%PRI%>%TIMESTAMP:::date-rfc3339% %syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n") ruleset(name="qubes") { action( type="omprog" binary="/usr/sbin/runuser -u user -- /usr/bin/qrexec-client-vm work qubes.Syslog" template="qubes_syslog" ) } #apply your filtering here (*.* just forwards all logs) *.* call qubes (it appears that that got mangled by the forum parser, so you are better off copying it from the comments from the file /etc/qubes-rpc/qubes.Syslog on your system, or from github here: [qubes-rpc/qubes.Syslog](https://github.com/QubesOS/qubes-core-agent-linux/pull/321/files/c47f9ad229255ce1eff3257a65df95503988e242#diff-083a1442378f92eff4c58f5ea3e626b4095c21d45aff5a3f7f43c542ce724fe2) Remember to then shut the template down and reboot any qubes you want to use it. 3. Add instructions specific windows instructions for configuring nxlog? 2. Configure rsyslog by modifying your rsyslog configuration file at /etc/rsyslog.d/qubes_syslog.conf as described at [https://github.com/QubesOS/qubes-core-agent-linux/blob/009e973b1eb3bbb14df59a25bf52a31d5f5f5043/qubes-rpc/qubes.Syslog#L50-L67 ](https://github.com/QubesOS/qubes-core-agent-linux/blob/009e973b1eb3bbb14df59a25bf52a31d5f5f5043/qubes-rpc/qubes.Syslog#L50-L67) 3. Then shut the template down and reboot any qubes you want to use it. 4. TODO: Add instructions specific windows instructions for configuring nxlog?
* TODO: put here instructions for setting the qubes-rpc policy (I.E. the permissions) for sys-log to recieve the log messages * Set the qubes policy in dom0 by creating a file at `/etc/qubes-rpc/policy/qubes.Syslog` containing: ``` sendingVM receivingVM allow ``` (Other options: If your planning to log all qubes, you could do: `@anyvm receivingVM allow`, or if your just testing, you could do: `@anyvm @anyvm ask`)