Iptable make call delay

Hi every one
I have one vps to install asterisk 16
For security I install and set up iptable, my iptable will accept some ip and drop all
but when I enable iptable and test a call local, it seem very long to connect, about 20 second
this is my config iptables:
*filter
-A INPUT -s 127.0.0.1 -j ACCEPT
-A INPUT -s 27.78.9.0/24 -j ACCEPT
-A INPUT -s 103.57.220.27/32 -j ACCEPT
-A INPUT -s 103.57.220.28/32 -j ACCEPT

-A INPUT -j DROP -p all -s 0.0.0.0/0
-A INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
when i stop iptable every thing seem ok
So some body tell me where I wrong
Thanks!!!

How is your DNS handled? In particular, do you have a local DNS server and does it forward to a fixed address or does it follow the NS records?

Pls show your network topology .

And also show asterisk log to see what stuck when you enable firewall.

Maybe some service in asterisk take DNS lookup and it stuck when you enable firewall

Hi Every One
My problem solved
I read comment and add my DNS to iptables and it worked, call didn’t delay
Thanks everyone so much!!!

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