Date: Mon, 3 Jan 2005 12:59:39 -0600 From: Eric F Crist <ecrist@secure-computing.net> To: Timothy Luoma <lists@tntluoma.com> Cc: FreeBSD-Questions Questions <freebsd-questions@freebsd.org> Subject: Re: my lame attempt at a shell script... Message-ID: <9EC2E236-5DB9-11D9-B56F-000D9333E43C@secure-computing.net> In-Reply-To: <8B357427-5DB7-11D9-89A5-000D93AD26C8@tntluoma.com> References: <06DDB71C-5DB4-11D9-B56F-000D9333E43C@secure-computing.net> <8B357427-5DB7-11D9-89A5-000D93AD26C8@tntluoma.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail-6--229955359 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On Jan 3, 2005, at 12:44 PM, Timothy Luoma wrote: > > On Jan 3, 2005, at 1:19 PM, Eric F Crist wrote: > >> I'm trying to create a shell script for firewalling. What I'm hoping >> to do is create a generic script that looks for variables in >> /etc/rc.conf. I've tried looking at other scripts that use variables >> placed there, but don't understand how to pull the information from >> the file. > > Ah, now I may be a FreeBSD newbie, but I've been doing shell scripts > for a long time. > > What specifically are you trying to pull out of /etc/rc.conf? > > TjL > > ps - that said, why aren't you setting firewall configuration once and > leaving it alone? Well, I'm hoping to put some variables such as grog_firewall_enable, grog_firewall_iif, grog_firewall_oif, and possibly one or two more. These variables will change from one system to another, as this script will be installed on multiple systems. By setting these variables in rc.conf (or any other, separate file), I can change one copy of this script, propagate it throughout a set of servers, without having to customize each one for a particular server. In regards to your ps, I AM setting the config once, but this setup allows me to easily upgrade/improve my ruleset. Besides, I'm learning a lot writing this damn thing. ;) _______________________________________________________ Eric F Crist "I am so smart, S.M.R.T!" Secure Computing Networks -Homer J Simpson --Apple-Mail-6--229955359 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) iEYEARECAAYFAkHZlhwACgkQRAAY9knOW+qLPgCgjcglANSfMG56uxcYKgcd5yvy PFgAnRn1E2xLBQjNcwdg0NCNH5AKT4tg =c55f -----END PGP SIGNATURE----- --Apple-Mail-6--229955359--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9EC2E236-5DB9-11D9-B56F-000D9333E43C>