How to scratch install vicibox dynamic portal

Topic: vicidial dynamic portal scratch install

  Step by step guide to scratch install the vicibox dynamic portal in centos, rocky, alma or ubuntu based vicidial scratch installations. If you have installed vicidial using scratch installation instead of using the default vicibox iso then you need to manually install and configure the dynamic portal , follow this blog tutorial to scratch install the vicidial dynamic portal.

vicidial dynamic portal scratch install centos

Vicibox Dynamic portal

    VICIbox Server is the official installation CD for the VICIDIAL Call Center Suite. It is based off of OpenSuSE server, and will properly install the VICIDIAL Call Center Suite with relative ease.

The vicibox by default includes vicibox dynamic portal

    The ViciBox dynamic portal is an integration of the underlying firewall in the OS, various features of ViciDial, and some add-on ViciBox features. This allows for the relatively easy administration of all network access to the various features of ViciDial. The firewall integration itself supports a Black list, a White list, a Dynamic List with a user authentication portal

Vicidial scratch install

    If you are the one like me ,who likes to install vicidial from scratch on OS platforms like centos,rocky,alma,ubuntu  or you might have a situation where you cannot upload or boot the vicibox iso then you will be losing the feature called vicibox dynamic portal , which used to whitelist or blacklist the IP.

Here's the steps to install and configure the vicidial dynamic portal in scratch installations.

Steps to install vicidial dynamic portal

Follow the below steps to install and configure the vicidial dynamic portal in your scratch installations, the commands used here support redhat based linux distribution like centos, rocky and for ubuntu use the apt-get .

Step 1: Install the firewalld and ipset

yum install firewalld
yum install ipset
yum install mod_ssl

note: if you are accessing your vicidial over http only then skip the mod_ssl. 

Step 2: Download the Dynamic portal files from my Github

cd /usr/src/
mkdir dynamicportal
cd dynamicportal
wget https://github.com/striker24x7/vicidial-dynamicportal/archive/refs/heads/main.zip
unzip main.zip

Step 3: Copy the Firewall zones , services, ipset rules

cd vicidial-dynamicportal-main
cp -r zones /etc/firewalld/zones

**note: if prompts for override for public give yes

cp -r ipsets /etc/firewalld/ipsets
cd services
cp *.xml /usr/lib/firewalld/services/

Step 4: Copy the Dynamic portal files to web folder

In my case i am using centos, where the web root folder path is /var/www/html

cp -r dynamicportal /var/www/html/dynportal

Step 5: Copy the ssl file to the http config folder 

cp vicidial-ssl.conf /etc/httpd/conf.d/

Step 6: Edit the vicidial-ssl.conf 

Edit the vicidial-ssl.conf file and replace the ssl certificate and ssl key with your domain key.

Line no 22 and 24 if chain certificate is available then edit line 23

vi /etc/httpd/conf.d/vicidial-ssl.conf

SSLCertificateFile /etc/letsencrypt/live/striker24x7.com/cert.pem
#SSLCACertificateFile /etc/apache2/ssl.crt/CA_chain.crt
SSLCertificateKeyFile /etc/letsencrypt/live/striker24x7.com/privkey.pem

Note: if you are accessing your vicidial over http only then edit the below file to access the dynamic portal via port 81 over http

vi /etc/httpd/conf/httpd.conf

add the below lines at the end for the file

 <VirtualHost *:81>
  ServerName xyzabc.com
  DocumentRoot /var/www/html/dynportal
  ErrorLog /var/log/httpd/error.log
  CustomLog /var/log/httpd/requests.log combined
</VirtualHost>

Step 7: Add the 81 and 446 as listen port in apache

edit the ssl.conf file and add the line Listen 446 after the line Listen 443 and edit the httpd.conf to add port 81 as listen port

Port 446 is used to access the dynamic portal over https

Port 81 is used to access the dynamic portal over http

For Adding Listen port 446

vi /etc/httpd/conf.d/ssl.conf
Listen 443 https ; below this line add
Listen 446

For Adding Listen port 81

 vi /etc/httpd/conf/httpd.conf
Listen 80  ;below this line add
Listen 81

Step 8: Copy the VB-firewall script to bin

cp VB-firewall /usr/bin/
chmod +x /usr/bin/VB-firewall

Step 9: Restart and run on startup the Firewalld

Run the below command to enable and restart the firewall service

systemctl enable firewalld
systemctl restart firewalld

Step 10: Enable the IP List in Vicidial

Log in to your Vicidial Admin portal 

Navigate to  Admin > System Settings

Enable the IP List

Allow IP Lists: 1

submit

Next Navigate to Users and edit the Admin user who wants the access to add ip whitelist 

Modify any admin user (6666 i am using) and set 1 for Modify IP Lists:

Modify IP Lists::1

submit

Next Create ViciWhite IP list to add static IP's for whitelist

navigate to ADMIN > IP Lists

Create a new IP list with the name as  ViciWhite

make sure to set the ViciWhite iplist to active.

submit.

Step 11: Cronjob entry to run VB-firewall every minute

you need to add the VB-firewall script in the cronjob to run every minute to add the static whitelist ip list and dynamic ip list to the Firewall white list rules.

Also you need to run the VB-firewall script on reboot

edit the crontab by typing below command

crontab -e

add the below at the end of the crontab file.

* * * * * /usr/bin/VB-firewall --white --dynamic --quiet
@reboot  /usr/bin/VB-firewall --white --dynamic --quiet

Conclusion: Dynamic portal Testing

    Now you can access the dynamic portal either over http of https by typing your Fqdn with respectice port
https://yourdomain:446/valid8.php
http://yourdomain:81/valid8.php

upon valid credentials the users public ip will be added the in ipset dynamic list within a minute.

To check whether ip added in the list , type the below command
ipset --list
Command to check the iptables rules
iptables -L -n
by default my script allows level 1users to validate credentials ,if you want to validate other users with level above 1 edit the below file and modify the line PORTAL_userlevel
vi /var/www/html/dynportal/inc/defaults.inc.php

Hope the tutorial is helpful, if you like my post kindly share and subscribe ,for support reach me on my skype or telegram striker24x7.

Previous Post
No Comment
Add Comment
comment url