Access to sessionContext from sandbox

Victor Smirnov victorvsmirnov at gmail.com
Thu Feb 21 15:59:02 EST 2019


> How about extracting the ip address from management url parameter ?

ConnectionRequestURL or any other similar parameter that CPE can adjust as it likes? I'd prefer something more reliable, especially when setting private CPE parameters.

> Done properly, the management IP would not be the users public IP address....
Not really following how this all is related to the question.

Victor Smirnov

From: Users <users-bounces at lists.genieacs.com> on behalf of Dan Morphis <dan at milkcarton.com>
Sent: Thursday, February 21, 2019 4:47:52 PM
To: takimp at yahoo.com; Community support for GenieACS users
Subject: Re: Access to sessionContext from sandbox

Done properly, the management IP would not be the users public IP address. IMHO, the CPE should have two networks. One strictly for management, one strictly for the customers traffic. Doing things this way allows you to switch a CPE from routed to bridged (and back). It allows you to have visibility on the CPE when its in bridged mode. You can also disable the routed/bridged interface when a customer doesn't pay. This prevents the equipment from hammering on your radius server.

-dan

On Thu, Feb 21, 2019 at 1:24 AM Takim < takimp at yahoo.com<mailto:takimp at yahoo.com>> wrote:
How about extracting the ip address from management url parameter ?



On Thu, Feb 21, 2019 at 3:07 PM, Victor Smirnov
< victorvsmirnov at gmail.com<mailto:victorvsmirnov at gmail.com>> wrote:
Hi,
ref. https://github.com/genieacs/genieacs/pull/335.
it was a clumsy attempt to get the  httpRequest.connection.remoteAddress variable inside the sandbox.
So in a provisioning script one can have it like this:
let remoteip = getContext().httpRequest.connection.remoteAddress;
log ("INFO: Remote IP: " + remoteip);
remoteip variable can be used in the authentication scripts. In my case, I don't know the CPEs serial numbers (don't really want to), but I know customers' IP addresses so I can push personalized CPE parameters once I know the remote IP.
Any other way to get that IP in the sandbox?

Victor Smirnov
_______________________________________________
Users mailing list
Users at lists.genieacs.com<mailto:Users at lists.genieacs.com>
http://lists.genieacs.com/mailman/listinfo/users
_______________________________________________
Users mailing list
Users at lists.genieacs.com<mailto:Users at lists.genieacs.com>
http://lists.genieacs.com/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20190221/cde0d76d/attachment.html>


More information about the Users mailing list