Page 1 of 1

ViciBox9.0.2 - Dynportal Question

PostPosted: Sun Jun 14, 2020 10:23 pm
by carpenox
I understand that the dynportal inserts the IP address into the asterisk.vicidial database, correct? How can that be transferred to the IPList: Whitelist on the admin section of the vicidial interface? Is this possible? Or where in the database does it go and ill make a query

Re: ViciBox9.0.2 - Dynportal Question

PostPosted: Wed Jun 17, 2020 10:28 am
by Kumba
The dynamic list isn't really a list. It looks up entries from the vicidial_user_log table. It searches for LOGIN and VICIBOX entries in this table.

Re: ViciBox9.0.2 - Dynportal Question

PostPosted: Wed Jun 17, 2020 6:26 pm
by carpenox
So it doesn't allow access to the system?

Re: ViciBox9.0.2 - Dynportal Question

PostPosted: Wed Jul 29, 2020 11:26 pm
by carpenox
Ok let me ask you this, what table does the dynportal store its information or IP list? I am going to try to write a mysql query to grab the data from it and insert it into the whitelist for vicidial.

Re: ViciBox9.0.2 - Dynportal Question

PostPosted: Wed Nov 11, 2020 2:21 am
by covarrubiasgg
Try with

Code: Select all
select computer_ip from vicidial_user_log where event = 'VICIBOX' group by computer_ip;


That will show you the logins to the Dynamic Portal, but note that you will want to use a date range or it will show you all the logs from the beginning of time and Vicibx firewall only looks for 14 day by default.

Also take a look to this query, is the one VB-firewall.pl uses to add ips to the dynamic ipset

Code: Select all
SELECT computer_ip FROM vicidial_user_log WHERE event IN ('LOGIN', 'VICIBOX') and event_date >= DATE_SUB(NOW(), INTERVAL 14 DAY) group by computer_ip;

Re: ViciBox9.0.2 - Dynportal Question

PostPosted: Wed Nov 11, 2020 8:11 am
by carpenox
good shit, thats some good info, i am gonna have to see about changing the way i do it now to perhaps use that first query more efficiently because right now I just have the firewall updating every 60 seconds to the dynamic list

Thanks

nox

Re: ViciBox9.0.2 - Dynportal Question

PostPosted: Wed Nov 11, 2020 12:17 pm
by covarrubiasgg
Don't understand what's wrong about having the dynamic firewall running * * * * *

I only use Allow List (WhiteList) for carriers and locations with static IP, but most agents have a dynamic IP so I don't want those IPs on a white list.

Also the Allow List (White list) is loaded using the same script VB-firewall.pl

Re: ViciBox9.0.2 - Dynportal Question

PostPosted: Wed Nov 11, 2020 12:21 pm
by carpenox
nothing is wrong with dynamic firewall running, thats what i am using, the problems occurs when they go to login after validating there IP, it takes a few min for the firewall to update, i originally was trying to find a way to move the IP's from the dynamic list directly into the firewall, but i ended up with just running the vb-firewall script every 60 seconds instead