techboyz
techboyz

Reputation: 11

Enable Packet Forwarding

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

Answers (4)

mellifluous
mellifluous

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

chedi
chedi

Reputation: 308

I think you have to type:

sysctl -w net.ipv4.ip_forward=1

This works on fedora 21 for me

Upvotes: 6

GMaster
GMaster

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

anish
anish

Reputation: 7412

try this

echo "1" > /proc/sys/net/ipv4/ip_forward

Upvotes: 0

Related Questions