title: Running a script on each reboot of EC2
body: <p>I am running an Amazon Linux EC2 instance. It is a node.js server. I need to run the following command on each reboot/startup:</p>
  
  <pre><code>sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to 8080
  </code></pre>
  
  <p>The command above redirects port 80 to port 8080.</p>
  
  <p>How can I achieve this?</p>