OpenVPN + multiple "IPv4 Local Network"



  • Hi, another newbie question:

    My users should access to multiple zones from their OpenVPN sessions.

    Let's say, they should access to LAN : 10.0.0.0/24, and also to DMZ : 192.168.1.1/24

    When I configure the OpenVPN server i see no option to configure routing to multiple local networks. Reading "IPv4 Local Network" desciption, the range can only be unique:

    "IPv4 Local Network"
    This is the network that will be accessible from the remote endpoint. Expressed as a CIDR range. You may leave this blank if you don't want to add a route to the local network through this tunnel on the remote machine. This is generally set to your LAN network.
    
    

    Is there a way to do it, except to move the DMZ to another range which would permit to have LAN and DMZ in a single range, let's say 10.0.1.0/24 and define local network as 10.0.0.0/8 ?



  • You can use the "Advanced configuration" section to add those routing options
    e.g. push "route 192.168.1.0 255.255.255.0";

    Edit:
    Using a recent snapshot it is also possible to specify multiple networks separated by commas.



  • Yes, if you are on a recent (last 3 days) 2.1-BETA1 then you can put comma-separated lists of subnets in the local and remote subnet fields, e.g.

    10.0.0.0/24,192.168.1.1/24
    

    I just tried one from a peer-to-peer (site-to-site) link, putting a list in the Remote Network field of the client end (telling it what is at the server) - that has a small bug, so it doesn't work, I have made some comments on the commit from a few days ago (bed time now - no time to properly test and submit the fix right now!).
    Edit: jimp has got onto it already and committed a good-looking fix - thanks. The next snapshot after the time of this comment will have this bit also working.
    But it should all work at the server end now. You will want to put your list in the Local Networks field at the server end.



  • fine ! i will try the latest snapshot then ! tanks !


Log in to reply