Linux PPPD per User Options Plugin
This is a hack for the linux pppd (
www.samba.org/ppp)
If you want to set options depending on a per user basis you probably need this pppd-plugin.
It is for ppp-servers (or pptpd with pppd) and not for use with pppd as client.
Installation:
Copy the
user_options.c into
ppp-2.4.X/pppd/plugins source-tree and add
the following line into the
Makefile (same directory) after the 'PLUGINS=' line:
PLUGINS += user_options.so
Then run
make install in the
ppp-2.4.X directory (or just in the plugins dir
if you know what you're doing).
Usage:
1) Enable this plugin in your ppp config (e.g. /etc/ppp/options, /etc/ppp/pptpd-options or however):
plugin user_options.so
2) define the per-user config directory:
user_options_dir /etc/ppp/user-options (
/etc/ppp/user-options is default)
3) create the per user configfiles as needed:
vi /etc/ppp/user-options/jon-doe
config style is like any other ppp config file (see
pppd(8))
Notes:
All characters _not_ matching [a-zA-Z0-9_@#![]+=% -] will be converted to '
_' (underscore).
Not any ppp option can be set/overwritten, you can't change e.g. authentication options since the remote
peer is already authenticated at this point!
When you want to overwrite
ms-dns or
ms-wins you have to set it twice (even if you only
have one wins-server/dns-server.
Download:
Patch for ppp-2.4.X:
user_options.c