Gentoo Archives: gentoo-user

From: Hilco Wijbenga <hilco.wijbenga@×××××.com>
To: Gentoo User <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] Enable "regular" network traffic when using VPN
Date: Sun, 10 Jun 2018 22:03:43
Message-Id: CAE1pOi1_Krugv_TUf1xqCf3ejBT9wTeDHSA54TqOJStJ0tBMTw@mail.gmail.com
In Reply to: Re: [gentoo-user] Enable "regular" network traffic when using VPN by Mick
1 On Sun, Jun 10, 2018 at 11:31 AM Mick <michaelkintzios@×××××.com> wrote:
2 >
3 > On Sunday, 10 June 2018 19:07:59 BST Wol's lists wrote:
4 > > On 10/06/18 17:53, Mick wrote:
5 > > > On Sunday, 10 June 2018 01:31:50 BST Hilco Wijbenga wrote:
6 > > >> Okay, with all that advice, I gave it another try. I'm also setting up
7 > > >> a VirtualBox for my WFH stuff and VB wants to use 10.0.0.0 for its
8 > > >> networking. I've changed this to 172.16.0.0 so now I can easily tell
9 > > >> that network from work network (which seems to use 10.25.0.0)
10 > > >>
11 > > >> I wanted to add a route to NetworkManager's VPN connection. It wants
12 > > >> Address, Network, Gateway, and Metric so I gave it "10.0.0.0",
13 > > >> "255.0.0.0" (this one shows up automatically), "207.x.y.z", "1". But
14 > > >> then VPN fails to start with the complaint that the configuration is
15 > > >> invalid.
16 > > >>
17 > > >> So I tried what I think is the same on the CL:
18 > > >>
19 > > >> $> route add -net 10.0.0.0/8 gw "207.x.y.z" metric 1
20 > > >> SIOCADDRT: Network is unreachable
21 > > >>
22 > > >> So apparently, it's not quite as straightforward as I thought it might
23 > > >> be.
24 > > >>
25 > > >> :-)
26 > > >
27 > > > Ahh! If you're trying to set this up within a VM, this adds a whole new
28 > > > layer of complexity. I assume you're setting up a bridge between host
29 > > > and guest device(s)?
30 > >
31 > > No if he's assigned 172.16/16 to the VM network he hasn't. VB defaults
32 > > to a NAT'd network and it's always given me grief. I was going to
33 > > suggest he switched to bridged.
34 > >
35 > > In settings, change the network adaptor type to bridged, and then the VM
36 > > will get its settings and IP address from the DHCP server serving the
37 > > local network. Makes things MUCH easier.
38 > >
39 > > Cheers,
40 > > Wol
41 >
42 > If NAT'ed between guest and host and then NAT'ed again at the home router, you
43 > are double NAT'ed. As far as I know VPNs will not work through a double NAT
44 > situation, unless you use your gateway or host as the VPN end point and then
45 > setup port forwarding to the host from there. Bridge the host to guest
46 > adaptors and you should be good to go (once any other conventionla VPN
47 > configuration problem is solved). :-)
48
49 In what sense does it "not work"? I can connect just fine.
50
51 If I change VB's networking to "Bridged Adapter" I don't get any
52 different behaviour.
53
54 (I would prefer to avoid fooling around with my main OS's networking
55 so the VB route seems "safer".)