Home » Blog » Asterisk/Vicidial » How to scratch install vicibox dynamic portal

How to scratch install vicibox dynamic portal

scratch install vicibox dynamic portal

Embarking on the journey to scratch-install the Vicibox dynamic portal warrants meticulous attention, especially for those opting for the road less traveled on OS platforms such as centos, rocky, alma, or ubuntu. This step-by-step guide unravels the intricacies of installing the dynamic portal for vicidial scratch installations, deviating from the conventional vicibox iso route. For enthusiasts or those facing the challenge of vicibox iso unavailability, embracing this guide becomes imperative to harness the potential of the vicibox dynamic portal.

Unveiling the Vicibox Dynamic Portal:

The VICIbox Server stands as the sanctum for the VICIDIAL Call Center Suite, boasting an installation CD rooted in OpenSuSE server architecture. It orchestrates the seamless installation of the VICIDIAL Call Center Suite, offering an experience laced with relative ease.

The ViciBox dynamic portal emerges as an amalgamation, intricately weaving the underlying OS firewall, assorted ViciDial features, and supplementary ViciBox functionalities. This fusion facilitates the streamlined administration of network access to diverse ViciDial features. Noteworthy aspects encompass firewall integration supporting a Blacklist, a Whitelist, and a Dynamic List equipped with a user authentication portal.

The Vicidial Scratch Install Odyssey:

For those, akin to myself, relishing the challenge of installing vicidial from scratch on OS platforms like centos, rocky, alma, or ubuntu, or those confronting scenarios precluding vicibox iso upload or boot, a sacrifice looms—the absence of the coveted vicibox dynamic portal feature. This feature, instrumental in whitelisting or blacklisting IPs, becomes an unattainable luxury.

Steps to Immerse in the Vicidial Dynamic Portal:

Here unfolds a procedural guide delineating the installation and configuration of the vicidial dynamic portal in scratch installations. The commands presented resonate with redhat-based Linux distributions like centos and rocky, while apt-get serves as the conduit for Ubuntu users.

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

Scroll to Top