1

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"

mosaad
  • 2,276
  • 5
  • 27
  • 49
techboyz
  • 11
  • 1
  • 5

4 Answers4

5

I think you have to type:

sysctl -w net.ipv4.ip_forward=1

This works on fedora 21 for me

chedi
  • 298
  • 3
  • 12
0

try this

echo "1" > /proc/sys/net/ipv4/ip_forward
anish
  • 6,884
  • 13
  • 74
  • 140
0
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.

GMaster
  • 1,431
  • 1
  • 16
  • 27
0

For Ubuntu:

sudo sysctl net.ipv4.conf.all.forwarding=1
echo "net.ipv4.conf.all.forwarding=1" | sudo tee -a /etc/sysctl.conf
mellifluous
  • 2,345
  • 2
  • 29
  • 45