How do I edit sysctl values permanently?

How do I permanently, automatically edit values that need to be set via sysctl? Usually, you put them in a file into /etc/sysctl.d

This directory is part of / which is mounted read-only, and it’s SquashFS, so I don’t think I can just remount it as RW.

Background for completeness:

I have a Wi-Fi USB Dongle running hostapd using GitHub - mattlongman/Hassio-Access-Point: Hass.io addon to let you create a WiFi access point, perfect for using WiFi devices on off-grid installations. for my IOT-Specific network.

The onboard wi-fi is a client on my main house wi-fi.

I need the IOT devices to be accessible on the main wi-fi. I figured out how to do it using proxy_arp and WiFi promiscuous mode.

I can turn on promiscuous mode from the hostapd script inside docker, so that’s not an issue.

I can’t turn on net.ipv4.conf.wlan0.proxy_arp from the container, that has to be turned on from the host. I’ve been testing it using SSH to host via 22222, but it’s all ready to do, and I can’t figure out how to make the changes permanent.

Thanks, y’all.

For posterity:

The way I got around this is by building a very simple personal add-on; it needs to run with lots of privileges; it has to remount /proc in a separate location, but afterwards, it runs “echo 1 > /remounted_proc/sys/net/ipv4/conf/wlan0/proxy_arp” and that works, and is a system-wide setting.

Could you maybe give a few more details? I’m in need to adjust some net variables as well but I have no idea how to do it. I can’t find much about how to do it as well.

Hello, I have the same question - would anyone know how it is feasible in HA os ? The objective is to run a wireguard client for qbittorrent for which it is a requirement to set net.ipv4.conf.all.src_valid_mark=1

thanks