Hello,
I activated firewall of the VPS which is hosting Asterisk server.
After that, I can’t connect my Asterisk server to Zoiper softphone.
I think firewall rejects this request.
How to enable access to Asterisk according to specific IP?
I have to add TCP /UDP 5060 port to Firewall?
you need to open for these ports
SIP:
UDP 5060
TCP 5061
RTP:
UDP XXXX-YYYY (port range defined in rtp.conf)
Thank you for your reply.
I turn on the firewall and opened those ports.
root@ubuntu-s-2vcpu-4gb-120gb-intel-ams3-01:~# sudo ufw status
Status: active
To Action From
-- ------ ----
Nginx HTTP ALLOW Anywhere
Nginx Full ALLOW Anywhere
9228 ALLOW Anywhere
22/tcp ALLOW Anywhere
22 ALLOW Anywhere
2222 ALLOW Anywhere
5060/udp ALLOW Anywhere
10000:20000/udp ALLOW Anywhere
5061/tcp ALLOW Anywhere
Nginx HTTP (v6) ALLOW Anywhere (v6)
Nginx Full (v6) ALLOW Anywhere (v6)
9228 (v6) ALLOW Anywhere (v6)
22/tcp (v6) ALLOW Anywhere (v6)
22 (v6) ALLOW Anywhere (v6)
2222 (v6) ALLOW Anywhere (v6)
5060/udp (v6) ALLOW Anywhere (v6)
10000:20000/udp (v6) ALLOW Anywhere (v6)
5061/tcp (v6) ALLOW Anywhere (v6)
But I can’t connect my Asterisk server to Zoiper. timeout error (408)
Hello, I need your help.
I installed Asterisk on my linux VPS.
Here is a guide I followed: How to Install Asterisk on Ubuntu 22.04
I turned on my VPS firewall and here is the status: (sudo ufw status)
Status: active
To Action From
-- ------ ----
Nginx HTTP ALLOW Anywhere
Nginx Full ALLOW Anywhere
9228 ALLOW Anywhere
22/tcp ALLOW Anywhere
22 ALLOW Anywhere
2222 ALLOW Anywhere
5060/udp ALLOW Anywhere
10000:20000/udp ALLOW Anywhere
5061/tcp ALLOW Anywhere
Nginx HTTP (v6) ALLOW Anywhere (v6)
Nginx Full (v6) ALLOW Anywhere (v6)
9228 (v6) ALLOW Anywhere (v6)
22/tcp (v6) ALLOW Anywhere (v6)
22 (v6) ALLOW Anywhere (v6)
2222 (v6) ALLOW Anywhere (v6)
5060/udp (v6) ALLOW Anywhere (v6)
10000:20000/udp (v6) ALLOW Anywhere (v6)
5061/tcp (v6) ALLOW Anywhere (v6)
Here is my pjsip.conf
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0
[6001]
type=endpoint
context=from-internal
disallow=all
allow=ulaw
auth=6001
aors=6001
[6001]
type=auth
auth_type=userpass
password=unsecurepassword
username=6001
[6001]
type=aor
max_contacts=1
Here is a guide link: Hello World - Asterisk Documentation
When I register account in Zoiper, I used this credential.
domain: vps ip address (not local ip)
username: 6001
password: ******
I could not connect my Asterisk server to Zoiper. 408 request timeout error is issued.
Any idea? Thank you.
@Seymen2023 Please don’t create a new thread when you already have one open for something.
Sorry, could you please help me?
Please let me know what you need more to get the problem.
Thank you.
on asterisk do you see the request (trafic) from zoiper
I can’t see any logs in Asterisk console.
I mean no request there.
then you either still have a FW or routning problem
if you use tcpdump on the host can you see the trafic (premiscus mode)
I could connect asterisk to zoiper before I turned on firewall.
I can’t connect now in both cases (turn on/off firewall)
tcpdump shows endless traffic logs.
Now what can I do?
are zoiper and asterisk on the same network ?
sorry, what does it mean?
zoiper is on my pc, aserisk is on my linux vps hosted by digitalocean
well they are not on the same nework
do your VPS have a internal or public ip
if internal you need to setup port forwar
until you are able to see the trafic on you VPS you need to contact digitalocean for how get it setup in there system
Yes, it has a public ip
If I install linux on my local pc and try it, it would be helpful?
I think digitalocean may have a specific mechanism for firewall,
any idea?
I installed Asterisk in my ubuntu PC, and connected it to Zoiper successfully.
I dialed extension and could hear “hello world”.
Thank you, all.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.