-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wireguard + Streisand in StandaloneVM Qubes 4.0 #23
Comments
This is working fine using Debian 9 VM and a Mullvad wg server; no noticeable delays on twitter, youtube, etc. |
My problem is with Streisand WireGuard. Streisand WireGuard Client Profile for more info:
[1] https://mullvad.net/en/guides/qubes-os-4-and-mullvad-vpn/ |
I'm having the same issue while on wireguard. Strangely I'm not able to reproduce this while on openvpn. Its definitely something in the iptables that is tampering with the traffic from other Appvms. Although I don't know what rule is causing this erratic behavior this happens randomly, sometimes I'm able to connect to the same site without any issues. Any ideas what might be causing this? |
I think this could be due to differing MTU size and the need for packet fragmentation. This post describes a solution where vif (downstream vm) interfaces are set to MTU of 1420 to match wireguard: https://groups.google.com/d/msgid/qubes-users/e77baa808b600ce67de9a415a4b8330e%40disroot.org |
I use following steps to install wireguard on Qubes 4.0:
1-
Create a Standalone VM(sys-wireguard) (based on template (fedora-28)) with "provides network"
2-
Switch it to HVM mode and kernel="" (HVM mode should allow it to boot)
in dom0:
qvm-prefs sys-wireguard
qvm-prefs sys-wireguard kernel ''
3-
Install Wireguard
sudo dnf copr enable jdoss/wireguard
sudo dnf install wireguard-dkms wireguard-tools
4-
Move the client configuration file into the correct directory:
sudo sh -c 'umask 077; mkdir -p /etc/wireguard; cat > /etc/wireguard/card-upgrade.conf' < ~/Downloads/card-upgrade.conf
5
Firewall Anti-leak & DNS Setup
Add the following to /rw/config/qubes-ip-change-hook
#!/bin/sh
. /var/run/qubes/qubes-ns
vpndns1=10.192.122.1 # <-- The dns of wireguard in /etc/wireguard/card-upgrade.conf
iptables -F OUTPUT
iptables -I FORWARD -o eth0 -j DROP
iptables -I FORWARD -i eth0 -j DROP
iptables -F PR-QBS -t nat
iptables -A PR-QBS -t nat -d $NS1 -p udp --dport 53 -j DNAT --to $vpndns1
iptables -A PR-QBS -t nat -d $NS1 -p tcp --dport 53 -j DNAT --to $vpndns1
iptables -A PR-QBS -t nat -d $NS2 -p udp --dport 53 -j DNAT --to $vpndns1
iptables -A PR-QBS -t nat -d $NS2 -p tcp --dport 53 -j DNAT --to $vpndns1
...then make it executable with chmod +x
sudo chmod +x /rw/config/qubes-ip-change-hook
sudo /rw/config/qubes-ip-change-hook
6-
sudo wg-quick up card-upgrade
My Problem is that in the AppVM which its NetVM is sys-wireguard, the loading of some sites like twitter takes too long than usual (about 2 minutes to be completely loaded)
and sometimes they aren't loaded at all.
some other sites like youtube load very fast and without problem.
I don't have such problem when using the AppVM which its NetVM is sys-openvpn (with the same server (streisand)).
More info about dns leak:
By my own testing, there is no dns leak on wireguard. (I tested both in sys-net and
sys-wireguard by using wireshark).
Is there any problem with IPtables rules that wireguard can't load some sites like twitter?
By the way, this wireguard account (card-upgrade) has no problem in ubuntu.
https://github.com/tasket/Qubes-vpn-support/wiki/Wireguard-VPN-connections-in-Qubes-OS
#10
https://github.com/StreisandEffect/streisand
The text was updated successfully, but these errors were encountered: