Fixes rules

This commit is contained in:
Giulio 2021-08-20 15:30:40 +02:00
parent 2252d47f99
commit 459b9800ea

View File

@ -163,7 +163,7 @@ It is important to note that in the last case, it is just a standard case of int
### Implementation Roadmap ### Implementation Roadmap
1. ✔️ In `core-admin-client/qubesadmin/firewall.py` firewall.py > The code 1. ✔️ In `core-admin-client/qubesadmin/firewall.py` firewall.py -> The code
needs to support the new options for the rule (action=forward needs to support the new options for the rule (action=forward
frowardtype=<internal/external> srcports=443-443 srchosts=0.0.0.0/0 frowardtype=<internal/external> srcports=443-443 srchosts=0.0.0.0/0
2. ✔️ In `core-admin/qubes/firewall.py` -> The code needs to support the same 2. ✔️ In `core-admin/qubes/firewall.py` -> The code needs to support the same
@ -177,6 +177,7 @@ building the correct syntax for iptables or nft and the actual execution
5. ❌ Tests 5. ❌ Tests
6. ❌ GUI 6. ❌ GUI
Steps 1-3 are completed and needs the automated test. Step 4 has still some issues but it is in its final stages. 5 will be worked on in the following weeks, since it is mandatory before merging anything. 6 can come at a later stage. Steps 1-3 are completed and needs the automated test. Step 4 has still some issues but it is in its final stages. 5 will be worked on in the following weeks, since it is mandatory before merging anything. 6 can come at a later stage.
### Known Issues ### Known Issues
@ -209,12 +210,9 @@ $ qvm-firewall personal add action=forward forwardtype=external scrports=22-22 p
First, a table for the forwarding rules is created: First, a table for the forwarding rules is created:
``` ```
flush chain {family} qubes-firewall-forward prerouting
flush chain {family} qubes-firewall-forward postrouting
table {family} qubes-firewall-forward { table {family} qubes-firewall-forward {
chain postrouting { chain postrouting {
type nat hook postrouting priority srcnat; policy accept; type nat hook postrouting priority srcnat; policy accept;
masquerade
} }
chain prerouting { chain prerouting {
type nat hook prerouting priority dstnat; policy accept; type nat hook prerouting priority dstnat; policy accept;