Sample Asterisk Firewall Rules
IPTables
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 5004:5082 -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
More security
BEWARE: these rules can open the firewall completely. Test them.
# iptables -A INPUT -p tcp --syn -m limit --limit 1/s -j ACCEPT
# iptables -A INPUT -p tcp --syn -j DROP
Notice regarding support:
In an effort to provide the best possible support, we offer the following options to Trixbox/Asterisk users:
- Unlimited, free use of our knowledgebase.
- Configuration guides that can assist most customers with the most common Trixbox/Asterisk configurations.
- Asterisk configuration support – two hours maximum for $75. This includes the following:
- Setting up the SIP trunk
- Inbound route settings
- Outbound route settings
- Two hour limit per instance (if more time is needed to fix the problem, an additional two hours of support must be purchased)
- All instances are done using TeamViewer so that client can follow-along as changes are being done.
These are the only support options that we provide at this time.
|