Discussion:
pppd knows client ip address.
(too old to reply)
s***@gmail.com
2006-04-24 23:22:41 UTC
Permalink
hi,

is there any way to pppd knows client ip address ? what i would like to
do is that when client logged on pppd by chap secrets, i want to log
that ip address. thanks in advance.

regards.
Unruh
2006-04-25 02:38:18 UTC
Permalink
Post by s***@gmail.com
hi,
is there any way to pppd knows client ip address ? what i would like to
do is that when client logged on pppd by chap secrets, i want to log
that ip address. thanks in advance.
ppp assigns the ip address to the ppp interface. It is delivered to
/etc/ppp/ipup as one of th earguments. You can do with it what you want.
On the other hand it is not clear what use this is since it is you that
delivered that IP address to the remote machine. If you mean does ppp know
the ip address of the remote machine on some other network, then the answer
is no.
Post by s***@gmail.com
regards.
James Carlson
2006-04-25 12:06:06 UTC
Permalink
Post by s***@gmail.com
is there any way to pppd knows client ip address ? what i would like to
do is that when client logged on pppd by chap secrets, i want to log
that ip address. thanks in advance.
It's already logged via syslog; the messages are logged with facility
"daemon" and log level "notice."

If that's not enough, you can create an /etc/ppp/ip-up script to do
the work required. If that file is present and executable, then pppd
will invoke it when IPCP goes to Opened state and an IP interface is
configured. $5 (the fifth argument) passed to that script is the
remote IP address of the link, and there's more information about the
connection passed via the environment.
--
James Carlson, KISS Network <***@sun.com>
Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
Unruh
2006-04-25 15:47:35 UTC
Permalink
Post by James Carlson
Post by s***@gmail.com
is there any way to pppd knows client ip address ? what i would like to
do is that when client logged on pppd by chap secrets, i want to log
that ip address. thanks in advance.
It's already logged via syslog; the messages are logged with facility
"daemon" and log level "notice."
If that's not enough, you can create an /etc/ppp/ip-up script to do
the work required. If that file is present and executable, then pppd
will invoke it when IPCP goes to Opened state and an IP interface is
configured. $5 (the fifth argument) passed to that script is the
remote IP address of the link, and there's more information about the
connection passed via the environment.
I suspect, but do not know, that what the OP wanted was teh IP address of
the remote system as registered with some other connection to the net say.
Ie, and identifier for the other side. Since your server assigns
(usually) the IP address to the other side, it is a bit useless as an
identifier.
That information is not available however (ie the information as to what
the IP address is for the caller on other connections)


However I may be wrong as to what the OP wants.
s***@gmail.com
2006-04-27 10:30:51 UTC
Permalink
i just solved client ip address passing through the pppd parameters. i
works fine. anyhow thank you all yours.

cheers.

Loading...