B
B
boo0312021-10-29 07:28:17
ubuntu
boo031, 2021-10-29 07:28:17

How to fix Ip-forwarding constant value =1?

Unable to capture value net.ipv4.ip_forward=1. The displayed result is always 0.
I make a change sudo nano /etc/sysctl.conf, everything is saved. Next sysctl -p /etc/sysctl.confor /etc/init.d/network restart. The result is still 0. A constant value of 1
is required. I use ubuntu mate20.04lts. If you make a temporary value sysctl -w net.ipv4.ip_forward=1 then everything is OK. With sysctl net.ipv4.ip_forwardresult net.ipv4.ip_forward=1.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
Hanneman, 2021-10-29
@Hanneman

Make sure you save your changes in nano so there is no duplicate entry. Then don't forget

sudo sysctl -p /etc/sysctl.conf
sudo /etc/init.d/procps restart

A
Alexander Karabanov, 2021-10-29
@karabanov

Do it again from the beginning How to enable IP Forwarding in Linux

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question