Hi guys,
I've been running my little sme/asterisk box as server-only, however I would now like to have it run as a gateway as well. Now, as you probably know, SIP needs to have a lot of ports open in the 10000-20000 region. The idea of using portopen to individually open 10000 ports desn't really appeal to me so I need a bit of advice/guidance from a firewall maestro. The rules for asterisk are as follows:-
# SIP on UDP port 5060. Other SIP servers may need TCP port 5060 as well
iptables -A INPUT -p udp -m udp --dport 5060 -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
Having looked at the generated MASQ output in init.d I am way out of my depth here. Question... What is the best way to implement these rules? Where in MASQ (if at all) should I put them?
Thanks in advance for your help
Tag.