" /> SIP Proxy - RHEL7 - CAP_NET_ADMIN - Genesys CTI User Forum

Author Topic: SIP Proxy - RHEL7 - CAP_NET_ADMIN  (Read 4872 times)

This topic contains a post which is marked as Best Answer. Press here if you would like to see it.

Offline zwerg82

  • Newbie
  • *
  • Posts: 30
  • Karma: 2
SIP Proxy - RHEL7 - CAP_NET_ADMIN
« on: August 23, 2018, 07:13:10 AM »
Advertisement
Hi all,

for SIP Proxy Deployment Genesys is stating the following in their documentation:

[quote]On Linux, the application must have CAP_NET_ADMIN capability (that is, be capable of running from the root account).[/quote]

To do so, I've done the following steps: (OS: RHEL7)

1. Create file [b]/etc/security/capability.conf[/b]
[font=courier][color=blue]cap_net_admin gcti
none          *[/color][/font]
2. Add the following line to [b]/etc/pam.d/login[/b]
[font=courier][color=blue]auth  required  pam_cap.so[/color][/font]
3. Add capability CAP_NET_ADMIN to SIP Proxy application:
[font=courier][color=blue]sudo setcap cap_net_admin+ie /home/gcti/sipproxy_01/SIPProxy_64[/color][/font]

Now I'm not sure if those steps are sufficient or whether I need to do something else.
How can I check whether SIP Proxy has the capabilities assigned and it's working as desired?

Thank you,
Best regards

Offline hsujdik

  • Hero Member
  • *****
  • Posts: 541
  • Karma: 30
Re: SIP Proxy - RHEL7 - CAP_NET_ADMIN
« Reply #1 on: August 23, 2018, 11:52:06 AM »
I’m not a linux specialist, but I think it is related to SELinux. If that is the case, I think you can run ls -z to show the assined capabilities/permissions.

One way to test if your problem is SELinux-related is to run:

setenforce 0

To temporarily disable it

Offline zwerg82

  • Newbie
  • *
  • Posts: 30
  • Karma: 2
Re: SIP Proxy - RHEL7 - CAP_NET_ADMIN
« Reply #2 on: August 23, 2018, 09:05:07 PM »
Actually I haven’t experienced any issue with it yet. It’s a lab environment and HA proxies are working fine.
I was just not sure whether I took the right steps.

That’s why I was seeking for guidance from somebody who configured it already.

Don’t think it’s actually related to SELinux, as from my experience so far SELinux is configured differently.

Maybe someone implemented it already and can share experiences with me.

All the best


Gesendet von iPhone mit Tapatalk

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: SIP Proxy - RHEL7 - CAP_NET_ADMIN
« Reply #3 on: August 24, 2018, 01:58:46 AM »
??? What is your problem exactly...can't you test the proxy?

Offline zwerg82

  • Newbie
  • *
  • Posts: 30
  • Karma: 2
Re: SIP Proxy - RHEL7 - CAP_NET_ADMIN
« Reply #4 on: August 24, 2018, 06:19:01 AM »
There is no problem at all. The CAP_NET_ADMIN is only used for TOS which is by default disabled, so SIP Proxy is working properly.

In case I want to enable it, the cap_net_admin has to be configured correctly.
As it is not described in the Genesys Documentation, I thought there might be a Linux expert around who can verify the steps and correct or add steps if necessary.

Offline jamesmurphyau

  • Full Member
  • ***
  • Posts: 123
  • Karma: 2
Re: SIP Proxy - RHEL7 - CAP_NET_ADMIN
« Reply #5 on: August 24, 2018, 08:22:00 AM »
You only need to do setcap.. what I found though was I didn't need to do any of that.. the tos settings work without even doing setcap (for sipserver tho not sipproxy, but would expect the same)

Marked as best answer by zwerg82 on August 24, 2018, 09:45:19 PM

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: SIP Proxy - RHEL7 - CAP_NET_ADMIN
« Reply #6 on: August 24, 2018, 08:42:25 AM »
CAP_NET_ADMIN configuration is required only when ToS/QoS is used (by default it is not used at all). CAP_NET_ADMIN allows set the QoS on outgoing packets to the specific binary (SIP/SIP proxy, MCP, RM, etc.). Your configuration seems good, but to be honest there are more ways how to achieve that. So, the final solution depends on end-used server configuration (on OS level).

Offline jamesmurphyau

  • Full Member
  • ***
  • Posts: 123
  • Karma: 2
Re: SIP Proxy - RHEL7 - CAP_NET_ADMIN
« Reply #7 on: August 24, 2018, 11:04:01 AM »
I tested this a few weeks ago. Setting sip-tos only (no need to setcap) worked for me. RHEL 6 tho.. would expect RHEL 7 to be the same

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: SIP Proxy - RHEL7 - CAP_NET_ADMIN
« Reply #8 on: August 24, 2018, 11:50:45 AM »
In case, your apps are running under non-root user, the CAP_NET_ADMIN is necessary to allow for the app user to be enable set ToS properly (I am not sure if you checked the ToS on packet level). Of course, if the OS is configured to enable CAP_NET_ADMIN by default, there is no need to do this step at all. This is true for both RHEL version 6 and 7.

Offline zwerg82

  • Newbie
  • *
  • Posts: 30
  • Karma: 2
Re: SIP Proxy - RHEL7 - CAP_NET_ADMIN
« Reply #9 on: August 25, 2018, 04:24:25 PM »
So what you’re saying is the entire configuration is not necessary at all for RHEL 6&7? Even if I’m not using root user?
Why would they put it as requirement for tos into documentation?


Gesendet von iPhone mit Tapatalk

Offline jamesmurphyau

  • Full Member
  • ***
  • Posts: 123
  • Karma: 2
Re: SIP Proxy - RHEL7 - CAP_NET_ADMIN
« Reply #10 on: August 26, 2018, 10:55:08 PM »
I'm also interested in the answer to that question.. maybe rhel 5 required it? Also how do you know it's not required by the OS? I mean based on my testing I come to the same conclusion but the way you're speaking about it is like it's documented somewhere? I did quite a lot of research trying to get it working (turns out the F5 doesn't do tos passthru) to find out I didn't even need it in the end..

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: SIP Proxy - RHEL7 - CAP_NET_ADMIN
« Reply #11 on: August 27, 2018, 09:59:11 AM »
Main question is : Do you need configure ToS? If no, forgot on CAP_NET_ADMIN and leave SIP (or other SIP based component) running as-is. In other case, set the CAP_NET_ADMIN regarding hosted OS (as the commands for setting up CAP_NET_ADMIN should be different)

Offline CTI_guy

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: SIP Proxy - RHEL7 - CAP_NET_ADMIN
« Reply #12 on: February 02, 2022, 12:12:28 PM »
'sip-ip-tos' App level option change to '184' substituted CS0 (Best Effort) on EF with all the sent through eth0:1 interface SIP requests. Checked via tcpdump traces. No other actions were needed on OL 7.9 Linux platform.

Thanks!