Ask Your Question

/etc/sysctl.conf Fedora {17-20}?

asked 2014-07-02 06:25:15 -0500

Oleksandr Bogovyk gravatar image

updated 2014-09-12 19:42:35 -0500

mether gravatar image

Since Fedora 16 or 17 (i dont remember exactly) there is no longer /etc/sysctl.conf file exist in /etc directory. The question is how to setup net.ipv4.ip_forward = 1? Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-07-02 08:03:35 -0500

NickTux gravatar image

updated 2014-07-04 01:59:47 -0500

The file exists. At my Fedora 20

ls -ld /etc/sysctl.conf


-rw-r--r--. 1 root root 225 Jun 21 15:28 /etc/sysctl.conf

but if you read the contents of this file

cat /etc/sysctl.conf

System default settings live in /usr/lib/sysctl.d/00-system.conf. To override those settings, enter new settings here, or in an /etc/sysctl.d/<name>.conf file</name>

For more information, see sysctl.conf(5) and sysctl.d(5).

and if you have a look inside /etc/sysctl.d/ you will see a file that is a symlink to /etc/sysctl.conf , named 99-sysctl.conf

So, the answer to your question is

1 . either write the value, straight inside /etc/sysctl.d/99-sysctl.conf

or better

2 . create a new config file inside /etc/systcl.d/ with the name 10-ipv4.conf and write the value there.

echo "net.ipv4.ip_forward = 1" | sudo tee /etc/sysctl.d/10-ipv4.conf

To check if the value applied, you can do

sysctl net.ipv4.ip_forward

it should return

net.ipv4.ip_forward = 1
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-07-02 06:25:15 -0500

Seen: 1,425 times

Last updated: Jul 04 '14