Koozali.org: home of the SME Server

ipchains definitions

Walid Moghrabi

ipchains definitions
« on: December 05, 2001, 06:23:22 PM »
Can somebody tell me where the firewall rules (ipchains) are defined with e-smith ?
I mean, which file and where ?

Thanks.

Dan G.

Re: ipchains definitions
« Reply #1 on: December 05, 2001, 07:44:53 PM »
I'm a bit of a noob, but let me attempt --- hopefully, any errors I make will be corrected by one of the more knowledgeable :)

ipchains rules are built on the fly, when the system boots, using template fragments located in /etc/rc.d/init.d/masq --- but messing with them there is a no-no.  In order to tweak the ipchains settings, you need to:

Create a new template-custom directories, al la:
   mkdir -p /etc/e-smith/templates-custom/etc/rc.d/init.d

Copy the master templetes to the this new area:
   cp -rp /etc/e-smith/templates/etc/rc.d/init.d/masq /etc/e-smith/templates-custom/etc/rc.d/init.d/

Depending on what you are trying to do, you will need to modify one of the many fragments in the templates-custom/masq area, and then expand the templates and activate them thus:

   /sbin/e-smith/expand-template /etc/rc.d/init.d/masq
   /sbin/e-smith/signal-event remoteaccess-update

I'm not sure if the contents of each of the files is documented somewhere, I have just used this method, ad hoc.

Good luck

Dan