OK - I'm still having issues.
This is what I've currently got setup
Code:iptables -I FORWARD -p udp --dport 5060 -j DROP iptables -I FORWARD -p udp --dport 5068 -j DROP iptables -I FORWARD -p udp -s 61.243.142.120 --dport 5060 -j ACCEPT iptables -I FORWARD -p udp -s 88.215.134.231 --dport 5060 -j ACCEPT iptables -I FORWARD -p udp -m string --string sipgate --algo bm --dport 5060 -j ACCEPT iptables -I FORWARD -p udp -m string --string sipgate --algo bm --dport 5068 -j ACCEPT iptables -I FORWARD -p udp -m string --string voice --algo bm --dport 5068 -j ACCEPT iptables -I FORWARD -p tcp --dport 5060 -j DROP iptables -I FORWARD -p tcp --dport 5068 -j DROP iptables -I FORWARD -p tcp -s 61.243.142.120 --dport 5060 -j ACCEPT iptables -I FORWARD -p tcp -s 88.215.134.231 --dport 5060 -j ACCEPT iptables -I FORWARD -p tcp -m string --string sipgate --algo bm --dport 5060 -j ACCEPT iptables -I FORWARD -p tcp -m string --string sipgate --algo bm --dport 5068 -j ACCEPT iptables -I FORWARD -p tcp -m string --string voice --algo bm --dport 5068 -j ACCEPT
I'm finding this is blocking ALL UDP/TCP for 5060 & 5068 including the entries specified to be allowed.
Why ?
If I remove the:
Code:iptables -I FORWARD -p udp --dport 5060 -j DROP
Then all my SIP trunks work, but I'm open to anything again..
Any ideas how to block everything on port 5060 & 5068 except the entries I've listed ?
Thanks
Never mastered iptables, but isn't your problem that the 2 rules dropping traffic to 5060 and 5068 are at the top of the list, so those rules get actioned first; nothing addressed to 5060 or 5068 ever gets checked against any other rules because the the first 2 have already made the decision as to what happens? Don't the drop rules to those 2 ports need to come AFTER every other rule pertaining to those 2 ports?