[SR-Users] Re: Understanding NAT Flags

2024-04-29 Thread Henning Westerholt via sr-users
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 

-- 
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com

> -Original Message-
> From: Benoit Panizzon via sr-users 
> Sent: Montag, 29. April 2024 12:13
> To: sr-users@lists.kamailio.org
> Cc: Benoit Panizzon 
> Subject: [SR-Users] Understanding NAT Flags
> 
> 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 PrattelnFax  +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-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the
> sender!
> Edit mailing list options or unsubscribe:
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Understanding NAT Flags

2024-04-29 Thread Benoit Panizzon via sr-users
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 PrattelnFax  +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-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Understanding NAT Flags

2024-04-29 Thread Alex Balashov via sr-users
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  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 PrattelnFax  +41 61 826 93 01
> Schweiz Web  http://www.imp.ch
> __

-- 
Alex Balashov
Principal Consultant
Evariste Systems LLC
Web: https://evaristesys.com
Tel: +1-706-510-6800

__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Understanding NAT Flags

2024-04-29 Thread Alex Balashov via sr-users
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 
>  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 PrattelnFax  +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-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:

-- 
Alex Balashov
Principal Consultant
Evariste Systems LLC
Web: https://evaristesys.com
Tel: +1-706-510-6800

__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe: