20210714-Re_GSoC Port Forwarding-13935.html 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <html>
  2. <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  3. <title>Re: GSoC Port Forwarding</title>
  4. <link rel="important stylesheet" href="">
  5. <style>div.headerdisplayname {font-weight:bold;}
  6. </style></head>
  7. <body>
  8. <table border=0 cellspacing=0 cellpadding=0 width="100%" class="header-part1"><tr><td><div class="headerdisplayname" style="display:inline;">Oggetto: </div>Re: GSoC Port Forwarding</td></tr><tr><td><div class="headerdisplayname" style="display:inline;">Mittente: </div>Frédéric Pierret &lt;frederic.pierret@qubes-os.org&gt;</td></tr><tr><td><div class="headerdisplayname" style="display:inline;">Data: </div>14/07/2021, 12:10</td></tr></table><table border=0 cellspacing=0 cellpadding=0 width="100%" class="header-part2"><tr><td><div class="headerdisplayname" style="display:inline;">A: </div>Giulio &lt;giulio@gmx.com&gt;, Marek Marczykowski-Górecki &lt;marmarek@invisiblethingslab.com&gt;</td></tr></table><br>
  9. <div class="moz-text-flowed" style="font-family: -moz-fixed; font-size: 14px;" lang="x-unicode">Hi,
  10. <br>
  11. <br>Le 7/13/21 à 3:56 PM, Giulio a écrit :
  12. <br><blockquote type=cite style="color: #007cff;">Hi,
  13. <br>
  14. <br>Il 29/06/2021 03:31, Marek Marczykowski-Górecki ha scritto:
  15. <br><blockquote type=cite style="color: #007cff;">Yes, preparing rules in firewall.py sounds like a good idea. A new
  16. <br>function is a good idea too. But note that for 'external' rules you need
  17. <br>to apply them at several places (sys-net, sys-firewall etc). They aren't
  18. <br>necessarily will be the same.
  19. <br>I'd recommend getting an example, and writing down all the rules that
  20. <br>should be applied, in all related VMs (specific iptables/nft commands).
  21. <br>You have mostly done this part already.
  22. <br>This part you can also test manually - really add those rules
  23. <br>manually and check if everything works as it should. This way you ensure
  24. <br>the rule set is sufficient.
  25. <br>
  26. <br>Then, write down QubesDB entries that describe them - carefully matching
  27. <br>which information in the rule is built from which information in qdb
  28. <br>entry.
  29. <br>With that information, you know what qdb entries you need to produce for
  30. <br>each VM, and should be easier to design this extra function/functions -
  31. <br>especially, you'll see what input data such function needs and how many
  32. <br>different rules it needs to return.
  33. <br>
  34. <br></blockquote>
  35. <br>I tried writing a possible implementation to see how it could work and
  36. <br>also to get an initial feedback. Since in the past week I had no access
  37. <br>to my test machine, I just fixed the last things today and seems that
  38. <br>overall the implemented parts are working (up to writing the rules with
  39. <br>the correctly IPs in the appropriate agent databases).
  40. <br>
  41. <br>Here are the repositories <a class="moz-txt-link-freetext" href="https://git.lsd.cat/Qubes">https://git.lsd.cat/Qubes</a>
  42. <br>
  43. <br>Here is a list of what has yet to be done:
  44. <br>1) Lot of testing and writing tests
  45. <br>2) Any modification to the agent (such as applying the rules)
  46. <br>3) "srchost" parameter support
  47. <br>4) GUI
  48. <br>5) Find a way to display the chain of rules in the qvm-firewall of every
  49. <br>VM involved since as of now it is displayed only in the VM for which the
  50. <br>rule was set
  51. <br>
  52. <br>Here is a list of what should work:
  53. <br>1) Adding and deleting forward rules, both internal and external, via
  54. <br>qvm-firewall. Also basic checks of the consistency of rules and required
  55. <br>options should be in place
  56. <br>2) Display of forward rules via qvm-firewall
  57. <br>3) Persistence and resume of forward rules in firewall.xml
  58. <br>4) Correct distribution of the required rules in the network chain in net.py
  59. <br>
  60. <br>
  61. <br>Overall I tried getting the most possible from already existing code in
  62. <br>order not to change the style and introduce as few changes as possible.
  63. <br>Without having you correct the code step by step, before going forward
  64. <br>with the agent I would like to have a feedback if the coding style seems
  65. <br>consistent enough with yours and especially if the implementation in
  66. <br>net.py of the distributions of the rules matches your expectations.
  67. <br>
  68. <br>My changes are only in core-admin and core-admin-client for now.
  69. <br>
  70. <br>Cheers
  71. <br>Giulio
  72. <br></blockquote>
  73. <br>I will have a look to your work probably in the afternoon.
  74. <br>
  75. <br>Just a question, any reason for hosting your work elsewhere than on GitHub? For example, that would be easier for us to review your code directly on GitHub (adding comments, tracking easily progression etc). Also, I've briefly checked, a good practice is to not work on master branch directly. I encourage you to use a separate branch named as you want.
  76. <br>
  77. <br>Best regards,
  78. <br>Frédéric
  79. <br>
  80. <br></div></body>
  81. </html>
  82. </table></div>