mirror of
https://github.com/QubesOS/qubes-doc.git
synced 2024-12-26 15:59:24 -05:00
QubesFirewall changed
Inter-AppVM networking
This commit is contained in:
parent
a673d21c1a
commit
70871baf24
@ -27,3 +27,29 @@ In order to edit rules for a given domain, select this domain in the Qubes Manag
|
||||
Note that if you specify a rule by DNS name it will be resolved to IP(s) *at the moment of applying the rules*, and not on the fly for each new connection. This means it will not work for serves using load balancing. More on this in the message quoted below.
|
||||
|
||||
Alternatively, one can use the `qvm-firewall` command from Dom0 to edit the firewall rules by hand:
|
||||
|
||||
Enabling networking between two AppVMs
|
||||
--------------------------------------
|
||||
|
||||
Normally any networking traffic between VMs is prohibited for security reasons. However, in special situations, one might one to selectively allow specific AppVMs to be able to establish networking connectivity between each other. For example, this might come useful in some development work, when one wants to test networking code, or to allow file exchange between HVM domains (which do not have Qubes tools installed) via SMB/scp/NFS protocols.
|
||||
|
||||
In order to allow networking between AppVM A and B follow those steps:
|
||||
|
||||
- Make sure both A and B are connected to the same firewall vm (by default all AppVMs use the same firewall VM).
|
||||
- Note the Qubes IP addresses assigned to both AppVMs. This can be done using the `qvm-ls -n` command, or via the Qubes Manager preferences pane for each AppVM.
|
||||
- Start both AppVMs, and also open a terminal in the firewall VM
|
||||
- In the firewall VM's terminal enter the following iptables rule:
|
||||
|
||||
``` {.wiki}
|
||||
sudo iptables -I FORWARD 2 -s <IP address of A> -d <IP address of B> -j ACCEPT
|
||||
```
|
||||
|
||||
- Now you should be able to reach the AppVM B from A -- test it using e.g. ping issues from AppVM A. Note however, that this doesn't allow you to reach A from B -- for this you would need another rule, with A and B addresses swapped.
|
||||
- If everything works as expected, then the above iptables rule(s) should be written into firewall VM's `qubes_firewall_user_script` script which is run on every firewall update. This is necessary, because Qubes orders every firewall VM to update all the rules whenever new VM is started in the system. If we didn't enter our rules into this "hook" script, then shortly our custom rules would disappear and inter-VM networking would stop working. Here's an example how to update the script (note that, by default, there is no script file present, so we likely will be creating it, unless we had some other custom rules defines earlier in this firewallvm):
|
||||
|
||||
``` {.wiki}
|
||||
[user@firewallvm ~]$ sudo bash
|
||||
[root@firewallvm user]# echo "iptables -I FORWARD 2 -s 10.137.2.25 -d 10.137.2.6 -j ACCEPT" >> /rw/config/qubes_firewall_user_script
|
||||
```
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user