-   Slackware (
-   -   Easy firewall generator - where to save, how to automatically run? (

dc_eros 04-13-2013 02:27 AM

Easy firewall generator - where to save, how to automatically run?
I am looking at this firewall script generator here: but have no idea on how to use the output script.

Is it supposed to be put under /etc/rc.d/* ?
Am I going to add the script in rc.local and rc.local_shutdown as well?

This is for a VPS running web server (dev box) and may run nginx (replacing apache) or run some custom web servers like those used by google appengine (on custom ports).

Thanks in advanced.

solarfields 04-13-2013 03:05 AM

create a file /etc/rc.d/rc.firewall, save the results of the firewall generator in it and make it executable

you do not need to start it from rc.local, as it should be started automatically from /etc/rc.d/rc.inet2 upon boot

dc_eros 04-13-2013 03:30 AM

Thanks, will try this after work.

Alien Bob 04-13-2013 06:27 AM

When you generate the firewall script by entering your configuration and clicking "generate firewall", these lines are the first you see:

# Generated iptables firewall script for the Linux 2.4 kernel and later.
# Script generated by Easy Firewall Generator for IPTables 1.15
# copyright 2002 Timothy Scott Morizot
# Modified for Slackware Linux by Eric Hameleers <>
# This generator is adapted from the original to work on Slackware Linux.
# Basically, I corrected the path name to the iptables* commands
# and re-wrote this comment.
# It can be executed with the typical start and stop arguments.
# If used with stop, it will stop after flushing the firewall.
# The save and restore arguments will save or restore the rules
# from the /etc/sysconfig/iptables file.  The save and restore
# arguments are included to preserve compatibility with
# Redhat's or Fedora's init.d script if you prefer to use it.

# You may want to save this script as /etc/rc.d/rc.firewall
# and make it executable, like this:
#  chmod +x /etc/rc.d/rc.firewall
# Slackware Linux will then automatically run this script
# with the "start" parameter.

I can not make it any clearer.


dc_eros 04-13-2013 12:43 PM

Ah, didn't read much of the comments on script :D I jump directly on the stuff like services and ip address. Maybe I should pay attention to script comments more often.

Thanks all.

All times are GMT -5. The time now is 12:42 PM.