I am running a VoIP-server, Asterisk, which is constantly being accessed by people attempting to register fraudulent users. I have tried to setup rules to prevent this, but it seems they do not work. This is my setup:
0 ;;; Accept Established Connections
chain=input action=accept connection-state=established
1 ;;; Accept Related Connections
chain=input action=accept connection-state=related
2 ;;; Drop Invalid Connections
chain=input action=drop connection-state=invalid
3 ;;; Accept Incoming VOIP
chain=input action=accept protocol=udp src-address=80.244.65.70 src-port=5060
4 ;;; Accept incoming VOIP
chain=input action=accept protocol=udp src-address=193.105.226.106 src-port=5060
5 ;;; Accept Everything from LAN
chain=input action=accept in-interface=ether2-master-local
6 ;;; Drop Everything Else
chain=input action=drop
My Voip-providers are accepted in rule 3 and 4. Since these are the only services I offer from WAN, everything else initiated from WAN should be blocked. Then I have NAT-rules: