20210814-Re_GSoC Port Forwarding-1106.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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>Giulio <giulio@gmx.com></td></tr><tr><td><div class="headerdisplayname" style="display:inline;">Data: </div>14/08/2021, 18:33</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>Marek Marczykowski-Górecki &lt;marmarek@invisiblethingslab.com&gt;</td></tr><tr><td><div class="headerdisplayname" style="display:inline;">CC: </div>Frédéric Pierret &lt;frederic.pierret@qubes-os.org&gt;</td></tr></table><br>
  9. <div class="moz-text-flowed" style="font-family: -moz-fixed; font-size: 14px;" lang="x-unicode">Hello,
  10. <br>Sorry for the late reply.
  11. <br>While everything cli related is almost ready, I am having some issues on
  12. the actual implementation of the iptables/nft rules. I see that in the
  13. current state, it seems like Qubes is using both as also stated in [1].
  14. <br>However, in the core-agent-linux source code, if the 'nft' binary is
  15. available&nbsp; that is the only one that gets invoked. Furthermore, there
  16. are differences on the iptables backend depending on templates as
  17. reported in [2].
  18. <br>I am a bit stuck in understanding which rule to put where in order to
  19. have consistency across templates and between iptables/nft, also because
  20. if I blindly implement the rules suggested in [1] they will not actually
  21. work since most of the time iptables is not invoked at all.
  22. <br>I also checked [3], however it is very similar to the instructions in
  23. [1] which leads to the same problems.
  24. <br>Are we able to write working nft forwarding rules without invoking
  25. iptables at all? If yes, could you heml me determine which ones?
  26. <br>
  27. <br>You can see in [4] how I organized the forwarding mechanism. All the
  28. necessary information, as well as ipv4/ipv6 support should already be in
  29. the 'prepare_forward_rules' function meaning that only the actual
  30. building syntax is left.
  31. <br>
  32. <br>For simplicity you can look at the other changes at [5] and at [6].
  33. <br>
  34. <br>Cheers
  35. <br>Giulio
  36. <br>
  37. <br>
  38. <br>[1] - <a class="moz-txt-link-freetext" href="https://www.qubes-os.org/doc/firewall/">https://www.qubes-os.org/doc/firewall/</a>
  39. <br>[2] - <a class="moz-txt-link-freetext" href="https://github.com/QubesOS/qubes-issues/issues/5031">https://github.com/QubesOS/qubes-issues/issues/5031</a>
  40. <br>[3] - <a class="moz-txt-link-freetext" href="https://gist.github.com/fepitre/941d7161ae1150d90e15f778027e3248">https://gist.github.com/fepitre/941d7161ae1150d90e15f778027e3248</a>
  41. <br>[4] -
  42. <a class="moz-txt-link-freetext" href="https://github.com/lsd-cat/qubes-core-agent-linux/compare/f24ca2c..3e944af">https://github.com/lsd-cat/qubes-core-agent-linux/compare/f24ca2c..3e944af</a>
  43. <br>[5] - <a class="moz-txt-link-freetext" href="https://github.com/lsd-cat/qubes-core-admin/compare/6a1570b..6e3e250">https://github.com/lsd-cat/qubes-core-admin/compare/6a1570b..6e3e250</a>
  44. <br>[6] -
  45. <a class="moz-txt-link-freetext" href="https://github.com/lsd-cat/qubes-core-admin-client/compare/1a2ce72..a17853b">https://github.com/lsd-cat/qubes-core-admin-client/compare/1a2ce72..a17853b</a>
  46. <br></div></body>
  47. </html>
  48. </table></div>