netplan breaks route_localnet set in /proc/sys/net/ipv4/conf after apply/try
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
Triaged
|
Undecided
|
Unassigned |
Bug Description
Hello,
VERSION: 0.106-2+deb12u1
Our server provider uses netplan so I've tried to migrate our configuration to netplan. We use internally developed transparent proxy similar to https:/
After restarting network using 'netplan apply' or 'netplan try' the setting resets back to 0 and routing become broken.
I've tried using networkd-dispatcher and putting script to routable.d and seems it executes BEFORE netplan reset to setting back to 0 so the result is not as intended - interface will keep set at 0 at the end.
Therefore, We had to go back to ifupdown and use post-up/post-down scripts to setup everything properly.
Hello,
netplan doesn't touch that file, not sure why it gets reset. networkd might be the one responsible for that.
Have you tried to do that with sysctl?
Can you try to create a file like /etc/sysctl. d/99-ens3. conf with the following content:
net.ipv4. conf.ens3. route_localnet = 1
You can also add it to /etc/sysctl.conf
In my tests (on Ubuntu) this setting doesn't get reset after netplan apply.