8

I have server instance running on amazon ec2. I want to forward from port 80 to 8080 using iptables. Which works fine until restart when it stops forwarding. I have used

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to 8080

to set up fowarding. What do I need to do to make it persistant?

Thanks

Gray
  • 115,027
  • 24
  • 293
  • 354
dan
  • 1,525
  • 1
  • 17
  • 35

2 Answers2

10

I found a good blog post explaining how to do it https://help.ubuntu.com/community/IptablesHowTo

dan
  • 1,525
  • 1
  • 17
  • 35
0

You have to run your firewall rules at boot time.

KurzedMetal
  • 12,540
  • 6
  • 39
  • 65