Reputation: 11
I am using Fedora 20 after running this command:
"sysctl -w net.inet.ip.forwarding=1"
it is giving this error:
"sysctl: cannot stat /proc/sys/net/inet/ip/forwarding: No such file or directory"
Upvotes: 1
Views: 10334
Reputation: 2975
For Ubuntu:
sudo sysctl net.ipv4.conf.all.forwarding=1
echo "net.ipv4.conf.all.forwarding=1" | sudo tee -a /etc/sysctl.conf
Upvotes: 0
Reputation: 308
I think you have to type:
sysctl -w net.ipv4.ip_forward=1
This works on fedora 21 for me
Upvotes: 6
Reputation: 1521
su - # sudo su - if Ubuntu
echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
sysctl -p /etc/sysctl.conf
This way even when you reboot the machine the setting will stay.
Upvotes: 0