-
-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kernel ip_forward disabled after reboot #2505
Comments
@maartenlangeveld Which SBC/device do you use? Obviously something overrides the setting, after sysctl applied it. |
Hi Micha, SBC: NanoPi NEO2 Thanks, M |
I have found a solution... When I add a dediacted 01-ip_forward.conf file in /etc/sysctl.d/ with line "net.ipv4.ip_forward=1" the ip forward keeps enabled after reboot. I have very very little knowledge of UNIX/Linux but probably /etc/sysctl.conf is not parsed as long as there are .conf files in /etc/sysctl.d/ ? |
@maartenlangeveld
But anyway it is generally advised to use a separate |
@MichaIng, |
@maartenlangeveld In your case the setting was applied only, since you actively forced the config file with Ref: https://www.freedesktop.org/software/systemd/man/systemd-sysctl.service.html
Ref: https://manpages.debian.org/stretch/systemd/sysctl.d.5.en.html
No Will mark this as closed, feel free to use or reopen the issue. |
same issue here... installed dietpi last week and wondered why openvpn is not working... is that correct? thx |
Jep this symlink should exist since /etc/sysctl.conf is not loaded anymore directly by systemd. I wonder why this link does not yet exist or is added by the related APT update. Seems to be relatively new. I add a patch to v6.23 to recreate the symlink if it does not exist. OpenVPN should use it's dedicated /etc/sysctl.d/dietpi-openvpn.conf to add the redirects. I verify this is the case, otherwise patch it for new installs. |
@coolduke666 |
ls -la /etc/sysctl.d/ |
@coolduke666 As well strange:
However, fixed with b0b85ff for v6.23. |
hi
first I installed dietpi and after reboot I installed pihole and pivpn via
dietpi-software tool.
pihole working flawlessly. I only ran into troubles with pivpn. I needed
some time to figure out where the problem was namely the disabled
ip_forward setting.
HTH... best
MichaIng <notifications@github.com> schrieb am Mo., 29. Apr. 2019, 20:51:
… @coolduke666 <https://github.com/coolduke666>
Strange, did you install OpenVPN via first run installs (dietpi.txt
automation settings) or after initial update has finished?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2505 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHYY7LSB5KHW7WOHD3JNNJLPS47T7ANCNFSM4GUV2GFQ>
.
|
hi first I installed dietpi and after reboot I installed pihole and pivpn via dietpi-software tool. pihole working flawlessly. I only ran into troubles with pivpn. I needed some time to figure out where the problem was namely the disabled ip_forward setting. HTH... best |
@coolduke666 Will check it by times if somehow IP redirection is missing and in case report it there or open a PR to add it. I opened a new issue about this: #2746 |
that would be great. |
@maartenlangeveld @MichaIng @coolduke666 Hey guys (or gals), just popping in to say that I just ran into this same exact issue, and after a quick google search about it, I found this github issue. I'm new to github so please excuse my ignorance if commenting here like this isn't the correct way, etc. The solution that @maartenlangeveld came up with symlinking /etc/sysctl.conf to /etc/sysctl.d/99-sysctl.conf worked like a charm, and now after rebooting my pi3, the net.ipv4.ip_forward=1 setting stays persistent. Quick Recap of how I got here:
DAYS LATER
Here's what I had to do (spacing stuff out to make it look better): Tried to immediately make the symbolic link, but it wouldn't since
So I checked the difference between them to see if removing it first would be dangerous:
Nope, safe to proceed:
Now after a reboot, everything sticks and I can connect to wireguard and all my devices on my LAN perfectly. Any way we can get this to be automatically baked in for new users? Thanks |
@huntmanday |
@MichaIng Sounds good. Glad I could help! |
@MichaIng
The board entries for your reference: |
@Joulinar
|
@MichaIng |
@Joulinar |
@MichaIng EDIT |
Creating a bug report/issue
Required Information
Additional Information (if applicable)
Steps to reproduce
Enable kernel IP Forwarding
Expected behaviour
Actual behaviour
Extra details
The text was updated successfully, but these errors were encountered: