Re: Can a network behind a CGNAT:ed ISP be accessed using OpenVPN?

Gert Doering <[email protected]> Mon, 16 Sep 2024 09:47:57 +0200
Newsgroups gmane.network.openvpn.user
Message-ID <[email protected]>
Hi,

On Mon, Sep 16, 2024 at 09:15:24AM +0200, Antonio Quartulli wrote:
> In a nutshell, you need to configure both a route and a "iroute" to inform
> the VPN server (your relay point) where a certain LAN is.

AND some amount of NAT might be involved, depending on "from where do
you want to access this Client-LAN?" - something in the Server-Network,
some *other* Client of "the OpenVPN Server", or "The Internet".

From OpenVPN's point of view, "it is easily solved" :-)

 - on the openvpn client, enable ip forwarding (so it won't throw
   away packets "not to itself" but will forward them to the LAN)
 - on the openvpn server, use route+iroute to ensure that the client
   LAN is sent to *this* connection (-> what Antonio said)

 - ensure routing to the VPN, that is, either:
    - on all(!) involved machines make sure that "routes to client LAN"
      and "routes back to whoever accesses the client LAN" point towards
      the respective OpenVPN machines
   or:
    - add sufficient doses of iptables NAT wherever suitable so routing
      isn't needed

the best approach here is to do a big picture showing all network infra
(routers on both ends, OpenVPN server, OpenVPn clients), and "the networks
involved" (client network, etc.), and then check what machines need to
know so IP packets can flow both ways - either "routes" or "packet gets
NATted, so no routes needed".

gert
-- 
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]

_______________________________________________
Openvpn-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-users
signature.asc (application/pgp-signature, 630 B)
-----BEGIN PGP SIGNATURE-----

iQGcBAEBAgAGBQJm5+KtAAoJEB2Cnv7KVigSkQcL/iAsoJUH0Dug60G/GYLsk1ip
PTItqUMetzgp9+GwlFPZMyjwt1sm8aTVRKbcZCDdxE0vu1ZbObymTZFguDKKj/xZ
mkVETaOMyyBGcJlTie9c28Nj3dNeJzmGEOluUrI8/vGCwGus9d+m/EW0Jt9ReRZn
+7+3FvEmmmQ7guzj+myLpBHPIh0r9RjrFquh4LfexpD80dgDs1VmUcPeNAawa5d4
1+VHbiqkpEbjX7pV+lF2eUykLuKcJtOvN3jdR/93Vri8IuMNiY3aJSDmOsiHHm+o
/Y7MKfqKUD74hnnG6qvFEBIloWFN5zAEXjlHTOVxsYdrjzq36EyzTR9J5QTEzViG
zucOJCod91H1tTLzKTsbtTgXUiO5y887ADcXPCzpg5NqWTgsXXRP+KDrTpGiCbe6
dYXmFUD+45QthxVBfJCXkyajyFPjLdQ8ioXEjtDw9PZEU2ndoAHJOfkrgW8SXEiZ
8kl+DSXG4af6aqMXWoYkkX+8K36TCmfERl7uTsWX+A==
=dUUy
-----END PGP SIGNATURE-----