Access asteriskcdrdb remotely(SOLVED)


(Randy Millner) #1

FreePBX 15.0.17.34 (in the sangoma cloud)

Currently our on-premise freepbx server has its my.cnf set to bind to it’s LAN IP and has worked quite well over the decades in allowing all users on the LAN to query the CDR records without issues as part of our customer billing system.

We now moved to the hosted sangoma freepbx in the cloud.
I tried setting the bind-address = After setting root password and creating a user for asteriskcdrdb

restarting mysql I still cannot connect from local LAN.
Access denied for user ‘callerid’@‘cpe-66-68-86-230.austin.res.rr.com’ (using password: YES)

How do I get a safe remote mysql connection set up so we can get our custom CallerID app running?


(Andrew) #2

You can try setting the bind address to 0.0.0.0 to see if that works.


#3

you need to add a mysql user allowing access cpe-66-68-86-230.austin.res.rr.com/ with access to the asteriskcdrdb database

you need to allow connection to in and out on TCP/3389 for 66.68.86.230 through all firewalls


(Randy Millner) #4

Thanks,
I added a user on the cloud server
grant all priveleges on asteriskcdrdb.* to ‘callerid’@’%’ identified by ‘’ with grant option;

then on my local pc for testing I do
mysql -ucallerid -p -h asteriskcdrb

The problem is not with my local firewall. I can connect to other mysql servers.
perhhaps I should create the mysql user on the remotepbx using my specific IP instead of the ‘%’


#5

Abolutely if you you want a ‘secure ’ ACL’

First step , tpdump -vvnn port 3389 to verify traffic is passing.


#6

I use autossh to keep up an ssh tunnel used to access remote databases via tunnelling to keep the access secure over the network


(Randy Millner) #7

i tried tpdump not found

I added user like this
grant all privileges on asteriskcdrdb.* to ‘asset’@‘xxx.xxx.xxx.xxx’ identified by ‘’ with grant option;

then I changed the bind address=0.0.0.0

restarted mariadb

back on the local machine
mysql -uasset -p -h asteriskcdrdb
ERROR 1045 (28000): Access denied for user ‘asset’@‘24-155-92-212.static.grandenetworks.net’ (using password: YES)


#8

my typo tcpdump


(Randy Millner) #9

Solved,

I was trying to command line from wrong network.
all is good.


(system) closed #10

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.