corrad1nho / qomui

Qomui (Qt OpenVPN Management UI)
GNU General Public License v3.0
554 stars 56 forks source link

Disconnecting VPN often prevents internet access #86

Open Victor239 opened 5 years ago

Victor239 commented 5 years ago

I use a WireGuard VPN connection most of the day but I often find that when I disconnect from it I cannot access the internet without it. In the Options the only setting I have checked is autoconnect/reconnect.

I'm using 0.8.2, below is the debug log for when I couldn't access the internet with Qomui closed, but I could when it was connected, and lost it again when disconnected:

2019-03-12 15:12:43,424 - DEBUG - Successfully connected to qomui-service via DBus
2019-03-12 15:12:43,425 - DEBUG - Restored backup of /etc/resolv.conf
2019-03-12 15:12:43,426 - DEBUG - Created backup of /etc/resolv.conf
2019-03-12 15:12:43,438 - INFO - Qomui version 0.8.2
2019-03-12 15:12:43,439 - WARNING - [Errno 2] No such file or directory: '/home/boss/.qomui/bypass_apps.json': Could not open /home/boss/.qomui/bypass_apps.json
2019-03-12 15:12:43,440 - WARNING - [Errno 2] No such file or directory: '/home/boss/.qomui/profile.json': Could not open /home/boss/.qomui/profile.json
2019-03-12 15:12:43,441 - INFO - Total number of server: 5
2019-03-12 15:12:43,537 - ERROR - Could not identify default gateway for ipv6 - no network connectivity
2019-03-12 15:12:43,538 - DEBUG - Network interface - ipv4: enx00e04cf03c0e
2019-03-12 15:12:43,539 - DEBUG - Default gateway - ipv4: 192.168.0.1
2019-03-12 15:12:43,539 - DEBUG - Network interface - ipv6: None
2019-03-12 15:12:43,540 - DEBUG - Default gateway - ipv6: None
2019-03-12 15:12:43,553 - INFO - Detected new network connection
2019-03-12 15:12:43,555 - DEBUG - Created backup of /etc/resolv.conf
2019-03-12 15:12:43,555 - DEBUG - Restored backup of /etc/resolv.conf
2019-03-12 15:12:43,558 - DEBUG - Restored backup of /etc/resolv.conf
2019-03-12 15:12:43,560 - INFO - Connecting to azirevpn-uk1....
2019-03-12 15:12:43,567 - DEBUG - New thread for OpenVPN process started
2019-03-12 15:12:43,571 - DEBUG - iptables: ['-I', 'OUTPUT', '-d', dbus.String('83.97.18.60'), '-j', 'ACCEPT'] already exists
2019-03-12 15:12:43,576 - DEBUG - No pre script defined for Azire Wireguard
2019-03-12 15:12:43,583 - WARNING - iptables: failed to apply ['-t', 'mangle', '-D', 'OUTPUT', '-m', 'cgroup', '--cgroup', '0x00110011', '-j', 'MARK', '--set-mark', '11']
2019-03-12 15:12:43,586 - DEBUG - iptables: applied ['-I', 'INPUT', '2', '-i', 'wg_qomui', '-j', 'ACCEPT']
2019-03-12 15:12:43,591 - WARNING - iptables: failed to apply ['-t', 'nat', '-D', 'POSTROUTING', '-m', 'cgroup', '--cgroup', '0x00110011', '-o', 'enx00e04cf03c0e', '-j', 'MASQUERADE']
2019-03-12 15:12:43,593 - DEBUG - iptables: applied ['-I', 'OUTPUT', '2', '-o', 'wg_qomui', '-j', 'ACCEPT']
2019-03-12 15:12:43,600 - WARNING - iptables: failed to apply ['-D', 'OUTPUT', '-m', 'cgroup', '--cgroup', '0x00110011', '-j', 'ACCEPT']
2019-03-12 15:12:43,602 - DEBUG - iptables: applied ['-I', 'INPUT', '2', '-i', 'wg_qomui', '-j', 'ACCEPT']
2019-03-12 15:12:43,609 - WARNING - iptables: failed to apply ['-D', 'INPUT', '-m', 'cgroup', '--cgroup', '0x00110011', '-j', 'ACCEPT']
2019-03-12 15:12:43,611 - DEBUG - iptables: applied ['-I', 'OUTPUT', '2', '-o', 'wg_qomui', '-j', 'ACCEPT']
2019-03-12 15:12:43,618 - WARNING - iptables: failed to apply ['-t', 'nat', '-D', 'OUTPUT', '-m', 'cgroup', '--cgroup', '0x00110011', '-p', 'tcp', '--dport', '53', '-j', 'REDIRECT', '--to-ports', '5354']
2019-03-12 15:12:43,625 - WARNING - iptables: failed to apply ['-t', 'nat', '-D', 'OUTPUT', '-m', 'cgroup', '--cgroup', '0x00110011', '-p', 'udp', '--dport', '53', '-j', 'REDIRECT', '--to-ports', '5354']
2019-03-12 15:12:43,633 - WARNING - iptables: failed to apply ['-t', 'mangle', '-D', 'OUTPUT', '-m', 'cgroup', '--cgroup', '0x00110011', '-j', 'MARK', '--set-mark', '11']
2019-03-12 15:12:43,639 - WARNING - iptables: failed to apply ['-t', 'nat', '-D', 'POSTROUTING', '-m', 'cgroup', '--cgroup', '0x00110011', '-o', 'enx00e04cf03c0e', '-j', 'MASQUERADE']
2019-03-12 15:12:43,646 - WARNING - iptables: failed to apply ['-D', 'OUTPUT', '-m', 'cgroup', '--cgroup', '0x00110011', '-j', 'ACCEPT']
2019-03-12 15:12:43,653 - WARNING - iptables: failed to apply ['-D', 'INPUT', '-m', 'cgroup', '--cgroup', '0x00110011', '-j', 'ACCEPT']
2019-03-12 15:12:43,660 - WARNING - iptables: failed to apply ['-t', 'nat', '-D', 'OUTPUT', '-m', 'cgroup', '--cgroup', '0x00110011', '-p', 'tcp', '--dport', '53', '-j', 'REDIRECT', '--to-ports', '5354']
2019-03-12 15:12:43,668 - WARNING - iptables: failed to apply ['-t', 'nat', '-D', 'OUTPUT', '-m', 'cgroup', '--cgroup', '0x00110011', '-p', 'udp', '--dport', '53', '-j', 'REDIRECT', '--to-ports', '5354']
2019-03-12 15:12:43,669 - DEBUG - Bypass: Could not delete /sys/fs/cgroup/net_cls/bypass_qomui - resource does not exist or is busy
2019-03-12 15:12:43,669 - INFO - Deleted cgroup
2019-03-12 15:12:43,669 - INFO - iptables: created rule for 83.97.18.60
2019-03-12 15:12:43,669 - INFO - Establishing connection to azirevpn-uk1
2019-03-12 15:12:44,630 - INFO - WireGuard: [#] ip link add wg_qomui type wireguard
2019-03-12 15:12:44,636 - INFO - WireGuard: [#] wg setconf wg_qomui /dev/fd/63
2019-03-12 15:12:44,663 - INFO - WireGuard: [#] ip address add 10.20.25.76/19 dev wg_qomui
2019-03-12 15:12:44,664 - INFO - WireGuard: [#] ip address add 2a07:241:1:4000::194d/64 dev wg_qomui
2019-03-12 15:12:44,672 - INFO - WireGuard: [#] ip link set mtu 1420 up dev wg_qomui
2019-03-12 15:12:44,693 - INFO - WireGuard: [#] resolvconf -a wg_qomui -m 0 -x
2019-03-12 15:12:44,713 - INFO - WireGuard: Too few arguments.
2019-03-12 15:12:44,719 - INFO - WireGuard: Too few arguments.
2019-03-12 15:12:44,729 - INFO - WireGuard: [#] wg set wg_qomui fwmark 51820
2019-03-12 15:12:44,730 - INFO - WireGuard: [#] ip -6 route add ::/0 dev wg_qomui table 51820
2019-03-12 15:12:44,732 - INFO - WireGuard: [#] ip -6 rule add not fwmark 51820 table 51820
2019-03-12 15:12:44,733 - INFO - WireGuard: [#] ip -6 rule add table main suppress_prefixlength 0
2019-03-12 15:12:44,767 - INFO - WireGuard: [#] ip -4 route add 0.0.0.0/0 dev wg_qomui table 51820
2019-03-12 15:12:44,768 - INFO - WireGuard: [#] ip -4 rule add not fwmark 51820 table 51820
2019-03-12 15:12:44,769 - INFO - WireGuard: [#] ip -4 rule add table main suppress_prefixlength 0
2019-03-12 15:12:44,793 - INFO - DNS: Overwriting /etc/resolv.conf with 91.231.153.2 and 2001:67c:15ec:1337::2
2019-03-12 15:12:44,793 - DEBUG - No up script defined for Azire Wireguard
2019-03-12 15:12:44,794 - DEBUG - /var/run/dnsmasq_qomui.pid does not exist
2019-03-12 15:12:44,794 - DEBUG - /var/run/dnsmasq_qomui_bypass.pid does not exist
2019-03-12 15:12:44,794 - INFO - DNS: Overwriting /etc/resolv.conf with 91.231.153.2 and 2001:67c:15ec:1337::2
2019-03-12 15:12:44,800 - WARNING - Desktop notifications not available
2019-03-12 15:12:44,804 - DEBUG - Monitoring thread initialized
2019-03-12 15:12:45,573 - INFO - External ip = 83.97.18.60 - 2a07:241:1:4000::194d
2019-03-12 15:12:54,880 - DEBUG - Restored backup of /etc/resolv.conf
2019-03-12 15:12:54,924 - INFO - WireGuard: [#] ip -4 rule delete table 51820
2019-03-12 15:12:54,933 - INFO - WireGuard: [#] ip -4 rule delete table main suppress_prefixlength 0
2019-03-12 15:12:54,941 - INFO - WireGuard: [#] ip -6 rule delete table 51820
2019-03-12 15:12:54,950 - INFO - WireGuard: [#] ip -6 rule delete table main suppress_prefixlength 0
2019-03-12 15:12:54,956 - INFO - WireGuard: [#] ip link delete dev wg_qomui
2019-03-12 15:12:55,460 - INFO - WireGuard: [#] resolvconf -d wg_qomui
2019-03-12 15:12:55,510 - INFO - WireGuard: Too few arguments.
2019-03-12 15:12:55,521 - DEBUG - iptables: ['-D', 'INPUT', '-i', 'wg_qomui', '-j', 'ACCEPT'] already exists
2019-03-12 15:12:55,528 - DEBUG - iptables: ['-D', 'OUTPUT', '-o', 'wg_qomui', '-j', 'ACCEPT'] already exists
2019-03-12 15:12:55,536 - DEBUG - iptables: ['-D', 'INPUT', '-i', 'wg_qomui', '-j', 'ACCEPT'] already exists
2019-03-12 15:12:55,544 - DEBUG - iptables: ['-D', 'OUTPUT', '-o', 'wg_qomui', '-j', 'ACCEPT'] already exists
2019-03-12 15:12:55,545 - DEBUG - No down script defined for Azire Wireguard
2019-03-12 15:12:55,595 - INFO - Interface wg_qomui does not exist anymore
corrad1nho commented 5 years ago

Is the firewall activated?

Victor239 commented 5 years ago

Nah it isn't, this is with a fresh Ubuntu install as well.

corrad1nho commented 5 years ago

It's likely that after disconnecting WireGuard, DNS servers are not resetting properly. I'll do some testing with AzireVPN on Ubuntu.

klirbingle commented 5 years ago

This seems like a preferential outcome: requiring an additional manual step to use non-vpn options. Like ivpn and express vpn invoking firewall service.

Victor239 commented 5 years ago

Not sure how you see it as preferential when it makes you me totally unable to use the internet when I voluntarily choose to disconnect. You may be thinking of when the connection drops randomly it preventing you from internet access, which is a common VPN preference but the current behaviour is not.