Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Mar 1997 02:02:47 -0500
From:      "Troy Settle" <rewt@i-Plus.net>
To:        Doug Russell <drussell@auth.internode.net>, freebsd-questions@FreeBSD.ORG
Subject:   Re: PPPd server, with statix AND dynamic IP users...
Message-ID:  <199703070650.BAA26925@Radford.i-Plus.net>
In-Reply-To: <Pine.LNX.3.95.970306210129.21006A-100000@auth.internode.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> Please send a cc: of responses to me... drussell@internode.net, as I'm
> only subscribed to things like -current and -hackers.  :)

Ok

> I am trying to figure out a way to have PPPd act as a "server" side of a
> connection, forcing users to use a certain IP address, varying by ttydX
> line they are connected to.  The exception is the few priviledged users
> who have static IPs.  This is driving me nuts.  I don't see anything in
> the list archives, either.

Bad word here, but have you tried looking at all the linux stuff on 
sunsite?  (ok, 2 bad words :)

> If I use the options.ttydX files, it is read after the command line,
> options file, etc, and so forces the user to use that address (regardless
> of what addresses are specified for that user in pap-secrets when using
> PAP, incidentally).  If I use no "default" IP number in options or
> options.ttydX, and have the static IP users listed in pap-secrets, with a
> generic line for other users, it works, but the user has to specify the IP
> address from their end.  If they don't specify an address, PPPd doesn't
> volunteer one, essentally.
> 
> Has anyone ever done something like this?  I can't specify a single
> address in options and override with ~/.ppprc, either, because then it
> doesn't change by tty, and ~/.ppprc is read before options.ttydX....  Hmm

I don't know your exact setup, but if you call pppd from a script, 
you can have that same script check a file to determine the proper IP 
to assign.  It's a fairly straight forward task in perl.  Just create 
a file like:

user1 www.xxx.yyy.aaa
user2 www.xxx.yyy.bbb
ttyd0 www.xxx.yyy.zzz
ttyd1 www.xxx.yyy.zz1
...

Put the users first, the ttys last.  then have your script stop at 
the first match (either user or tty), and assign the IP from that 
file.  You can expand on this to allow for users that require special 
configurations and whatnot.  I used something like this for a while, 
and it worked rather well.

grab a file called ppplogin or some such.  It should be on 
sunsite.unc.edu somewhere... have fun looking for it

> 
> Ian and I are going to have to hack the ppp source somehow to get this to
> work if there isn't already a way to do it.  If it isn't already there, we
> will make it clean and provide a diff, because this is something that
> really should be possible without a lot of fuss.

No fuss, no hacking...  good luck

> 
> Later......						<Doug>

Later,

--
Troy Settle <st@i-Plus.net>
Network Administrator, iPlus Internet Services
http://www.i-Plus.net

( Stuff I said does not reflect the company I work  )
( for unless I'm speaking on behalf of said company )



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703070650.BAA26925>