|
Post by yanqian on Feb 28, 2015 4:44:27 GMT
Currently it use WAN ip as the NAS-IP-Address in the RADIUS communication, I am not sure which one is the standard, but in my test setup, I want to use the LAN IP as NAS-IP-Address, since only the LAN IP can connect to Radius server, so LAN ip will make more sense.
but I didn't find any option in the WebGUI to config this. May I know if there is any way to change the default behavior of this? or Shall I have to wait for new release perhaps from SmallWall project?
thanks!
|
|
|
Post by Lee Sharp on Feb 28, 2015 16:22:48 GMT
It has been so long since I looked at the RADIUS code that I can not remember how it was set up. Let me see if I can find my old notes. It was a few computers ago...
|
|
|
Post by yanqian on Mar 3, 2015 4:32:23 GMT
Thanks for the reply.
I tried pfsense, it has the option to choose the NAS ip in the captive portal config page.
|
|
|
Post by Lee Sharp on Mar 4, 2015 17:24:19 GMT
Now I remember why this is that way. (Found an old e-mail) It was a standard. With NAT, more than one site can have the same LAN IP, and that would break accounting. It was part of the old WISPr standard. It no longer applies now, but that was why it was done. While I am cleaning up the php code I will look and see what I can do.
Also, it would be helpful to see what best practices are now. My information is woefully out of date. (The last time we worked on the code was 9 years ago...) How is everyone configuring their portals, and how do you all want to?
|
|
|
Post by Lee Sharp on Mar 4, 2015 19:33:14 GMT
So, I found the code... It is in /etc/inc/captiveportal.inc
/** * Get the NAS-IP-Address based on the current wan address * * Use functions in interfaces.inc to find this out * */
function getNasIP() { $nasIp = get_current_wan_address(); if(!$nasIp) $nasIp = "0.0.0.0"; return $nasIp; } But it dynamically derives it, so the easy way I was thinking of patching it will not work. I will work on it when I can, but it may take a bit.
|
|