Important note about SSL VPN compatibility for 20.0 MR1 with EoL SFOS versions and UTM9 OS. Learn more in the release notes.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Allow guest to create their own user using phone number [SMS Gateway]

Hi everyone

First of all, sorry for my bad English because English is not my native language.

In this post I will give you all some tips to allow guests to create their own user account using their phone number. Instead of using exist SMS Gateway provided by Sophos XG Firewall, I use SMS Gateway Me

- Install SMS Gateway API app into you android phone

- Register an account to use the service

- Create a new SMS Gateway and set it up like picture below

- Check Enable Guest Users Registration at [System => Authentication => Guest User Settings]

- Set up hotspot to redirect website to http://sfos-ip:8090 to go to captive portal

- Create a drop rule below hotspot rule to redirect all unauthenticated user to captive portal



This thread was automatically locked due to age.
Parents
  • I know this post is more than 2 years old, but I did not find any others.  I just wanted to post that the SMS service does work with ClickSend.  I was unable to get to work with any of the three pre-installed SMS gateways.  They are all outside the US anyway.

     

    I was able to open an account and allow our vendor network users to create their own access accounts by using Captive Portal and SMS to text them back their 5 digit passcode.

     

     

  • Primo allows users to send Short Message Service (SMS) messages from the Primo Front End. These messages can be sent from the Keeping this item section of the Full Results page and the e-Shelf. This option displays only for users that are authorized to use the SMS feature.

  • For home users who do not plan on having all that many guests, you can also do this for free using AWS services.

  • How do you do this using AWS?

  • It may seem daunting, but if you are at all familiar with some of the base AWS service offerings, it is actually pretty simple. The basic steps are to build a small Lambda function that will take the parameters sent from the XG (mobile number and message which includes the XG generated password) and push them over to AWS SNS (simple notification service). My function also pushes a text msg to me so I get notified when a guest has registered. Put your lambda function behind an AWS API Gateway and then configure a new SMS Gateway service in XG that calls your new API.

  • Wonder if there is a more detailed step by step out there for this? 

     

     

    Thanks,

    Dan

  • Dan,

    There are no direct step-by-step tutorials for this exact use-case unfortunately, and it would be a bit excessive if I were to try and create one in a forum post. The good news is that the web contains innumerable how-to articles for AWS specific services already. The work would be to just identify the pieces you need to research, learn them, and then stitch the steps together.

    Again, the pieces are:

    • Lambda
    • API Gateway
    • Simple Notification Services (SNS)

    To help get you started in the right direction if you are so inclined, here is an over-simplified Lambda function in Node.js you could start with:

    const myNum = '+15551234567';
    const AWS = require('aws-sdk');
    const response = {
       statusCode: 500,
       headers: {
          'Access-Control-Allow-Origin': '*',
          'Access-Control-Allow-Credentials' : true
       },
       body: JSON.stringify('You should never see this!'),
    };

    AWS.config.update({
       'region': 'us-east-1'
    });

    exports.handler = async event => {
       try {
          let num = "+1"+event.queryStringParameters.num;
          let msg = event.queryStringParameters.msg;
          let sns = new AWS.SNS( );
          await sns.publish({Message: msg, PhoneNumber: num}).promise( );
          await sns.publish({Message: `New Registration with number ${num}`, PhoneNumber: myNum}).promise( );
          response.statusCode = 200;
          response.body = JSON.stringify('Message sent!')
       } catch(e) {
          console.log("I caught an Error!");
          console.log(e);
          response.body = JSON.stringify({
             error : e.name,
             message: e.message,
             path: event.path,
             method: event.httpMethod,
             query: event.queryStringParameters,
             time: event.requestTime
          });
       } finally {
          return response;
       }
    };

     

    Thanks,

    Gary

Reply
  • Dan,

    There are no direct step-by-step tutorials for this exact use-case unfortunately, and it would be a bit excessive if I were to try and create one in a forum post. The good news is that the web contains innumerable how-to articles for AWS specific services already. The work would be to just identify the pieces you need to research, learn them, and then stitch the steps together.

    Again, the pieces are:

    • Lambda
    • API Gateway
    • Simple Notification Services (SNS)

    To help get you started in the right direction if you are so inclined, here is an over-simplified Lambda function in Node.js you could start with:

    const myNum = '+15551234567';
    const AWS = require('aws-sdk');
    const response = {
       statusCode: 500,
       headers: {
          'Access-Control-Allow-Origin': '*',
          'Access-Control-Allow-Credentials' : true
       },
       body: JSON.stringify('You should never see this!'),
    };

    AWS.config.update({
       'region': 'us-east-1'
    });

    exports.handler = async event => {
       try {
          let num = "+1"+event.queryStringParameters.num;
          let msg = event.queryStringParameters.msg;
          let sns = new AWS.SNS( );
          await sns.publish({Message: msg, PhoneNumber: num}).promise( );
          await sns.publish({Message: `New Registration with number ${num}`, PhoneNumber: myNum}).promise( );
          response.statusCode = 200;
          response.body = JSON.stringify('Message sent!')
       } catch(e) {
          console.log("I caught an Error!");
          console.log(e);
          response.body = JSON.stringify({
             error : e.name,
             message: e.message,
             path: event.path,
             method: event.httpMethod,
             query: event.queryStringParameters,
             time: event.requestTime
          });
       } finally {
          return response;
       }
    };

     

    Thanks,

    Gary

Children
No Data