I use Shorewall as firewall in my asterisk box but I am having troubles with configuring the rules. The only way I found in order that all my sip calls work correctly is to allow all ports to be open, which I think is not acceptable.
I thought a good way to get rid of all these may be using a sip-aware firewall. Does anybody use any kind of sip-awares? or could somebody explain how to configure my shorewall to work fine while remaining risk-free?
You need to forward udp port 5060 (sip control channel) to the asterisk box, as well as a range of at least 100 udp ports that you can define in /etc/rtp.conf. Then set externip= and localnet= and you’re set.
As I said, the firewall is installed in the asterisk box, i.e., it’s a stand alone linux, asterisk and firwall machine. So, forwarding RTP ports to the same machine …?
Or you can use m0n0wall. http://m0n0.ch/wall In will fit on a 64MB CF card, and works with almost any hardware including USB nics. We have used it a few times with great success.