FedoraForum.org - Fedora Support Forums and Community
Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2017
    Location
    Oslo
    Posts
    70

    Internet connection drops with VPN active and VirtualBox running

    I have a really weird issue with my internet connection using VirtualBox on Fedora 25.

    As soon as I activate my VPN on my Linux host, my internet drops. I can't access the internet on my host or guest (Windows 7).

    I'm accessing the internet through a router. If I activate the VPN without running VirtualBox, everything works just fine. As soon as I start (or keep running) VB, the internet drops on both host and guest.

    Here's some information about my network configuration:

    with VPN OFF
    Code:
    [root@linux ~]$ ifconfig
            enp0s25: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            ether 3c:97:0e:c4:f2:85  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
            device interrupt 20  memory 0xf3a00000-f3a20000  
    
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1  (Lokale Schleife)
            RX packets 48  bytes 3420 (3.3 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 48  bytes 3420 (3.3 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
            ether 52:54:00:e0:f2:0c  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 192.168.42.23  netmask 255.255.255.0  broadcast 192.168.42.255
            inet6 fe80::92c:fd8c:a82e:9ef8  prefixlen 64  scopeid 0x20<link>
            ether 3c:a9:f4:65:37:49  txqueuelen 1000  (Ethernet)
            RX packets 153645  bytes 198326273 (189.1 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 110073  bytes 13381740 (12.7 MiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    Code:
    [root@linux ~]$ route
    Kernel IP Routentabelle
    Ziel            Router          Genmask         Flags Metric Ref    Use Iface
    default         192.168.42.1       0.0.0.0         UG    600    0        0 wlp3s0
    192.168.42.0    0.0.0.0         255.255.255.0   U     600    0        0 wlp3s0
    192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0

    with VPN ON
    Code:
    [root@linux ~]$ ifconfig
            enp0s25: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            ether 3c:97:0e:c4:f2:85  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
            device interrupt 20  memory 0xf3a00000-f3a20000
    
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Lokale Schleife)
            RX packets 24  bytes 1840 (1.7 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 24  bytes 1840 (1.7 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
            inet 10.7.7.17  netmask 255.255.255.0  destination 10.7.7.17
            inet6 fe80::c880:6b7e:b0af:db66  prefixlen 64  scopeid 0x20<link>
            unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 100  (UNSPEC)
            RX packets 32  bytes 6532 (6.3 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 43  bytes 3796 (3.7 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
            ether 52:54:00:e0:f2:0f  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 192.168.42.32  netmask 255.255.255.0  broadcast 192.168.42.255
            inet6 fe80::92c:fd8c:a82e:9ef8  prefixlen 64  scopeid 0x20<link>
            ether 3c:a9:f4:65:37:49  txqueuelen 1000  (Ethernet)
            RX packets 1482393  bytes 2115633017 (1.9 GiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 773554  bytes 83062512 (79.2 MiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    Code:
    [root@linux ~]$ route
    Kernel IP Routentabelle
    Ziel            Router          Genmask         Flags Metric Ref    Use Iface
    default         gateway         0.0.0.0         UG    50     0        0 tun0
    default         gateway         0.0.0.0         UG    600    0        0 wlp3s0
    10.7.7.0        0.0.0.0         255.255.255.0   U     50     0        0 tun0
    178.250.48.21   gateway         255.255.255.255 UGH   600    0        0 wlp3s0
    192.168.42.0    0.0.0.0         255.255.255.0   U     600    0        0 wlp3s0
    gateway         0.0.0.0         255.255.255.255 UH    600    0        0 wlp3s0
    192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0
    Internet access goes through wlp3s0. With the VPN inactive, internet access works on both sides.

    For my guest I have only Adapter 1 active using NAT.

    I know it is related to my network settings, I just don't know if the settings on my host or guest need optimization and how to set it up so that it finally works.

    Has anyone an idea how this issue can be fixed? Thanks!
    Last edited by Dr Nukular; 13th April 2017 at 10:48 AM.

  2. #2
    Join Date
    Aug 2016
    Location
    Dallas
    Posts
    52

    Re: Internet connection drops with VPN active and VirtualBox running

    I'm thinking the VPN takes control of the interface wlp3s0 when it creates tun0, which breaks the virbr0 that vbox was using. I'm assuming you're wanting to encrypt your virtual machine's traffic?

  3. #3
    Join Date
    Jan 2017
    Location
    Oslo
    Posts
    70

    Re: Internet connection drops with VPN active and VirtualBox running

    Quote Originally Posted by rexrf
    I'm thinking the VPN takes control of the interface wlp3s0 when it creates tun0, which breaks the virbr0 that vbox was using. I'm assuming you're wanting to encrypt your virtual machine's traffic?
    Thanks for your reply! I'm not sure what you mean on the encryption part. I mainly want my virtual machine to use the same outbound connection as my host computer, which would be in that case the VPN.

    I just don't understand why the connection breaks on both ends, if the VPN takes over wlp3s0? The internet should then still work on my host machine and be broken on my virtual machine. I'm having difficulties understanding how all this is connected to each other.

  4. #4
    Join Date
    Aug 2016
    Location
    Dallas
    Posts
    52

    Re: Internet connection drops with VPN active on Host

    Have you tried connecting to the vpn before you've initialized your vm? Would I be right in assuming you aren't able to use your wired interface?


    I haven't had this exact problem myself, but what i would do to further trace it down is:

    If possible reboot the computer, and then run the following commands

    Code:
    journalctl -f >> ~/TshootLog &
    --> a number should pop up, paste that somewhere to later kill the background process.

    1. ensure you have internet access:

    2. start your vm

    3. verify guest has access

    4. start your vpn

    If broken:

    Code:
    systemctl status NetworkManager
    systemctl restart NetworkManager
    Read your logs:

    Code:
    cat ~/TshootLog | grep tun0
    cat ~/TshootLog | grep br0
    Remember to kill your background journalctl process
    Last edited by rexrf; 14th April 2017 at 03:40 PM. Reason: code fix

  5. #5
    Join Date
    Jan 2017
    Location
    Oslo
    Posts
    70

    Re: Internet connection drops with VPN active on Host

    Quote Originally Posted by rexrf
    Have you tried connecting to the vpn before you've initialized your vm? Would I be right in assuming you aren't able to use your wired interface?
    Yes, I did and it seems that it doesn't matter when the vpn gets initialized. as soon as the vpn is active, I lose access to the internet.

    This happens independent if the internet connection goes through the wireless or wired interface.

    My local wired network is unaffected b the VPN.


    Quote Originally Posted by rexrf

    Code:
    cat ~/TshootLog | grep tun0
    cat ~/TshootLog | grep br0
    Remember to kill your background journalctl process
    There are no entries for tun0 or br0. The only network related entries are during the restart of the NetworkManager:

    Code:
    gnome-shell[1945]: JS LOG: Removing a network device that was not added
    gnome-shell[1945]: JS LOG: Removing a network device that was not added
    gnome-shell[1945]: JS LOG: Removing a network device that was not added
    gnome-shell[1945]: JS LOG: Removing a network device that was not added
    gnome-shell[1945]: JS LOG: Removing a network device that was not added
    evolution[2374]: Network disconnected.  Forced offline.
    gnome-shell[1945]: gsignal.c:2641: instance '0x555efc18df40' has no handler with id '688575'
    evolution[2374]: Connection established.  Going online.
    gnome-shell[1945]: nma_mobile_providers_database_lookup_cdma_sid: assertion 'sid > 0' failed
    I still have no idea what is going on here.

  6. #6
    Join Date
    Apr 2009
    Location
    central NY, USA
    Posts
    1,026

    Re: Internet connection drops with VPN active on Host

    It was my understanding THAT was how VPN worked (hence the "P"), though I don't recall how I came to that understanding.
    Change - the only constant.

  7. #7
    Join Date
    Apr 2014
    Location
    Brooklyn
    Posts
    48

    Re: Internet connection drops with VPN active on Host

    If you modified your firewall's OUTPUT to DROP and allow certain interfaces you will need to allow tun0 also. It could also be something on your vpn's servers configs or firewall.

Similar Threads

  1. [SOLVED] local websties are not working when internet connection is active
    By megaloman in forum Using Fedora
    Replies: 3
    Last Post: 7th June 2012, 03:59 PM
  2. Yum without an active internet connection
    By kombucha in forum Using Fedora
    Replies: 1
    Last Post: 2nd July 2006, 03:03 AM
  3. eth0 is active but no internet connection. New FC5 install
    By jsweatte in forum Servers & Networking
    Replies: 2
    Last Post: 30th March 2006, 06:40 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •