How to – Use Firewalld via command line

Robots trying to hack in

How to – use Firewalld via command line

This short post is just going to briefly go over the more common commands you need in order to manage firewalld and make sure you keep your servers safe. This firewall works in conjunction with the dynamic portal for ViciDial as well as the built in whitelist initially named ViciWhite in the IP list area in Admin.

Dynamic portal
Dynamic portal

Systemctl and Firewalld

Enable firewalld

This makes sure that firewalld will be started automatically with the server.

systemctl enable firewalld

Start firewalld

After the firewalld service is enabled, you’ll need to start it manually the first time. This is how you would manually start firewalld if it were not already running.

systemctl start firewalld

Stop firewalld

When troubleshooting rules and connection issues, you may need to stop the fireawlld service momentarily. You can stop the service with the following command.

systemctl stop firewalld

Restart firewalld

If for some reason, you need to restart the service, you can do that with the systemctl restart command.

systemctl restart firewalld

Firewalld status

Checking the status of the service gives us the most meaningful and informative output. Here you can see whether the service is enabled, running, failed, or anything else.

systemctl status firewalld

In this example output, you can see that the service is enabled, active, and running on the server. If it were not running or in a failed state, this would be displayed.

[root@alma ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2019-01-22 22:50:32 EST; 1h 0min ago
Main PID: 808 (firewalld)
CGroup: /system.slice/firewalld.service
└─808 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

Managing Firewalld and Configuring Rules

Now that we have firewalld running, we can get down to set the configuration. We can open ports, allow services, whitelist IPs for access, and more. In all of these examples, we include the –permanent flag. This is important to make sure a rule is saved even after you restart firewalld, or reboot the server. Once you’re done adding new rules, you need to reload the firewall to make the new rules active.

Add a Port for TCP or UDP

You do have to specify TCP or UDP and to open a port for both. You will need to add rules for each protocol.

firewall-cmd --permanent --add-port=22/TCP
firewall-cmd --permanent --add-port=53/UDP

Remove a Port for TCP or UDP

Using a slight variation on the above structure, you can remove a currently open port, effectively closing off that port.

firewall-cmd --permanent --remove-port=444/tcp

Add a Service

These services assume the default ports configured within the /etc/services configuration file; if you wish to use a service on a non-standard port, you will have to open the specific port, as in the example above.

firewall-cmd --permanent --add-service=ssh
firewall-cmd --permanent --add-service=http

Remove a Service

As above, you specify the remove-service option, and you can close off the port that is defined for that service.

firewall-cmd --permanent --remove-service=mysql

Whitelist an IP Address

To whitelist or allow access from an IP or range of IPs, you can tell the firewall to add a trusted source.

firewall-cmd --permanent --add-source=192.168.1.100

You can also allow a range of IPs using what is called CIDR notation. CIDR is outside the scope of this article but is a shorthand that can be used for noting ranges of IP addresses.

firewall-cmd --permanent --add-source=192.168.1.0/24

Remove a Whitelisted IP Address

To remove a whitelisted IP or IP range, you can use the –remove-source option.

firewall-cmd --permanent --remove-source=192.168.1.100

Block an IP Address

As the firewall-cmd tool is mostly used for opening or allowing access, rich rules are needed to block an IP. Rich rules are similar in form to the way iptables rules are written.

firewall-cmd --permanent --add-rich-rule="rule family='ipv4' source address='192.168.1.100' reject"

You can again use CIDR notation also block a range of IP addresses.

firewall-cmd --permanent --add-rich-rule="rule family='ipv4' source address='192.168.1.0/24' reject"

Whitelist an IP Address for a Specific Port (More Rich Rules)

We have to reach back to iptables and create another rich rule; however, we are using the accept statement at the end to allow the IP access, rather than reject its access.

firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.1.100" port protocol="tcp" port="3306" accept'

Removing a Rich Rule

To remove a rich rule, use the option —remove-rich-rule, but you have to fully specify which rule is being removed, so it is best to copy and paste the full rule, rather than try to type it all out from memory.

firewall-cmd --permanent --remove-rich-rule='rule family="ipv4" source address="192.168.1.100" port protocol="tcp" port="3306" accept'

Saving Firewall Rules

After you have completed all the additions and subtraction of rules, you need to reload the firewall rules to make them active. To do this, you again use the firewall-cmd tool but using the option –reload.

firewall-cmd --reload

Viewing Firewall Rules

After reloading the rules, you can confirm if the new rules are in place correctly with the following.

firewall-cmd --list-all

Here is an example output from the –list-all option, you can see that this server has a number of ports, and services open in the firewall along with a rich rule (that forwards one port to another).

[root@alma ~]# firewall-cmd --list-all
public (default, active)
interfaces: enp1s0
sources: 192.168.1.0/24
services: dhcpv6-client dns http https mysql nfs samba smtp ssh
ports: 443/tcp 80/tcp 5900-5902/tcp 83/tcp 444/tcp 3260/tcp
masquerade: no
forward-ports:
icmp-blocks:
rich rules:
rule family="ipv4" source address="192.168.1.0/24" forward-port port="5423" protocol="tcp" to-port="80"


Hopefully this will help a lot of you that end up just not using a firewall at all because it intimidates you not knowing how to use it correctly. Well, I’ve just eliminated that excuse, so now I want to see more of you securing your servers and dialer systems. Here is a few articles to get you started in the right direction.

This will show you how secure OpenSUSE LEAP
https://dialer.one/how-to-scratch-install-the-dynportal-on-centos/?amp
Securing CentOS, Alma or Rocky Linux

Here are some more articles in relation to VICIdial security for your servers

How to – Use the built in Dynamic Portal for Vicibox
How to – Turn on IP whitelist in Vicidial
How to – Use one dynamic portal for whitelisting and have it sync across an entire cluster
How to – Fix the firewall on Vicibox10


That’s it for this article, hopefully you guys take this serious because hackers, especially ransomware thieves are targeting dialer servers in particular for their schemes, such as using the VoIP to call their victims to either trick them into downloading files or threatening them over the phone with blackmail or other means. BazarCall is one of the more well known tools thats being used by the ransomware group called Ryuk.

How to – Setup a ViciDial Cluster

ViciDial Cluster

How to – Setup a ViciDial Cluster

This article is going to go over the steps I suggest to take in order to setup a ViciDial Cluster. I do things a little different when it comes to this to prepare for worst case scenario that a server may have problems and have to be taken offline, I install all services to each server, such as apache, mysql and asterisk this way if need be, they each can take on additional roles to cover for a server having to be taken out of production. Obviously this is going to assume you have ViciDial already installed on each server with all roles ready to go. To do so you can follow any one of my articles for scratch installs or you can just use an ISO to install of which I suggest using Vicibox v9.0.3 over V10 because of the issues with the V10 firewall and dynamic portal not working correctly, even if you do apply my fix, I find V9 to be more stable.

ViciDial Cluster
ViciDial Cluster

Step 1 – Install Vicidial on each server

As I said above, I suggest installing all services on each server and just leaving the ones not needed for each box, disabled until needed. So if you are using an ISO install instead of one of my scratch instructions, for the purpose on this article, lets say ViciBox v9.0.3. The first thing you need to do after loading v9 is to upgrade the operating system from Leap 15.1 to Leap 15.2 using these instructions, because Leap 15.1 is end of life(no more updates). After that use the command, vicibox-install and choose Y(yes) for the options shown in the picture below:

ViciBox Installer
vicibox-install

Repeat this process on each server and then move on to step 2.

Step 2 – Turn off services not needed on each server role

Now we need to disable services not needed on each server to save on resources, but this way they are there if they are needed in the future.

  • DB Server: systemctl disable apache2;systemctl disable asterisk
  • Web Server: systemctl disable mysql;systemctl disable asterisk
  • Asterisk Servers: systemctl disable mysql

We want to leave apache running on the asterisk servers so we can install webrtc for webphones

Step 3 – Run the install.pl script on each server

Now we want to link them all together by running the install.pl script located in the source directory for vicidial, follow the following commands to get to and run it:

cd /usr/src/astguiclient/trunk
perl install.pl

Now follow the prompt and answer them accordingly. The pictures below will show the choices needed for each server role except make sure you set the IP for the DB server on all the rest instead of localhost.

DB Server and Web Server

image 7
DB Server

For the web server make sure you put the DB server IP instead of localhost

Asterisk Servers

image 8
Only use 5 and 7 on ONE asterisk server, not all, the rest put 123468

Make sure you only put 5 and 7 keepalives on one asterisk server, the rest you should only choose 123468.

Step 4 – Add them to the GUI for ViciDial

Now we need to add them into the GUI for Vicidial by going to Admin then servers

image 9
Go to Servers in the Admin area

Once you are here, click “Add a new server”

Once you are here, click "Add a new server"
Once you are here, click “Add a new server”

Fill out the fields accordingly and click submit

image 12
Add a new server

Now for the DB and web server turn the options to N(no) where you see highlighted below:

image 13
Active server, Active Asterisk server and Active agent server set to N

Now reboot all servers and then check your reports page to make sure all servers are set to green like shown below

ViciDial Cluster
ViciDial Cluster

That’s all there is to it, not as hard as you thought it would be, right? If you have any questions feel free to join our live support on Skype:

image 14
Skype Channel

I hope this helps!

Chris aka carpenox

Table of Contents – Knowledge Base

CyburDial

I am carpenox from the Vicidial forums and I enjoy helping our community, of which I do free of charge, however my one on one time helping people out I do have to charge for my time in order to keep this going. If my articles have helped you out and you’re making money now because of my help, please think about donating to the cause so I can keep this blog going. Here is a link to donate through PayPal.

Check out all of our social media platforms -:- https://linktr.ee/CyburDial

Join us on Discord: https://discord.gg/jt8sNvJM

Table of Contents

10 Latest Posts

Information

HIPPA Compliance
HIPPA Compliance

Book time with carpenox now

ViciDial Scratch Install Instructions

Troubleshooting ViciDial

How To’s

Security

STAYING COMPLIANT

CyburDial – Check out our new interface

CyburDial Agent

CyburDial – Check out our new admin and agent interfaces

We are pleased to announce the release of our new interface! Check our the admin and agent areas with our fresh new professional look. You can login through CyburDial Demo with the username: 0000 and the password: demo but make sure you login through the firewall access first in order to have your IP added to the firewall.

CyburDial Admin Interface

CyburDIal Admin
CyburDIal Admin

Our easy to navigate agent interface has all the features you could need and a nice crisp clean look that brings our industry into the year 2022!

CyburDial Agent Interface

CyburDial Agent
CyburDial Agent

Realtime campaign monitoring

realtime1
Realtime campaign monitoring

Check out our complete pricing and features here or fill out the form below to get a custom quote

How to – Scratch install the dynportal on CentOs, Rocky or Alma Linux

how-to-scratch-install-the-dynportal-on-centos/

How to – Scratch install the dynportal on CentOs, Rocky, or Alma Linux

This article will go over the steps to Scratch install the dynportal on a scratch CentOs, Rocky or Alma Linux Vicidial box that normally comes with the ISO. I have created the files you need and host them on one of my sites for download.

Step 1 – Download the necessary files

You will need 4 files to get this working on your server that you can download below

yum install -y firewalld
cd /home
wget https://dialer.one/dynportal.zip
wget https://dialer.one/firewall.zip
wget https://dialer.one/aggregate
wget https://dialer.one/VB-firewall

Step 2 – Move and unzip the files

You can copy and paste the following

  • mkdir -p /var/www/vhosts/dynportal
  • mv /home/dynportal.zip /var/www/vhosts/dynportal/
  • mv /home/firewall.zip /etc/firewalld/
  • cd /var/www/vhosts/dynportal/
  • unzip dynportal.zip
  • cd etc/httpd/conf.d/
  • mv viciportal-ssl.conf viciportal.conf /etc/httpd/conf.d/
  • cd /etc/firewalld/
  • unzip -o firewall.zip
  • mv /home/aggregate /usr/bin/
  • chmod +x /usr/bin/aggregate
  • mv /home/VB-firewall /usr/bin/
  • chmod +x /usr/bin/VB-firewall
image 3
Unzip your files

Step 3 – Add your SSL cert to dynportal-ssl.conf and location for redirect is defaults.inc.php

You need to edit your dynportal-ssl.conf file in /etc/httpd/conf.d/

nano /etc/httpd/conf.d/viciportal-ssl.conf

change the location to your SSL cert files

Scratch install the dynportal on CentOs
Dynportal SSL config

nano /var/www/vhosts/dynportal/inc/defaults.inc.php

Step 4 – add entry to crontab

Add the following lines to the bottom of your crontab by typing: crontab -e

### ViciBox integrated firewall, by default just load the VoIP Black list and reload it every 4 hours
### You can lock everyone out of your server if you set this wrong, so understand what you are doing!!!
@reboot /usr/bin/VB-firewall --whitelist=ViciWhite --dynamic --quiet
* * * * * /usr/bin/VB-firewall --whitelist=ViciWhite --dynamic --quiet --flush

Step 5 – Add ports to firewall and apache

Now use firewall-cmd and open port 446 on the firewall for public zone like such:

firewall-offline-cmd --add-port=446/tcp --zone=public --permanent

And edit the apache conf file to add the port to it:

  • nano /etc/httpd/conf/httpd.conf
  • Add this line: Listen 446

Step 6 – Restart services

  • service firewalld restart
  • service httpd restart
  • systemctl enable firewalld

That’s it, now go to http://yourdomain.com:446/valid8.php and you should see the following:

Dynportal Interface
Dynportal Interface

CyburDial -:- A Cloud Based ‘Zero Trust’ Predictive Dialer

CyburDial

CyburDial -:- A Cloud Based ‘Zero Trust’ Predictive Dialer

In this emerging world of ransomware, malware, and hacks such as SolarWinds becoming our everyday reality, how concerned are you with data security? How important is your privacy and sense of security? WCW I(World Cyber War) is right around the corner and if you think that your business is not a target, then perhaps you should check out my blog post about how hackers are leveraging Linux servers, especially for their personal criminal VoIP needs(ie. for ransomware threats) and other monetary gains. That’s why, all of us here at CyburDial, offer you a “Zero Trust” environment as suggested by the NSA, that we invite you to try for free by filling out the form below.

What does that mean and how is that possible?

CyburDial -:- Like the Phoenix, we can rise from the ashes!
CyburDial Live Demo -:- https://cybur-dial.com
user: 0000 / pass: demo

Our new CyburDial system, with it’s fresh new design, offers you such tools as ‘IP whitelist access’, ‘2 factor authentication’ and a completely ‘encrypted (SSL/STIR/SHAKEN)’ systemwide connection, combined with the peace of mind that our network is operated and maintained by our Cyber Security professionals lead by myself, of which I am a certified ethical hacker that has been in the cyber security industry since the late 90’s. So, on behalf of myself, my fellow security staff members, technical support staff and the rest of us here at CyburDial, are proud to offer you CyburDial.

  • CyburDial
  • CyburDial Admin Panel - Complete Remote Business Management Tool
  • Agent communication platform
  • Quality Control Scorecards - Make sure your employee's are following the "script"
  • Two Factor Authentication
  • 2 Factor Authentication
  • IP Whitelist Access
  • Easy User Management - Add/Delete/Edit Users and Phones with an easy to use web interface
  • Firewall Access

What’s new?

Our quality control module not only lets you create your own score cards to dictate the way a call progresses, you then have access to listen, grade and reassign the call back to its original caller or transfer it to its next stage of the sales funnel. Our programming team alongside CyburDial’s API capabilities can give your business management system, a custom fit, based around your business’ needs. We invite you to sign in and try it out, then get a free trial account on CyburDial by filling out the form below:

Quality Control Scorecards - Make sure your employee's are following the "script"
Quality Control Scorecards – Make sure your employee’s are following the “script”

https://cybur-dial.com -:- Login: 0000 / pass: demo

CyburDial Agent
CyburDial Agent

What is a Predictive Dialer?

CyburDial

There are four words that every business owner loves to hear: Save time and money. It’s not only music to their ears, but money in their pockets. That’s why so many business leaders are adding a cloud based predictive dialer to their marketing, sales, and customer management suites.

Increased call agent efficiency, real-time interactions, better customer experience, and improved lead management are just a few of the ways businesses are enjoying the benefits of their outbound dialer.

Make an informed decision about predictive dialing and the future of your enterprise. Keep reading to learn everything you need to know about these types of dialers.

What is a predictive dialer?

A predictive dialer is a software that dials a list of phone numbers quickly and accurately and can also return calls to your call center agents. It is a software designed to accurately predict agent availability, screen out busy signals, answering machines, and disconnected phones, and optimize the outbound call pace to connect sales representatives with leads fast. Think of it as IVR for outbound calling.manual vs. predictive dialer

Sometimes called an “outbound dialer” or a “hosted dialer,” these systems use machine-learning algorithms so you can spend less time between conversations for your agents, as well as wait times for your customers when no agent is available. In the background, the software analyses answered calls, dropped calls, the number of active agents, and more, filtering out unproductive calls so your agents get more talk time.

While you can purchase physical on-premise hardware to accomplish these tasks, most modern companies use cloud hosted dialers instead, often integrating their software with their overall contact center platforms.

This software is a workhorse for your call center and sales strategy alike.

Why invest in a cloud based predictive dialer?

With so many business solutions being tossed at you daily, it can be hard to navigate and understand what will actually benefit your bottom line and provide a decent ROI. We think a dialer of this type can be a smart choice for any business currently using or considering adding a call center. 

1. You’re busy.

Managing your sales team, maximizing profits, delighting customers. Your plate is full. Unless you have a bunch of time to waste on hacking systems to maximize your call center agent’s task lists, you’re going to spend a lot of unnecessary energy training your staff to do mediocre rather than great work.

2. You want your sales team to be more efficient.

By automating the process of calling customers, your agents are no longer wasting their time dialing numbers. This increased efficiency means more output from your agents per hour, exponentially improving agents’ productivity by reducing their idle time and accelerating sales (your agents will spend more time connecting with potential customers than re-dialing dropped calls).

3. You want to manage your leads in a smart way.

You can integrate a cloud predictive dialer across different platforms such as phone, email, chat, mobile, social and more. This gives you better, smarter lead management. An outbound dialer can be core to unifying your messaging and communications across multiple channels.

4. You strive to provide exemplary customer service.

Cloud based dialers boast specific features that allow you to contact your leads at times that are convenient to them. Perhaps in the morning at home, over the weekend via an SMS / text message, or during the day at their office number. Or maybe, they just want to leave you a voicemail.

Stronger customer service = better brand affinity = more prospects for long term sales. You can turn your contact center into something powerful that delights your customers rather than annoys.

5. You want to reduce operational costs.

Who doesn’t? ?

With the help of a cloud based predictive dialer, you can reduce the number of agents on staff and call lines without sacrificing any results. 

One more time for the folks in the back: these types of dialers make it possible for your call center to make more live calls than ever with less staff to make it happen.

Progressive vs. Predictive vs. Auto dialer

Progressive, predictive, and auto dialers initiate outbound calls from a contact list automatically and sequentially while also transferring calls to live agents.

These types of dialers don’t wait for the agent to let the system know that they’re ready for the next call. Instead, they optimize their dialing modes to minimize the gap between your agent hanging up with one lead and connecting with the next.

Let’s say that the software has deduced that most phone calls last an average of 60 seconds. Moreover, it takes roughly 10 seconds for the system to dial a new telephone number and hear “Hello” from the person on the other end. In a predictive dialing system, the software will initiate the next call at the ~50-second mark. Once the agent hangs up with lead 1, they’ll be prepped and ready to great lead 2, sparing no idle second in between – which means you get real-time communication.

Progressive dialers, on the other hand, initiate outbound calls for each available agent. To meet the demand for increased outbound calls, they’ll need to deploy additional agents. Similarly, an auto dialer distributes connected calls among available reps, whereas a dialer that is predictive dials multiple contacts simultaneously to increase the odds of establishing a connection. For example, If the software has learned that an average of 1 out of every 4 calls picks up, it might dial four numbers at once.

» Here’s our complete guide on Power Dialers, Predictive Dialers, and Progressive Dialers.

Predictive Dialer Pricing

Through our rigorous research and testing, we have found that the typical dialer cost ranges from $100 per user per month and up. Most software systems will build custom quotes for you, your business, and your business goals, so don’t be surprised when the specifics around dialer pricing are hard to come by. 

A customized price is an industry norm, but you can find tiered pricing options available at hosted dialers like Genesys, ChaseData, and dialerAI. A cheap dialer of this type can be uncovered with a little digging and comparing price plans.

CRM Integrations

You might think it is important to find a predictive dialer with a CRM, which can be a smart tactic to further arm your call agents with the right information they need to close a big sale. Luckily for you, most of these software systems can integrate seamlessly with popular CRMs like Salesforce.

The combination of a CRM + dialer means you’ll be able to quickly organize lead data, sales info, customer history, show the caller ID and create a superior customer engagement environment for them along the way.

Country-Specific regulations

Adhering to legal compliance can be a huge barrier to self-manage without the help of a cloud based predictive dialer. Just like call recording, there are specific legislations for automatic dialing as well.

In 1991, the Telephone Consumer Protection Act was passed, which prohibits the use of an automatic telephone dialing system to contact a telephone number without express prior consent, to hinder practices like telemarketing. This has continued to evolve into the National Do Not Call registry, also known as the DNC registry. You don’t want to dial numbers on this list—or those of parties who haven’t given you permission (dialing “accidents” aren’t an effective legal defense). With the right tool, you can easily adhere to these regulations without fear of penalties.

Here are few country-specific call center dialer regulations to be aware of:

CyburDial is a 100% Cloud Based Predictive Dialer

  • Robust feature sets
  • Network reliability
  • Great customer support and service

Tired of being tethered to an office or a computer? Unleash yourself today!

tablet2

Tired of being locked to your desk at work? What about concerns about Covid? Do you want to be able to work not only from home, but from anywhere….with any device? Well, we have some great news for you, not only will you no longer be locked in an office building behind a desk or cubicle, but you don’t need to be tethered to a computer any longer either! Watch the following videos to see how our cloud based predictive dialer works on iPads, Tablets, iPhones and other Android devices, not just the regular devices you’re used to such as laptops and desktops.

iPhone
Laptop

Ask us how we can help you get unleashed from the monotonous routine of hitting the dialer from a confined cubicle, to be able to work from ANY DEVICE from ANYWHERE!! Call us now: 954-947-7572

Check out our live demo free!

CyburDIal Admin

Check out the capabilities of our cloud based predictive dialer with our live demo. We offer Vicidial, ViciDialNOW, GoAutoDial and more.

Want to check out what we can offer? Login to the newest version of ViciDial in the industry, backed by a non public version of Asterisk(18.21) and also equipped with CyburPhone 3.5(Unreleased) and take it for a test drive now.

Https://cybur-dial.com
Admin Login: 0000 / Password: demo
Agent Login: 0000 / Password: demo

Our services come backed by our cyber security expertise giving you the most protection for your data and sensitive information.

We offer setups for Outbound, Inbound, Surveys, and press 1 campaigns. Multi cluster setups custom made to meet your needs. Check out the second picture to see one of our cluster setups .