I've set up a basic firewall as per Steve Discher's book but am struggling to get it to do a simple port redirection from an external source (in this case, UDP 5060 for SIP traffic)
Current firewall config is below. I've left in a couple of the additional rules that I've put in there to get it working. Namely, the first rule under /ip firewall filter and the first rule under /ip firewall nat.
Am I on the right lines with these rules? I want to get this working and then restrict the rule so that only our SIP provider's IP addresses are allowed to initiate a connection.
The only thing I see is that you have specified a src-port which is empty. Maybe that is holding back the traffic.
And at NAT i always do config to-ports also if they are the same as dst-port.
Since udp is a connectionless protocol I guess the returning packets are dropped.
The are not passed by the established or related rule. And I believe neither does the rule with connection-state=new.
Try removing the connection-state=new parameter in the forward chain rule.
Also move that rule below the related/established rules.
I’ve tried disabling all drop rules, specifically allowing UDP from the SIP provider, turned the SIP helper off (and on) and various other things. Nothing seems to get them through.
I’m going to do some more reading but would be grateful for any other suggestions as to why this isn’t working.
this is the solution, only regardin the VoIP parts.
VoIP connection from trusted SIP providers are already accepted
in this example I use my real productoin configuration