LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 04-13-2013, 01:27 AM   #1
dc_eros
Member
 
Registered: Nov 2006
Distribution: Slackware
Posts: 292

Rep: Reputation: 39
Question Easy firewall generator - where to save, how to automatically run?


I am looking at this firewall script generator here: http://www.slackware.com/~alien/efg/index.php 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.
 
Old 04-13-2013, 02:05 AM   #2
solarfields
Member
 
Registered: Feb 2006
Location: Outer Shpongolia
Distribution: Slackware
Posts: 427

Rep: Reputation: 106Reputation: 106
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

Last edited by solarfields; 04-13-2013 at 02:06 AM.
 
1 members found this post helpful.
Old 04-13-2013, 02:30 AM   #3
dc_eros
Member
 
Registered: Nov 2006
Distribution: Slackware
Posts: 292

Original Poster
Rep: Reputation: 39
Thanks, will try this after work.
 
Old 04-13-2013, 05:27 AM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,112

Rep: Reputation: Disabled
When you generate the firewall script by entering your configuration and clicking "generate firewall", these lines are the first you see:
Code:
# 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 <alien@slackware.com>
# 
# 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.

Eroc
 
1 members found this post helpful.
Old 04-13-2013, 11:43 AM   #5
dc_eros
Member
 
Registered: Nov 2006
Distribution: Slackware
Posts: 292

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

Thanks all.
 
  


Reply

Tags
firewall


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Idea for Slackware 14.0 - Easy Firewall Generator (clone of AlienBob's) ReaperX7 Slackware 69 07-08-2012 07:04 AM
[SOLVED] Question about Eric Hameleers' firewall generator Switch7 Slackware 6 11-26-2009 07:06 AM
Want an easy password generator? Try this :) taskara Linux - General 4 07-24-2005 11:02 PM
Iptables Sample Firewall Generator mqe Linux - Security 2 06-20-2002 02:12 PM
firewall - iptables - generator mqe Linux - Networking 0 06-20-2002 03:09 AM


All times are GMT -5. The time now is 09:19 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration