2

Using Ubuntu Server 14.04.1 LTS

I've changed net.ipv4.ip_forward to 1 in /etc/sysctl.conf and when I run sudo sysctl -p it works no problem but after a reboot ip_forward is back to 0.

After a reboot I can run sudo sysctl -p again and it works

How can I make it persist?

Arcath
  • 121

3 Answers3

2

There appears to be some problem with AWS VPN Client where the client turns ip forwarding off:

https://forums.aws.amazon.com/thread.jspa?threadID=345484

For most people who land here this won't be the problem. But it might help a few people.

2

I confirm that net.ipv4.ip_forward=1 in /etc/sysctl.conf is correct way to keep forwarding across reboots. I suggest to look into /etc/sysctl.d/* files if there is an override to 0 somewhere.

  • None of the files contain an override and I've tried adding another file to this folder with an override to 1 and its still not persisting – Arcath Dec 22 '14 at 08:44
0

I suggest that you see this answer and review the steps you made to set port forwarding on Linux.

  • Found that answer when I was looking into the problem before asking this question.

    It loads the config no problem but it doesn't persist between reboots

    – Arcath Dec 22 '14 at 08:32