YANKAUSKAS
asked on
Can't connect to Asterisk Manager Interface through port 5038 !!!
My OS is Windows XP, I setup a Linux Redhat 8 on VMWare to test Asterisk through Bridged Network. Both Virtual OS (linux - 10.0.0.12) and real OS (WinXP - 10.0.0.3) is connected to the internet. After that, i started to config Asterisk, I want to enable the Asterisk Manager Interface.
Here is manager.conf:
-------------------------- ------
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
-------------------------- ------
; setup user:
[username]
secret=password
permit=0.0.0.0/0.0.0.0
read = system,call,log,verbose,co mmand,agen t,user,con fig
write = system,call,log,verbose,co mmand,agen t,user,con fig
-------------------------- ------
After restart/reload asterisk, I connect to Asterisk through telnet but I don't work.
telnet> open 10.0.0.12 5038
Connecting to 10.0.0.12... Could not open connection to the host, on port 5038: Connect failed.
But if I ping to that address, everything is OK!
What's happen? I don't know why I can't connect to the Asterisk Manager Interface?
Here is manager.conf:
--------------------------
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
--------------------------
; setup user:
[username]
secret=password
permit=0.0.0.0/0.0.0.0
read = system,call,log,verbose,co
write = system,call,log,verbose,co
--------------------------
After restart/reload asterisk, I connect to Asterisk through telnet but I don't work.
telnet> open 10.0.0.12 5038
Connecting to 10.0.0.12... Could not open connection to the host, on port 5038: Connect failed.
But if I ping to that address, everything is OK!
What's happen? I don't know why I can't connect to the Asterisk Manager Interface?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you so much! Your answer is correct!
To turn off the firewall I have type in the command line:
-------------------------- ---------- ---
# /etc/init.d/iptables save
# /etc/init.d/iptables stop
-------------------------- ---------- ---
How to add port 5038?
To turn off the firewall I have type in the command line:
--------------------------
# /etc/init.d/iptables save
# /etc/init.d/iptables stop
--------------------------
How to add port 5038?
Normally the firewall rules are stored in /etc/sysconfig/iptables and you would just copy an existing line and change the dport to 5038. Then to activate it stop and start the iptables.
ASKER
Thank you!
ASKER
_________________________
# Generated by iptables-save v1.3.8 on Thu Mar 27 21:40:41 2008
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [11218:6418164]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p esp -j ACCEPT
-A RH-Firewall-1-INPUT -p ah -j ACCEPT
-A RH-Firewall-1-INPUT -d 224.0.0.251 -p udp -m udp --dport 5353 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 25 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 2049 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m state --state NEW -m udp --dport 137 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m state --state NEW -m udp --dport 138 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 139 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 445 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 23 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Thu Mar 27 21:40:41 2008
_________________________
Is it OK? How to turn off the firewall or add port 5038 to it?
Thank you very much!