TIPS Voicemail maint password needed

grzmrc

Member
Joined
Oct 14, 2013
Messages
60
Reaction score
2
Hi all,
I got the same issue, so my users are prompted for maint password to get into voicemail.
I read the issue is related to an asterisk directly exposed to internet, but I'm sure my asterisk is behind natIs it possible to solve the issue without lowering the security?
Thanks in advance

(I'm on incrediblepbx 11)
 
Joined
May 23, 2013
Messages
223
Reaction score
28
Hi all,
I got the same issue, so my users are prompted for maint password to get into voicemail.
I read the issue is related to an asterisk directly exposed to internet, but I'm sure my asterisk is behind natIs it possible to solve the issue without lowering the security?
Thanks in advance

(I'm on incrediblepbx 11)


So did you try the steps above to remove the password? I just commented everything out of the file for what it's worth so I can put it back later if I wanted.
 

grzmrc

Member
Joined
Oct 14, 2013
Messages
60
Reaction score
2
Did you mean this step?

"rm /etc/pbx/httpdconf/ari.conf
service httpd restart"

For what I understand, this issue is caused to a directly exposure of asterisk to internet, but in my case I have placed asterisk behind a NAT so I don't know the reason for that I get the maint password prompt. If it is possible I'd prefer to don't lower the security, if it is not strictly needed.
Exactly, what is the risk of doing the step you mentioned?
Thanks
 
Joined
May 23, 2013
Messages
223
Reaction score
28
Yes if you want to access the user portal without the maint password then yes you need to do that. If you don't want to lower the security then you will have to give users the password. If you are behind a NAT with no open ports to the internet then you should be safe to do this, but for maximum security in anything keep it locked down.
 
Joined
Oct 18, 2013
Messages
220
Reaction score
20
I was playing with this a little tonight and while it works (I just commented out the file instead of removing it), it still asks for the password on every page due to it including functions.php and functions.inc.php from /admin. Hitting cancel seems to work though...(although I didn't extensively test everything).
 
Joined
May 23, 2013
Messages
223
Reaction score
28
Strange I've never had this happen and I have 4 machines setup that way right now. I don't remember doing anything other then commenting out that file.... I'm setting up a new machine now I'll see what happens.
 

grzmrc

Member
Joined
Oct 14, 2013
Messages
60
Reaction score
2
Mark, some days ago I got this error message:

retrieve_conf failed to sym link:
/etc/asterisk/http.conf from core/etc (Already exists, not a link)
This can result in FATAL failures to your PBX. If the target file exists and not identical, the symlink will not occur and you should rename the target file to allow the automatic sym link to occur and remove this error, unless this is an intentional customization.


The correct way to solve the symlink issue is to rename the /etc/asterisk/http.conf, but after that operation, it starts to asks for the password on every voicemail/recordings page. Hitting cancel seems to work thoughmy user.


So I delete the symlink automatically created in /etc/asterisk/http.conf and restored the old http.conf. now the voicemail/recordings works great.
Try to have a look to your http.conf
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,202
Reaction score
5,225
This one raises an issue of dueling paradigms unfortunately. In the FreePBX security model, /var/www/html is wide open insofar as Apache is concerned and security is left to FreePBX. In the PIAF model, we use Apache to manage web security because of numerous problems historically with FreePBX security holes. Unfortunately, FreePBX has taken control of more and more configuration files in /etc/asterisk by inserting symlinks that point back to files in the /var/www/html tree. Usually, this doesn't pose an issue; however, in the case of http.conf, it's a serious problem (for PIAF users) because that file also manages voicemails and recordings. Because http.conf now is in the /var/www/html tree, you get prompted for a password on PIAF systems.

What's puzzling about the FreePBX approach in this case is that FreePBX has full read/write access to /etc/asterisk so there's really no need for the symlink at all. We will chat with the FreePBX folks and see if we can work something out. In the meantime, it's probably safer NOT to remove/rename your existing /etc/asterisk/http.conf file and ignore the FreePBX symlink warning.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,202
Reaction score
5,225
For WebRTC, you definitely need Asterisk's built-in web server. But you still could manage it in /etc/asterisk instead of in the /var/www/html tree. FreePBX has access/control of files in both places. The problem is that exposing a server to the Internet gives the whole world the ability to hack away on the /var/www/html tree while /etc/asterisk remains 100% protected from web attacks.

The other issue, of course, is the Asterisk web server. Unlike Apache which has been hardened after many, many years of attacks, the Asterisk web server has never received much use or testing. Look at the number of successful SIP vulnerabilities in Asterisk over the years, and it may give us some idea of what lies ahead with the Asterisk web server. So you probably need to ask yourself whether being a WebRTC pioneer is worth the risk. It's your phone bill.

BfejSmaCUAAQVXJ.jpg:large
 

phonebuff

Guru
Joined
Feb 7, 2008
Messages
1,117
Reaction score
129
Along this thread is also this one, that I reopened on Dec 11th --

http://pbxinaflash.com/community/index.php?threads/ari-requires-username-password-maint-user.13935/

To be honest I never solved the problem, just converted the user to using the enhanced CDR reports and pulling the audio recording from there when they needed it, but this was an administrator not a group of individual users..

==============================
Date and Time = 201402021058
PIAF color = GREEN
Asterisk Status = ONLINE
Dahdi Status = ONLINE
MySql Status = ONLINE
SSH Status = ONLINE
Apache Status = ONLINE
Iptables Status = ONLINE
Ip6tables Status = ONLINE
Fail2ban Status = ONLINE
IP Connect Status = ONLINE
Free Disk Space = ADEQUATE
Free Memory = ADEQUATE
NTPD Status = ONLINE
Sendmail Status = ONLINE
Samba Status = OFFLINE
Webmin Status = ONLINE
Ethernet 0 Status = ONLINE
Ethernet 1 Status = ONLINE
Wlan Status = N/A
PIAF Installed Version = 2.0.6.4
Freepbx Version = 2.11.0.11
Running Asterisk =
Asterisk Source Version = 11.6.0 MODIFIED
Dahdi Source = 2.7.0.1
Libpri Source = 1.4.14
System Verified = *VERIFIED*
ipbx.local on 172.16.200.2 - eth0
CentOS release 6.4 (Final) :32 Bit Kernel: 2.6.32-358.23.2.el6.i686

========================================================
 

Hyksos

Guru
Joined
May 28, 2011
Messages
474
Reaction score
70
Hi,

1. Symlink Error
About the symlink error, it was already discussed and resolved in another post, here is the solution again:
It does that on purpose right now and no update will correct it. It's preserving potential custom modifications.

You need to rename/delete/move the file in /etc/asterisk (mv /etc/asterisk/http.conf /etc/asterisk/http.conf.orig) then do either:
amportal a r
at the linux CLI.
or press the "Apply config"
in the FreePBX GUI.
This will fix the symlink error for http.conf, it's like resolving all other symlink errors when FreePBX picks up a new config file.
It doesn't want to assume anything about whether you had inserted custom modification in there, blindly removing yours without error or warning for intervention could potentially silently overwrite some people custom modification to the file.

2. Asterisk http.conf relation to ARI?
Someone will have to explain what this http.conf symlink error (and fix) has to do with the ARI (/recordings) http auth protection and or desire to remove such protection.
Because it has nothing to do with it whatsoever. Like not even a remote relation or link between the two issues/subjects.

3. Asterisk mini http server
Seen from where I stand the default config to the asterisk mini http server seem secure. Haven't dig into it but assuming their setting does what it advertise:
On my system the default bind address for it was 127.0.0.1. So, secure from my point of view if the settings does what it should.
On Lorne's system up there the bind address was his LAN IP, this could represent a security issue if his port 8088 end up been exposed on the internet.
Not sure why a properly configured system would expose that but in his case he has to be cautious about exposing it because the * mini http server would bind to his LAN and not only to his localhost.
So IF in some cases the default bind address automatically end up being the LAN address there is a potential security risk but running zero firewall and exposing the entire server on the internet to count on each application security/settings to save the day is and has always been a weak security implementation.
(I'm not an expert about asterisk mini http server but I'm going on common sense and default config I have seen here + standard interpretation of the configuration options and security model for a server (firewall).)

4. Accessing the ARI without being prompted by an http auth, ANY http auth.
Was also already discussed in length like Lorne mentionned but I will include here for clarity.
Of course this removes ALL http auth only, you will still need to login on the residual (web page) prompt.
The second prompt, on the page, require a voicemail box and password
OR
the "User Portal Admin Username" and "User Portal Admin Password" set from the "settings"->"advanced settings" menu in FreePBX.
Here is what you need to do for the ARI to function without having any http auth prompt and still protect the rest of the admin GUI and /admin folder.
If this does not work you either did not do "service httpd restart" after or you messed something else while trying to fix it another way or your own way.

Edit /etc/pbx/httpdconf/ari.conf
this:
Code:
#Password protect ARI interface
<Directory /var/www/html/recordings>
AuthType Basic
AuthName "Restricted Area"
AuthUserFile /usr/local/apache/passwd/wwwpasswd
Require valid-user
</Directory>
Becomes:
Code:
#Password protect ARI interface
#<Directory /var/www/html/recordings>
#AuthType Basic
#AuthName "Restricted Area"
#AuthUserFile /usr/local/apache/passwd/wwwpasswd
#Require valid-user
#</Directory>
(all commented out)


Edit /etc/pbx/httpdconf/pbx.conf
Insert this in the file:

Code:
#Allow critical assets for ARI
<Directory ~ "^/var/www/html/admin/assets/(js|images|css)">
Satisfy Any
Allow from all
</Directory>
(Allow critical assets for ARI)
Do service httpd restart
Access the ARI without http auth prompt.
We have of course always recommended people do that only when the server is NOT exposed on the Internet for it's apache http port (normal webserver).
Because by removing the auth to access the ARI and exposing it on the Internet, you're allowing anyone to hit the ARI to try to login with the ARI's admin user or an extension.

5. Location of http.conf and symlink
Lastly, I'm not sure I get the problem about the http.conf working like all other FreePBX conf file and being symlinked.
It's an asterisk conf file like another one it's now controlled by core and FreePBX does what it does like with other conf files.
ls -l /etc/asterisk/*
Will show that http.conf now operate under the same principle as other configuration files owned by FreePBX, not sure what changed about that except the fact that the file has now being picked up by FreePBX to be controlled via GUI.
Like other asterisk configuration files have been picked up in the past to be controlled by FreePBX.
Now we could discuss security more but I'm not sure it's necessary unless someone aim to recommend exposing FreePBX on the public internet is a good idea.
(None the less discussing security is always OK...)
Some probably do with good reason and I can only hope they know what they are doing and are making sure to limit their risks.
Of course there are security concerns, the app is located in a webserver and of course it's files are under control of the webserver.
There is a risk because phpMyAdmin files live under the web server, and you have to make sure you secure yourself against security flaw in it.
Or like Wordpress which lives under the webserver and also represent a security risks, all web app do if you expose them somehow.


Questions, comments or insults, I take them all!

Hope this helps.
 

Hyksos

Guru
Joined
May 28, 2011
Messages
474
Reaction score
70
I forgot to say that as it stand right now I don't consider there is any bug anywhere or anything that does not work as advertised.
Everything works as delivered and modifications proposed up there works to remove some security for people who wish to do so.

The ARI works, with or without http prompts (if removed like above).
You still need to login with a valid voicemail credential or the ARI admin user/pass that you can set via FreePBX advanced configuration in the GUI. (This works with and without http prompt removal)
The recording viewer is available under the ARI like it was before.

I would happily fix whatever needs works or investigation but someone first need to demonstrate the issue so I can replicate it, right now everything works and nothing has really changed, except that FreePBX picked up http.conf (completely unrelated.)

Just so we're clear that I'm open to working toward fixing anything that can be demonstrated as broken. Either in a base system or after applying any modifications that are proposed up there.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,202
Reaction score
5,225
lgaetz: Before we close the ticket, are we sure you can still call in and get your voicemail messages or was this just retrieving the messages through ARI??
 

Hyksos

Guru
Joined
May 28, 2011
Messages
474
Reaction score
70
Flame me for it if you want but I would suggest you're wasting your time.
We have already spent too much time on this considering there is nothing there!

I'm not saying trying to find problems and fixing them is bad, nor am I saying assuming stuff based on grandiosity is OK...
I'm saying this whole thing is based on misconceptions and misunderstandings, we're discussing through a forum, nothing new in that respects, stuff happens...

So further test this until your death... You won't find anything there, there is nothing to find.

If you feel something could still be going on and you feel something is not clear so far, based on user reports or stuff that has been said, feel free to ask.
But right now it's like saying we should test the water cooler in the kitchen because the pool guy just changed the pump in the shed by the pool....
So nothing against tests and further confirms but I'm sure Lorne can do better things with his time.

If something is not clear, explaining why you still have doubts, we can discuss it of course.
(Trying really hard not to be dismissive or anything)
 

grzmrc

Member
Joined
Oct 14, 2013
Messages
60
Reaction score
2
Restoring the old http.conf did not solve the issue as I believed.
I made too many attempts to solve the issue and I have not noticed that on some computers I stored the maint password.
The only thing that actually help me was to
Edit /etc/pbx/httpdconf/pbx.conf
and insert this in the file:

Code:
#Allow critical assets for ARI
<Directory ~ "^/var/www/html/admin/assets/(js|images|css)">
Satisfy Any
Allow from all
</Directory>
as hyksos suggested above.
I am very sorry to have given you incorrect information, but I believed to be in true and my only intention was to help someone.
Next time I will be more accurate.
sorry
 

Members online

No members online now.

Forum statistics

Threads
25,819
Messages
167,800
Members
19,247
Latest member
abuhyder
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top