1

I have a AWS Instance, running Ubuntu. I have a static route which works just great

sudo route add -net 192.168.10.0 netmask 255.255.255.0 gw 172.31.16.5 dev eth0

However, whenever I reboot, the route is gone. I should be able to make is presistent by going to sudo nano /etc/network/interfaces, but cannot(creates a boot error).

How can I enter my route to run every time the AWS instance reboots?

  • You can create an @reboot line in root's crontab. Be careful as this will not work if you shut down/power on your instance. – Alex Jul 26 '17 at 5:08
  • This is related to your question here: superuser.com/questions/1234456/aws-openvpn-routing - Adding a static route on your instance is not the answer. I would suggest seeing your other question through to completion. – Appleoddity Jul 26 '17 at 5:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.