NG IN Registration Setup

از ویکی پارس پویش
پرش به: ناوبری, جستجو

محتویات

Introduction

Story

When an NG-IN User Connects for the first time, IBSng will automatically creates an account for user using his caller ID and group name mentioned in IN ras attributes. Because Account is created automatically, there's no way ISP owner knows who the customer is, and where is his address. So we created a subsystem to force users to register their information after automatic creation of user.

How It Works

The idea is using failed login username feature of IBSng, to redirect user to an special registration page. So basically every NG-IN user that does not have name, address, phone or cell phone attributes filled, WILL FAIL to login. After login failure they will virtually login using failed login username and we setup network rules so they'll see our registration page on every web page they attempt to see. This feature is available with NG-IN module of B1.33 and afterwards.

Registration Form

IBSng Configuration

As previously mentioned we need a failed user with multiple login and special ip pool, and set that as failed_login_username attribute of IN ras

Network Configuration

A network rule needs to be setup, to redirect all failed user ip pool and dst port 80 traffic to IBSng server port 8000.

Warning
Don't forget to exclude IBSng ip address from redirection rule

A sample configuration for mikrotik, assuming IBSng ip address is 10.0.0.3 and failed user ip pool contains ip in range 192.168.20.0/24

 0   chain=dstnat dst-address=10.0.0.3 protocol=tcp dst-port=80 action=return
 1   chain=dstnat src-address=192.168.20.0/24 protocol=tcp dst-port=80 action=dst-nat to-addresses=10.0.0.3 to-ports=8000

Apache Configuration

Apache needs to be configured to listen on port 8000 and redirect any request to registeration form

Listening on an extra port

Add these lines to /etc/apache2/ports.conf

NameVirtualHost *:8000
Listen 8000

Create IN Redirect Site

Create in_redirect file under /etc/apache2/sites-available. Replace x.x.x.x with a ng in user accessible ip of IBSng server.

<VirtualHost *:8000>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www/
        <Directory />
                Options FollowSymLinks
                AllowOverride All
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>


        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined

        RewriteEngine on
        RewriteRule .* http://x.x.x.x/IBSng-tg/addons/ng_in/failedUser [R]

</VirtualHost>

Enabling Site and Modules

Run

a2ensite in_redirect
a2enmod rewrite

Customizing Registration Pages

There are 3 template files located under /usr/local/IBSng/interface/turbogears/IBSng/ibsng/addons/ng_in/templates/ that can be tempered as customer wants.

  1. register.html: Main Registertion Page
  2. register_error.html: Error page shows when an unknown error occurs
  3. register_success.html: The page that will be shown after registration has been completed successfully
Warning
Template files should be XHTML compliant
ابزارهای شخصی

گویش‌ها
فضاهای نام
عملکردها
گشتن
جعبه‌ابزار