LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   iptables port forward (https://www.linuxquestions.org/questions/suse-opensuse-60/iptables-port-forward-414609/)

forbese 02-12-2006 01:59 PM

iptables port forward
 
I'm trying to forward port 80 to port 10080 for my dvarchive server.
I use this script.

/usr/sbin/iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 10080
/usr/sbin/iptables-save

This works fine until I restart my system. I'm guessing the Yast frontend to susefirewall2 or iptables is rewriting the file. How do I keep this as a permanant setting without adding this as a startup script(/etc/init.d/boot.local)?

Thanks

Dudydoo 02-12-2006 02:35 PM

I use fedora myself, and I can do it two ways:

# /etc/init.d/iptables save

or to use iptables-save you must supply an output file:

# iptables-save > /path/to/firewall/rules


All times are GMT -5. The time now is 06:49 PM.