redirect port 80 to 8080 by iptables but it changes again when system boot up
Hello;
I tried to redirect port 80 to 8080 by these commands:
>> /sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
>> /sbin/iptables-save
It is OK, but when I reboot the machine, I see that redirection has been lost.
What do I have to do for persistent redirection? Put the commands as a cron job?
Thanks in advance
Enes Akar
|