<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
> How about extracting the ip address from management url parameter ? <br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
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.
<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
> Done properly, the management IP would not be the users public IP address.... <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Not really following how this all is related to the question. <br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Victor Smirnov <br>
</div>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
<b><font color="#000000">From:</font></b><font color="#000000"> Users <users-bounces@lists.genieacs.com> on behalf of Dan Morphis <dan@milkcarton.com></font><br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
<b><font color="#000000">Sent:</font></b><font color="#000000"> Thursday, February 21, 2019 4:47:52 PM</font><br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
<b><font color="#000000">To:</font></b><font color="#000000"> takimp@yahoo.com; Community support for GenieACS users</font><br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
<b><font color="#000000">Subject:</font></b><font color="#000000"> Re: Access to sessionContext from sandbox</font>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
  <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
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.
<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
-dan <br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
On Thu, Feb 21, 2019 at 1:24 AM Takim < <a href="mailto:takimp@yahoo.com">takimp@yahoo.com</a>> wrote:
<br>
</div>
<blockquote type="cite">
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
How about extracting the ip address from management url parameter ? <br>
<br>
<br>
<br>
</div>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
On Thu, Feb 21, 2019 at 3:07 PM, Victor Smirnov <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
< <a href="mailto:victorvsmirnov@gmail.com">victorvsmirnov@gmail.com</a>> wrote: <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Hi, <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
ref. <a href="https://github.com/genieacs/genieacs/pull/335">https://github.com/genieacs/genieacs/pull/335</a>.
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
it was a clumsy attempt to get the  httpRequest.connection.remoteAddress variable inside the sandbox.
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
So in a provisioning script one can have it like this: <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
let remoteip = getContext().httpRequest.connection.remoteAddress; <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
log ("INFO: Remote IP: " + remoteip); <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
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.
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Any other way to get that IP in the sandbox? <br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Victor Smirnov <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
_______________________________________________ <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Users mailing list <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
<a href="mailto:Users@lists.genieacs.com">Users@lists.genieacs.com</a> <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
<a href="http://lists.genieacs.com/mailman/listinfo/users">http://lists.genieacs.com/mailman/listinfo/users</a>
<br>
</div>
</blockquote>
</blockquote>
<blockquote type="cite">
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
_______________________________________________ <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Users mailing list <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
<a href="mailto:Users@lists.genieacs.com">Users@lists.genieacs.com</a> <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
<a href="http://lists.genieacs.com/mailman/listinfo/users">http://lists.genieacs.com/mailman/listinfo/users</a>
<br>
</div>
</blockquote>
</body>
</html>