I am trying to set up a sip trunk and so far everything has gone well. The only issue I face is that the call does is not received when the iptables service is running. By stopping the service everything works as expected. What I need is to ideally start the itbales and monitor the packets that are being dropped. Ideally I would not to see the source IP and the port, so that I can track down the issue, can someone please advise what command I would need for this. I have tried a few netstats command and I am still searching but possibly I am searching for the wrong thing.
I used chain which logs everything with limits so it won't spam your syslog
$IPT -N DUMP > /dev/null $IPT -F DUMP $IPT -A DUMP -p tcp -m limit --limit 3/minute --limit-burst 3 -j LOG --log-prefix "TCP DUMP: " $IPT -A DUMP -p udp -m limit --limit 3/minute --limit-burst 3 -j LOG --log-prefix "UDP DUMP: " $IPT -A DUMP -p tcp -j REJECT --reject-with tcp-reset $IPT -A DUMP -p udp -j REJECT --reject-with icmp-port-unreachable $IPT -A DUMP -j DROP
Entire firewall script is located here