[Question] Modifying kernel networking settings

Joon Ho 1 Reputation point Microsoft Employee
2023-08-16T17:22:42.2833333+00:00

We are using a dotnet/Linux base image to run with our deployments to Azure Container Instance.

There are some OS fine-tuning requirements we need to address, namely:

sysctl -w net.ipv4.ip_local_port_range="1024 65535"

sysctl -w net.ipv4.tcp_tw_reuse=1

sysctl -w net.ipv4.tcp_timestamps=1

ulimit -n 250000

 

But it doesn’t look like there are relevant permissions available to modify these networking settings. E.g. sysctl: permission denied on key "net.ipv4.ip_local_port_range"

It's likely due to the limited privileges within the Azure infrastructure of ACI

 

Do you happen to know what the recommended approach is for applying the above settings? Or is it not possible, and we will have to migrate to a dedicated infra like VM/AKS ?

 

Thanks in advance.

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
757 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Mutaz Nassar 2,361 Reputation points Microsoft Employee
    2023-08-17T11:36:18.9766667+00:00

    Hi @Joon Ho,

    The runtime will take these values from the host and this is not available in Azure Container Instance since it is a PaaS (Platform as service) solution to run a container in Azure without having to manage any underlying infrastructure.

    To overcome this issue you may try AKS which allow you to customize the AKS nodes as mentioned here, and if you would like to change a value which is not in the mentioned link then you can use a DaemonSet to change that value.

    Hope this helps, and Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.