Re: clarification on firewalling

Didier Spaier <[email protected]>
Newsgroups gmane.network.guarddog
Organization EPSM
Message-ID <[email protected]>
Le mardi 14 novembre 2006 03:20, Gary Maxwell a écrit :
> I'd like some clarification on firewalling. For the record, I am running 
> Slackware 11.0.
Congratulations! Irun it too ;-)

> My understanding is that the firewall script should be installed in the 
> /etc/rc.d/rc.firewall position in order for the script to be executed at 
> startup.

This is correct.
As you can see, the script /etc/rc.d/rc.inet2 call /etc/rc.d/rc.firewall if it is executable (provided that rc.inet2 is itself executable, of course).
 
> What I have found is that Guarddog installs the script to 
> /etc/rc.firewall. I got tired of copying this to the /etc/rc.d/ 
> directory every time I made changes so I made a symbolic link as follows:
> 
> ln -s /etc/rc.firewall /etc/rc.d/rc.firewall.
> 
This is what I did, too. You could have modified /etc/rc.inet2 instead to replace occurences of /etc/rc.d/rc.firewall by /etc/rc.firewall but then in case of update of rc.inet2 you should do that aain, so a symlink is a better solution IMHO.
>
> As far as I know it works--though I see nothing at bootup as the words 
> fly by.
> 
You can check if it works issuing the command "iptables -L" as root. If you'll see all the rules set up by giraddog it works.

If you log firewall activity - which is doen by default -  you'll see a lot of lines about dripped packets issuing dmesg command too, whilst you are connected to the Internet.

> I deleted the symbolic link to see if it was working on a test machine. 
> What I found was that the firewall worked regardless of a sym link or 
> file in the /etc/rc.d/ directory.
> 
> Does a firewall work just by being placed in the /etc directory? And do 
> I need to place a link in the /etc/rc.d folder to start Guarddog at boot up?

The firewall begin to work as soon the script rc.firewall is executed - whether you do it yourself or let it be done by /etc/rc.d/rc.inet2 at startup -- which is how it is supposed to work on Slackware. 

By the way at startup you don't need to run Guarddog (whose purpose is to update the firewalling rules in updating rc.firewall) but rc.firewall (whose purpose is to apply the rules).
When you update the rules in guraddog, after you click "OK" Guarddog itself execute rc.firewall so you don't have to do it yourself either.
> A little confused as to what is happening here...

HTH,

Didier 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.