[sr-dev] [kamailio/kamailio] [Feature Request]: Add **connection** IP and Port vars (specifically for tcp_accept_haproxy=yes) (#2103)
Joel Serrano
notifications at github.com
Fri Oct 18 02:27:51 CEST 2019
### Description
When using Kamailio with `tcp_accept_haproxy=yes`, the `$si` and `$sp` variables have the
real IP & Port information from the original connection to the LB leaving no way to access the connection IP & Port from where the packet is received from Kamailio perspective.
### Possible Solutions
Create two new pseudovariables that contain the connection IP & Port where the packet was received for use cases where `tcp_accept_haproxy=yes`.
Suggested names (but could be any): $CI and $CP meaning -> Connection IP and Connection Port.
### Example
With `tcp_accept_haproxy=yes`:
UAC (1.1.1.1:45621) -> (2.2.2.2:5060) LB **with** Proxy Protocol (3.3.3.3:57482) -> (4.4.4.4:5060) Kamailio.
```
$si = 1.1.1.1
$sp = 45621
$CI = 3.3.3.3
$CP = 57482
```
With `tcp_accept_haproxy=no`:
UAC (1.1.1.1:45621) -> (2.2.2.2:5060) LB **without** Proxy Protocol (3.3.3.3:57482) -> (4.4.4.4:5060) Kamailio.
```
$si = 3.3.3.3
$sp = 57482
$CI = 3.3.3.3
$CP = 57482
```
I don't think there is any way to get the `3.3.3.3:57482` IP and Port from the example above when using `tcp_accept_haproxy=yes` but I could be wrong.
Thanks!
Joel.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2103
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20191017/2ac9e42a/attachment-0001.html>
More information about the sr-dev
mailing list