Hi Gang
Somehow I don't get my head around NAT Flags and the nathelper module https://www.kamailio.org/docs/modules/5.7.x/modules/nathelper.html
In the examples I found, there is: FLT_NATS and FLB_NATB
If I got it right, FLB_NATB is a branch flag, which shall indicate that the device is 'B'ehind NAT, right?
It is being set, when FLT_NATS is set:
if(isflagset(FLT_NATS)) { setbflag(FLB_NATB); }
But when should FLT_NATS be set and what is it's meaning? The examples I found don't tell me this.
Mit freundlichen Grüssen
-Benoît Panizzon-
I wouldn't worry too much about these. They're kind of an anachronism.
On Apr 29, 2024, at 6:13 AM, Benoit Panizzon via sr-users sr-users@lists.kamailio.org wrote:
Hi Gang
Somehow I don't get my head around NAT Flags and the nathelper module https://www.kamailio.org/docs/modules/5.7.x/modules/nathelper.html
In the examples I found, there is: FLT_NATS and FLB_NATB
If I got it right, FLB_NATB is a branch flag, which shall indicate that the device is 'B'ehind NAT, right?
It is being set, when FLT_NATS is set:
if(isflagset(FLT_NATS)) { setbflag(FLB_NATB); }
But when should FLT_NATS be set and what is it's meaning? The examples I found don't tell me this.
Mit freundlichen Grüssen
-Benoît Panizzon-
I m p r o W a r e A G - Leiter Commerce Kunden ______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00 CH-4133 Pratteln Fax +41 61 826 93 01 Schweiz Web http://www.imp.ch ______________________________________________________ __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
Hi Alex
I wouldn't worry too much about these. They're kind of an anachronism.
I just stumbled over your article: https://www.cnblogs.com/shunzh/p/14360712.html
This helps a bit. After looking again at the issue I observe, I think I have narrowed it down on the alias not being set on the replies.
So a 200 OK from a CPE behind nat, has a contact pointing to the IP behind nat. Thus an ACK to that 200 OK is being routed to the IP behind NAT.
I will keep digging into this and probably just have to get rid of trying to understand how the NAT flags are being used in those examples I found earlier.
Mit freundlichen Grüssen
-Benoît Panizzon-
I had no idea the Chinese syndicated my article:
https://www.cnblogs.com/shunzh/p/14360712.html
Ah well.
Yeah, just use set_contact_alias() / handle_ruri_alias(). These flags are unnecessary and a source of much confusion.
On Apr 29, 2024, at 9:17 AM, Benoit Panizzon benoit.panizzon@imp.ch wrote:
Hi Alex
I wouldn't worry too much about these. They're kind of an anachronism.
I just stumbled over your article: https://www.cnblogs.com/shunzh/p/14360712.html
This helps a bit. After looking again at the issue I observe, I think I have narrowed it down on the alias not being set on the replies.
So a 200 OK from a CPE behind nat, has a contact pointing to the IP behind nat. Thus an ACK to that 200 OK is being routed to the IP behind NAT.
I will keep digging into this and probably just have to get rid of trying to understand how the NAT flags are being used in those examples I found earlier.
Mit freundlichen Grüssen
-Benoît Panizzon-
I m p r o W a r e A G - Leiter Commerce Kunden ______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00 CH-4133 Pratteln Fax +41 61 826 93 01 Schweiz Web http://www.imp.ch ______________________________________________________
Hello,
FLT_NATS - NAT source (source behind NAT) FLB_NATB - NAT branch (usrloc destination behind NAT)
As Alex mentioned, there are different ways to do NAT handling. Some people prefer the manual approach as done in the kamailio default configuration, some (more) people nowadays just to it in all cases and not differentiate that much anymore.
Cheers,
Henning