sorz / sstp-server

Secure Socket Tunneling Protocol (SSTP VPN) server for Linux.
MIT License
248 stars 96 forks source link

feature request : pass user IP to ppp #28

Open shuangzhijinghua opened 5 years ago

shuangzhijinghua commented 5 years ago

like pptpd.conf set pass peer = yes, then set ipparam pptpd to get user IP and accounting with calling-station-id. current version do not pass the user IP to pppd, so radius only record with strings like pptpd behind param ipparam.

sorz commented 5 years ago

Do you mean pass user's IP address as ipparam options in pppd? Something like ipparam 192.0.2.123 when start the pppd.

shuangzhijinghua commented 5 years ago

yes.

sorz commented 5 years ago

Just recalled that the user's IP address has already passed as remotenumber since #8. Is it insufficient for your use case?

shuangzhijinghua commented 5 years ago

my options.sstpd set as below :

plugin radius.so
plugin radattr.so
radius-config-file /path/to/radiusclient.conf
avpair attribute=value
name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
ms-dns 8.8.8.8
proxyarp
nodefaultroute
lock
nobsdcomp
ipparam pptpd ipv6 ,

I want to set ipparam then radius can be able to get Calling-Station-Id with user IP, this settings is usable in xl2tpd / pptpd, but now radius plugin only get the strings behind ipparam like pptpd in my example, then radius accounting the Calling-Station-Id with string pptpd, not user IP.

sorz commented 5 years ago

According to pppd's manual, ipparam pptpd ipv6 , merely set a string pptpd ipv6 ,, I don't understand how it related to the user's IP. In the xl2tpd / pptpd cases you mentioned, who read the string pptpd ipv6 ,? Is pppd, pptpd, or the pppd-radius plugin? Can you provide the document or code about this behavior so I can follow? Thanks.

sorz commented 5 years ago

You may check the log of RADIUS as I doubt remotenumber already sent to it but on some attribute other than Calling-Station-Id. Maybe Caller-ID? I'm not sure.