Operating System - Linux
1819804 Members
3093 Online
109607 Solutions
New Discussion юеВ

How open port 5060, on Debian Sarge

 
SOLVED
Go to solution
debian111
Regular Advisor

How open port 5060, on Debian Sarge

Hi all,
I installed Asterisk Open Source PBX on my Debian Server. I should enable SIP protocol works, it is neccessary open port 5060-because SIP needs it.
My question is, how open port 5060 on Debian Sarge machine.

Regards
4 REPLIES 4
Sergejs Svitnevs
Honored Contributor

Re: How open port 5060, on Debian Sarge

This is an example on how to configure a Linux IPTables firewall for Asterisk:

# SIP on UDP port 5060. Other SIP servers may need TCP port 5060 as well
iptables -A INPUT -p udp -m udp --dport 5060 -j ACCEPT
# IAX2- the IAX protocol
iptables -A INPUT -p udp -m udp --dport 4569 -j ACCEPT
# IAX - most have switched to IAX v2, or ought to
iptables -A INPUT -p udp -m udp --dport 5036 -j ACCEPT
# RTP - the media stream
iptables -A INPUT -p udp -m udp --dport 10000:20000 -j ACCEPT
# MGCP - if you use media gateway control protocol in your configuration
iptables -A INPUT -p udp -m udp --dport 2727 -j ACCEPT

Regards,
Sergejs
debian111
Regular Advisor

Re: How open port 5060, on Debian Sarge

I entered in my console as root

/# iptables -A INPUT -p udp -m udp --dport 5060 -j ACCEPT

This should open port 5060? But when I enter in other machine command

telnet 192.168.xxx.xxx 5060

I got output

Trying 192.168.129.112...
telnet: Unable to connect to remote host: Connection refused

Should I adjust something else?



Sergejs Svitnevs
Honored Contributor
Solution

Re: How open port 5060, on Debian Sarge

telnet uses the TCP protocol as the transport to establish connection, but "iptables -p udp" allows UDP connection only.
debian111
Regular Advisor

Re: How open port 5060, on Debian Sarge

I will try again,
thank you for your time and help

regards
DebianS