Is /etc/sysctl.conf ignored in Monterey (12.0.1)?

Hi,


I used the /etc/sysctl.conf file for years to set two persistent parameters:

net.inet6.ip6.use_tempaddr=0

net.inet6.send.opmode=0


But it seems Monterey ignores this file. Any idea why or how can the parameters can be set now?

MacBook Pro 16″, macOS 12.0

Posted on Dec 8, 2021 7:40 AM

Reply
2 replies

Dec 15, 2021 8:34 AM in response to Zaesch

Zaesch wrote:

Hi,

I used the /etc/sysctl.conf file for years to set two persistent parameters:
net.inet6.ip6.use_tempaddr=0
net.inet6.send.opmode=0

But it seems Monterey ignores this file. Any idea why or how can the parameters can be set now?


You do not say what is your current Shell..

 echo $SHELL


From the Terminal copy & paste:

man sysctl | more


see if this gets you any closer:

https://discussions.apple.com/thread/253124386?answerId=255856917022#255856917022

Dec 16, 2021 9:43 AM in response to leroydouglas

The current shell is /bin/zsh


man sysctl | more gets:

SYSCTL(8)                    System Manager's Manual                   SYSCTL(8)

NAME
     sysctl – get or set kernel state

SYNOPSIS
     sysctl [-bdehiNnoqx] name[=value] ...
     sysctl [-bdehNnoqx] -a

DESCRIPTION
     The sysctl utility retrieves kernel state and allows processes with
     appropriate privilege to set kernel state.  The state to be retrieved or
     set is described using a “Management Information Base” (“MIB”) style name,
     described as a dotted set of components.

     The following options are available:

     -A      Equivalent to -o -a (for compatibility).

     -a      List all the currently available non-opaque values.  This option is
             ignored if one or more variable names are specified on the command
             line.

:


I assume you wanted to see whether the variables net.inet6.ip6.use_tempaddr and net.inet6.send.opmode show up in the man pages. I scrolled through the whole text and unfortunately they doesn't.


I think there isn't a problem with the path. All commands are executable. The values for the both variables are visible:

me@Computer~ % sysctl -a | grep net.inet6.send.opmode
net.inet6.send.opmode: 1

me@Computer~ % sysctl -a | grep net.inet6.ip6.use_tempaddr
net.inet6.ip6.use_tempaddr: 1


I tried to set them to zero, but that's very weird, because it says set to 0, but it is still 1:

me@Computer~ % sudo sysctl -w net.inet6.ip6.prefer_tempaddr=0
Password:
net.inet6.ip6.prefer_tempaddr: 1 -> 0
me@Computer~ % sysctl -a | grep net.inet6.ip6.use_tempaddr   
net.inet6.ip6.use_tempaddr: 1
me@Computer~ % sudo sysctl -w net.inet6.ip6.prefer_tempaddr=0
net.inet6.ip6.prefer_tempaddr: 0 -> 0
me@Computer~ % sysctl -a | grep net.inet6.ip6.use_tempaddr   
net.inet6.ip6.use_tempaddr: 1



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Is /etc/sysctl.conf ignored in Monterey (12.0.1)?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.