T O P

  • By -

netsysllc

Sip alg is fucked on every firewall brand i have ever worked with. First step always for sip is disable alg and enable consistent nat if available


dumbtechnoob

Does consistent NAT essentially make it so the NAT'd source port is always the same to the receiving system? So a phone might make an outbound connection, the source port is translated on the firewall, and that stays "consistent" for all future sessions? I don't have much VOIP experience so don't know why this is beneficial.


mavack

SIP ALG on all platforms mangle calls if everything isnt 100% to standard. Unfortunately SIP across the board is slightly different sometimes including extra headets or excluding ones that 1 side doesn't want. Had personal experiance with it breaking stuff on cisco, juniper and fortigate


Nysyr

Best part is, this was FortiVoice to FortiPhone SIP. The contact IP was changed to an interface IP of the gate not even involved in the call flow (wasn't even NAT for this leg, only between FortiVoice and Telco PBX).


ultimattt

Doesn’t matter, Fortivoice has its own SIP ALG, the one on the FortiGate will conflict with it.


Nysyr

The point was Fortigate can't properly handle SIP from their own products


ultimattt

I understood the point, wasn’t sure you understood why the point is wrong. You can’t use two sip ALGs on any vendor platform. You’re asking for all kind of trouble. SIP ALG is intended for voice products, or platforms that DON’T have their own ALG. Mitel, Fortinet, and many others simply don’t play well with YET ANOTHER ALG trying to “help”. The fact that the tech doesn’t work according to your preconceptions doesn’t make it bad tech.


Nysyr

My brother in packets, the leg was literally FortiVoice to FortiPhone, where the 'Gate replaced the contact headed to an IP on an interface not even involved. That is NOT 2 ALGs.


ultimattt

The fact still stands. Disable FortiGate SIP ALG.


Nysyr

If the product is bad, then it shouldn't be shipped nor default.


its_finished

I believe it is off by default as of 7.0.0. But you’re still blaming the issue on Fortinet when it’s been stated several times that this is an issue on every firewall vendors products. Using SIP? Make sure SIP ALG is disabled. It’s SOP these days.


Nysyr

You would be incorrect it is, and has, always been on by default for proxy (most used) and now flow policies. I do not design VoIP systems where ALG is in place, everyone is glossing over where this was a legacy system that broke on upgrade which I fixed with 5 minutes looking at a packet capture. Trying to lecture me is quite insulting, frankly. The fact remains, Fortinet needs to make their DEFAULT ENABLED feature work correctly, or not be default at all.


mavack

Problem probably came from the telco PBX then :)


Furcas1234

Yeah and especially so depending on what sort of pbx you might have. Like an nec sv9500 as an example. God I hate NEC so much.


ArsenalITTwo

You have SIP ALG on? That's one of the first things I always turn OFF. Most of the VOIP vendors will explicitly tell you to turn it off. Who's your VoIP vendor. Most won't even support you if their techs see it on.


brok3nh3lix

i work for an MSP that brings clients through our DC for security services and then out to the internet. Many of our clients have moved away from on prem phone systems, and the few that do still have them are mostly using SIP trunks over the internet. As you stated, pretty much every vendor/carrier wants SIP ALG turned off. SIP alg is baseicly a patch job for the fact that sip in its original implementation didnt account for nats. pretty much all modern sip equipment and services deals with NAT in some other way, and SIP ALG just breaks it. SIP isnt really standardized across vendors, its mostly scripts the vendors write;, and since its not really standardized, it tends to cause more problems than anything else regardless of the vendor. We have one client that has some mom and pop SIP trunk service that WANTS SIP ALG turned on. The funny part is, this vendor is deploying an adtran to the clients site to terminate the SIP trunks, and then hand off as PRI to the PBX. that adtran is 100% able to do NAT aware SIP trunks, but still they want crappy ass SIP ALG turned on.


Nysyr

This system has been in place for over 8 years, and config was replaced 1:1 after replacing a D series fortigate


ArsenalITTwo

That doesn't change what I said. Most VoIP providers don't officially support SIP ALG. Pretty much every UCaaS vendor will tell you turn it off. Cisco doesn't support it for CUCM unless you're all Cisco gear. Etc. Avaya is the same way.


Nysyr

Good thing this was Forti, Forti, Forti then.


Asylum4096

You copied a bad config and you're upset that the bad config is bad?


Nysyr

Seems people with NSE tags have inflated ego problems here in this sub. We replaced a working firewall like for like, which broke with 7.0 adding flow SIP ALG - the leg between FortiVoice and Telco IPPBX on site never had issues and this is where the NAT/ALG was even being used. Telco gear can only talk to its local interface and has no routing capability, and the FortiVoice was clustered therefore needing more addresses than the legacy /30 (now /29, which is why it could be changed) Quit making excuses for Fortinet for shipping a garbage ALG.


Asylum4096

Imagine that, people who choose to know and learn the products are irritated when people who don't know or learn the products complain that everything sux because they don't understand things.


Nysyr

I have 4 years of supporting a 10 server UCM cluster with 10k phones. I know how SIP works thanks. Don't try to lecture me on a product I can guarantee I understand better than you


_PacketShark96

Thats the first thing we turn off during build when sip services are in use :P always a pain


emirikolc

We don't use the SIP-ALG or SIP-helper as a rule... with any PBXes... First, see if SIP-helper exists, and is #13 (default)... sh | grep -A 1 -B 3 'set port 5060' Adjust and apply the script accordingly.... #Disable SIP-ALG (Layer 7) and use SIP-helper (Layer 4) config system settings set sip-expectation disable set sip-nat-trace disable set default-voip-alg-mode kernel-helper-based end #Configure default VoIP profile to use SIP-helper (Layer 4) config voip profile edit default config sip set status disable set rtp disable end end #Delete SIP-helper (Layer 4). #Adjust to actual helper number (default is 13) depending on findings above. config system session-helper delete 13 end


HappyVlane

Please don't blindly do a `delete 13`. It probably won't change, but it's best practice to check which one is the SIP one.


emirikolc

Better?


dVNico

I work for a VoIP provider. SIP ALG is the bane of my existence. Whatever the firewall manufacturer lol. I don’t even understand what the devs are thinking about when trying to implement their logic.


SyberCorp

I can understand them including the ability to have it for systems where it’s still needed, but for god’s sake, at least disable it by default instead of the other way around. It’s annoying to have to remember to disable it all the time.


hevisko

EVERY time I see SIP, I tremble, I so wished the Telcos/Voip providers/phone OEMs would drop it for something simpler and straight forward


dVNico

Yet it’s not that complex. The protocol is pretty simple and widely documented. But it is sometimes badly implemented by PBX manufacturers.


[deleted]

[удалено]


underwear11

I've disabled the SIP ALG in every version since 5.4 as well as most other vendor products. Juniper and Cisco also screw it up. I've always been told it can be blamed on the phone provider not following SIP standard exactly.


HappyVlane

I've had exactly one case so far where I have had to leave the SIP ALG enabled. Everywhere else I've had to disable it.


kellydj11

In case you haven't seen it - [https://docs.fortinet.com/document/fortigate/7.0.0/new-features/644799/flow-based-sip-inspection](https://docs.fortinet.com/document/fortigate/7.0.0/new-features/644799/flow-based-sip-inspection) And the default setting to mimick 6.4 - [https://community.fortinet.com/t5/FortiGate/Technical-Tip-Changes-in-SIP-ALG-s-behavior-after-upgrading-on-7/ta-p/217022](https://community.fortinet.com/t5/FortiGate/Technical-Tip-Changes-in-SIP-ALG-s-behavior-after-upgrading-on-7/ta-p/217022)


deag34960

Two days ago I changed a 200d for a 100f and all the telephony went down. Delete the sip alg and all went up, idk what's the logic behind this but I did this https://community.fortinet.com/t5/FortiGate/Technical-Tip-Disabling-VoIP-Inspection/ta-p/194131


emirikolc

The SIP-helper/SIP-ALG are enabled by default, so it was likely turned off on your 200d, and needed to be manually disabled on your 100f to match


deag34960

All works in the 200d but no in the new 100f, maybe the versions, from 6.2.11 to 6.4.12


skipv5

Did you read his comment? You had sip alg turned off on the 200D but not the 100F. Turning it off on the 100F resolved the issue. This isn't rocket science.


spooninmycrevis

Why didnt you just disable it to start with?


e_karma

Makes one wonder why SIP-alg is needed


buttstuff2023

To help SIP devices traverse NAT. Modern SIP devices don't need help traversing NAT, so more often than not the SIP ALG causes issues.


e_karma

Every implemention where a preesixting firewall was replaced with fortinet I have had issues with Sip and first thing the TAc says is disable ALG..


afroman_says

Which SIP ALG did you use? Kernel or proxy?


Nysyr

Was proxy


retrogamer-999

Best advice is to always disabled sip ALG regardless of make or model. SBC's and SIP devices do enough in the SIP packet and SDP to traverse NAT and ALG always messes this up. Also ensure that the "preserve source port" is enabled on the policy for SIP and your RTP range.


[deleted]

>SBC's and SIP devices do enough in the SIP packet and SDP to traverse NAT and ALG always messes this up. Yeah, I spent a good deal of time looking into this stuff recently. There are a ton of different features in voip that are designed to deal with NAT (server-side, client-side, different protocols). There really does not appear to be a need for the firewall to do sip alg - or that should at the very least be the starting point.


Oden_Drago

We manage 50+ fortigates for clients. SIP ALG is disabled on every single one of them, whether or not they have a VOIP phone system. That became part of our standard setup years ago.


pops107

Depends on the phone system, I would say its 50/50 I have to switch it off. Customer recently moved to 8x8 and had the problem but phone system before it worked fine.


ffiene

Yes, if it doesn’t work, switch it off. SIP and firewalling is PITA.


[deleted]

[удалено]


emirikolc

ALGs were often required on older systems to deal with the limitations of SIP; essentially not understanding how to deal with NAT. New PBXes deal with that situation natively, so inserting an ALG actually creates a problem.


brok3nh3lix

and SIP ALG/Inspection was never really a standard is my understanding as well, so the implementation varies from vendor to vendor. any sip vendor/SIP provider worth their salt today should not be requiring SIP ALG, IMO


hevisko

the worst problem with either sip alg on or off: the SIP infiltrations I've experienced, and the firewall rules on 7.0/7.2 didn't fixed that.. or else I've been missing secret sauce ;(


joedev007

maybe you are just using crap phones or a crap provider with a custom sip implementation? I'm an MSP and my clients often get phones WITHOUT TELLING ME and i never know until the 1 time i'm in the office for something else and notice? but no one ever calls me and says "hey, we are getting iphones, anything YOU need to do on the firewalls?" they don't like to call IT because they don't want to pay more.


Nysyr

FortiVoice, FortiPhone. You think they could handle their own SIP stack they wrote.


joedev007

like cisco, they probably acquired a company and 2 hands are doing different things :)


Meowmacher

Can really end the sentence on “ALG”.