[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

Re: [Openvpn-users] [RFC] 2.0-beta10 enhancement: redefine the way "ifconfig-pool" works


  • Subject: Re: [Openvpn-users] [RFC] 2.0-beta10 enhancement: redefine the way "ifconfig-pool" works
  • From: "Kevin P. Fleming" <kpfleming@xxxxxxxxxxxxxxxxxxxx>
  • Date: Tue, 10 Aug 2004 08:31:35 -0700

James Yonan wrote:

The "server" option would operate like a macro, for example:

  server 10.8.0.0 255.255.255.0

expands to the following set of directives:

mode server
tls-server

if tun:
ifconfig 10.8.0.1 10.8.0.2 ifconfig-pool 10.8.0.4 10.8.0.255
route 10.8.0.0 255.255.255.0
if client-to-client:
push "route 10.8.0.0 255.255.255.0"
else
push "route 10.8.0.1"


if tap:
  ifconfig 10.8.0.1 255.255.255.0
  ifconfig-pool 10.8.0.2 10.8.0.254
  push "route-gateway 10.8.0.1"

That is absolutely beautiful! That will do exactly what beginning and/or simple configuration users need, without sacrificing any flexibility for more advanced configurations.


You'll need to decide if specifying ifconfig/ifconfig-pool/etc. when "server" has also been specified will be an error that stops OpenVPN from loading; I'd suspect you'd almost have to handle it that way, otherwise it'd be hard to ensure what the result of the commands will be (since OpenVPN does not document the order in which commands in the configuration file are processed, and shouldn't need to start doing so now).

____________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users