Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Security and Privacy
FedoraForum Search

Forgot Password? Join Us!

Security and Privacy Sadly, malware, spyware, hackers and privacy threats abound in today's world. Let's be paranoid and secure our penguins, and slam the doors on privacy exploits.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 4th January 2005, 05:49 AM
mceachrw Offline
Registered User
 
Join Date: Jan 2005
Posts: 2
where to execute guarddog script?

i am using fc2, kernel 2.6.9-1.6_FC2, iptable 1.2.9-2.3.1, guarddog 2.2.0.

i used guarddog to create a set of firewall rules. guarddog then generated a script /etc/rc.firewall that can be ran to apply the rules. i ran the script (after adding /sbin/modprobe ip_conntrack_tftp to get the tftp sever to work) and everything seemed to work as i wanted. after that, i ran /sbin/service iptables save to save the rule set /etc/sysconfig/iptables.

i rebooted to make sure everything worked from a clean boot, but it did not. the ruleset seemed to load fine, but i believe there some other lines in the /etc/rc.firewall script that need to be ran as well. i know one is /sbin/modprobe ip_conntrack_tftp.

i know i need to run the /etc/rc.firewall script at boot. how and where is the proper place to do this? also, do i need to anything whenever a network interface is brought up or down?


from the guarddog README:
Guarddog generates a shell script at /etc/rc.firewall which should be run at
boot time.

* Mandrake Linux - runs /etc/rc.firewall at boot time by default which
is good. But most other distributions are not setup like this. The firewall
should be run before any network interfaces are enabled.

* SuSE & Debian - can be setup to run the firewall at boot time by appending
the following lines to /sbin/init.d/boot.local for SuSE and for Debian
use /etc/init.d/bootmisc.sh.

# Guarddog
if [ -r /etc/rc.firewall ]; then
. /etc/rc.firewall
fi

Thanks to Björn Breitsprecher and Carsten M. Schademann for help with this.

* Other Distributions - I expect that running the firewall script at boottime
on other Linux distributions follows similar lines at SuSE above. Basically
find a suitable boot script and add some lines to execute the rc.firewall
file if it exists.

If you figure out how to start Guarddog at boot time for your particular
distribution, please send me an email and let me know how.

Network Interface Up/Down
-------------------------
The firewall script that Guarddog creates needs to be run when ever an
network interface is brought up or down. In fact if Guarddog is not run
after a network interface is brought up then the firewall *should* stop
all traffic through that interface. This is a security feature.

* Mandrake Linux and maybe Redhat - Unfortunately this isn't as simple as
I would hope... The Mandrake networking scripts have 'hooks' which can
be used to for getting things like firewalls run whenever a network
interface is brought up or down. Log in as root and execute the next two
commands:

ln -s /etc/rc.firewall /sbin/ifup-local
ln -s /etc/rc.firewall /sbin/ifdown-local
Reply With Quote
  #2  
Old 5th January 2005, 02:49 AM
Jman Offline
Registered User
 
Join Date: Mar 2004
Location: Minnesota, USA
Age: 27
Posts: 7,909
The last lines from the readme about Red Hat seem the most promising.
Code:
ln -s /etc/rc.firewall /sbin/ifup-local
ln -s /etc/rc.firewall /sbin/ifdown-local
I believe these get run when an interface goes up or down.

The iptables firewall service is defined in the /etc/rc.d/init.d/iptables script.
Reply With Quote
  #3  
Old 5th January 2005, 11:42 PM
mceachrw Offline
Registered User
 
Join Date: Jan 2005
Posts: 2
ln -s /etc/rc.firewall /sbin/ifup-local
ln -s /etc/rc.firewall /sbin/ifdown-local

that did the trick. everything worked as desired after a reboot, /sbin/ifdown eth0 and /sbin/ifup eth0. i should have tried this before posting, but i did not want to mess up a mission critical server. it is running mythtv. my wife would have fit if she missed a recording.

thanks,
rusty
Reply With Quote
Reply

Tags
execute, guarddog, script

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
fcrontab wont execute script dazaau Servers & Networking 29 3rd December 2008 03:02 AM
Execute script after GDM login mike10001 Using Fedora 2 28th August 2008 05:04 PM
How to get NetworkManager to execute a script? tlagren Servers & Networking 2 25th May 2008 05:05 PM
mount into a script then execute it jun Using Fedora 2 11th February 2007 10:00 AM


Current GMT-time: 18:15 (Friday, 24-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat