iccaros Posted August 8, 2007 Report Share Posted August 8, 2007 Matt said: This is very strange.... I just ran hackerwatch.org and shields up scan after a new boot. This time, it is again telling me that my ports are closed, but insecure as opposed to when I start manually and scan. I don't get it at all. I did notice that if I manually run Firestarter, and then 'Exit' it, my port scan comes up as secure--so I know that it can run in the background. Maybe I haven't configured Firestarter correctly.Here's this, if that's of any help (before manually starting it):matt@linux:~$ ps -ef | grep firestartermatt 5768 5746 0 19:33 pts/0 00:00:00 grep firestarterEdit: I just rebooted yet again, went to shields up, and it is reporting that my ports are secure. It seems as though it is inconsistent on whether or not it actually loads on bootup.try this command when it looks like it is not runningudo /etc/init.d/firestarter status Quote Link to post Share on other sites
shanenin Posted August 8, 2007 Report Share Posted August 8, 2007 iccaros said: try this command when it looks like it is not runningsudo /etc/init.d/firestarter statusthis is the content of his /etc/init.d/firestarter file. We just added this file ourselves. I don't think the "status" argument will work in this case :-)#!/bin/bash/etc/firestarter/firestarter.sh start #don't use sudo Quote Link to post Share on other sites
iccaros Posted August 8, 2007 Report Share Posted August 8, 2007 (edited) hmm, that could be the problem. the system does not start things in /etc/inint.dit runs scripts in the /etc/rc.d/ folder depending on startup levelRC3 is normaly network for Linux so it would be /etc/rc.d/rc3.dalso your script Should start with a "S" to signify startup as "K" is shutdown and a number to show boot order exampleS29FireStarter would execute at startup after script < 28when firestarter what installed it should have put in a boot script and then you softlink it to /etc/init.dnote ubuntu and debian use /etc/rcS.d/ as its initiation folderso you may be stepping on the startscript.. here is the start script for fedora#!/bin/sh## Init file for the Firestarter firewall## chkconfig: 2345 11 92## description: Starts, stops, and lock the firewall## Script Authors:# Tomas Junnonen <majix@sci.fi># Paul Drain <pd@cipherfunk.org>## config: /etc/firestarter/configuration# Source function library.. /etc/init.d/functions# Source networking configuration. /etc/sysconfig/network# Check that networking is up.[ ${NETWORKING} = "no" ] && exit 0FS_CONTROL="/etc/firestarter/firestarter.sh"[ -x $FS_CONTROL ] || exit 0[ -s /etc/firestarter/configuration ] || exit 0RETVAL=0start() { echo -n "Starting the Firestarter firewall: " $FS_CONTROL start > /dev/null RETVAL=$? if [ $RETVAL -eq 0 ]; then success else failure fi echo return $RETVAL}stop() { echo -n "Stopping the Firestarter firewall:" $FS_CONTROL stop > /dev/null RETVAL=$? if [ $RETVAL -eq 0 ]; then success else failure fi echo return $RETVAL}lock() { echo -n "Locking the Firestarter firewall:" $FS_CONTROL lock > /dev/null RETVAL=$? if [ $RETVAL -eq 0 ]; then success else failure fi echo return $RETVAL}# See how we were called.case "$1" in start) start RETVAL=$?;; stop) stop RETVAL=$?;; restart) stop start RETVAL=$?;; lock) lock RETVAL=$?;; status) if [ -e /var/lock/subsys/firestarter -o -e /var/lock/firestarter ]; then echo "Firestarter is running..." else echo "Firestarter is stopped" fi RETVAL=$?;; *) echo "Usage: firestarter {start|stop|restart|lock|status}" exit 1esacexit $RETVALhere is the debian/ubuntu start script#!/bin/sh## Init file for the Firestarter firewall## chkconfig: 2345 11 92## description: Starts, stops, and lock the firewall## Script Authors:# Tomas Junnonen <majix@sci.fi># Paul Drain <pd@cipherfunk.org>## config: /etc/firestarter/configurationFS_CONTROL="/etc/firestarter/firestarter.sh"[ -x /usr/sbin/firestarter ] || exit 0[ -x $FS_CONTROL ] || exit 0[ -s /etc/firestarter/configuration ] || exit 0RETVAL=0start() { echo -n "Starting the Firestarter firewall: " $FS_CONTROL start > /dev/null RETVAL=$? if [ $RETVAL -eq 0 ]; then echo done. else echo failed. fi return $RETVAL}stop() { echo -n "Stopping the Firestarter firewall:" $FS_CONTROL stop > /dev/null RETVAL=$? if [ $RETVAL -eq 0 ]; then echo done. else echo failed. fi return $RETVAL}lock() { echo -n "Locking the Firestarter firewall:" $FS_CONTROL lock > /dev/null RETVAL=$? if [ $RETVAL -eq 0 ]; then echo done. else echo failed. fi return $RETVAL}# See how we were called.case "$1" in start) start RETVAL=$?;; stop) stop RETVAL=$?;; restart) stop start RETVAL=$?;; force-reload) stop start RETVAL=$?;; lock) lock RETVAL=$?;; status) if [ -e /var/lock/subsys/firestarter -o -e /var/lock/firestarter ]; then echo "Firestarter is running..." else echo "Firestarter is stopped" fi RETVAL=$?;; *) echo "Usage: firestarter {start|stop|restart|force-reload|lock|status}" exit 1esacexit $RETVAL Edited August 8, 2007 by iccaros Quote Link to post Share on other sites
shanenin Posted August 8, 2007 Report Share Posted August 8, 2007 I think I gave out bad advice. I told Matt to delete the firestarter init file(I thought it was the one I created). On my ubuntu system, I used apt-get to uninstall and reinstall firestarter, but the /etc/init.d/firestarter file is not being created. Any ideas why? Quote Link to post Share on other sites
iccaros Posted August 8, 2007 Report Share Posted August 8, 2007 shanenin said: I think I gave out bad advice. I told Matt to delete the firestarter init file(I thought it was the one I created). On my ubuntu system, I used apt-get to uninstall and reinstall firestarter, but the /etc/init.d/firestarter file is not being created. Any ideas why?is it in /etc/rcS.d ?somethings like S19firestarter Quote Link to post Share on other sites
shanenin Posted August 8, 2007 Report Share Posted August 8, 2007 I just copied the init script you posted, and placed it in /etc/init.d. I then used the command update-rc.d firestarter defaults. This command will create the sym links for all runlevels. That seemed to work.to answer your question, it is not in that directory Quote Link to post Share on other sites
shanenin Posted August 8, 2007 Report Share Posted August 8, 2007 Sorry Matt for my unruley advice. I just tested this on my ubuntu system and it seems to work.First lets remove the crap I had you dorm /etc/init.d/firestarterupdate-rc.d -f firestarter removenow make a file that contains the ubuntu init script iccaros posted, then name it "firestarter"Assuming you saved this newly made script in you /home/matt directory. You now need to make it executablechmod +x /home/matt/firestarternext you need to copy it to /etc/init.dcp /home/matt/firestarter /etc/init.dnow add it to your startup with the update-rc.d commandupdate-rc.d firestarter defaultsnow at reboot it should startedit added later//for complete stealth protection. make sure you choose under preferences--->imcp filtering, then check "enable icmp filtering" Quote Link to post Share on other sites
Matt Posted August 9, 2007 Author Report Share Posted August 9, 2007 *sigh* Well, on what we had before shanenin, my scans were at least showing up sometimes as the firewall functioning properly. At first try at this, shields up shows that it didn't work. There is a chance that I did something wrong I suppose. Is there something I can paste for you to check that it was done correctly? Quote Link to post Share on other sites
shanenin Posted August 9, 2007 Report Share Posted August 9, 2007 the way we were doing it was kind of dirty. The way I just posted seems to be a more correct solution. I would be happy to look, but think it would be better just to use the method above. I actually tested it on my machine and it seems to work flawlessly. Quote Link to post Share on other sites
Matt Posted August 9, 2007 Author Report Share Posted August 9, 2007 shanenin, that's what I'm saying. I just tried the method above, and it didn't seem to work. Since yours worked perfectly, perhaps I did something wrong? Quote Link to post Share on other sites
shanenin Posted August 9, 2007 Report Share Posted August 9, 2007 Lets see if we can figure this outwhat does the output of this showcat /etc/init.d/firestarterWhat does the output of this showls -l /etc/init.d | grep firewhat does the output of this showls -l /etc/rc2.d | grep firewhat does the output of this showcat /etc/inittab | grep initdefault Quote Link to post Share on other sites
Matt Posted August 9, 2007 Author Report Share Posted August 9, 2007 matt@linux:~$ cat /etc/init.d/firestarter#!/bin/sh## Init file for the Firestarter firewall## chkconfig: 2345 11 92## description: Starts, stops, and lock the firewall## Script Authors:# Tomas Junnonen <majix@sci.fi># Paul Drain <pd@cipherfunk.org>## config: /etc/firestarter/configurationFS_CONTROL="/etc/firestarter/firestarter.sh"[ -x /usr/sbin/firestarter ] || exit 0[ -x $FS_CONTROL ] || exit 0[ -s /etc/firestarter/configuration ] || exit 0RETVAL=0start() { echo -n "Starting the Firestarter firewall: " $FS_CONTROL start > /dev/null RETVAL=$? if [ $RETVAL -eq 0 ]; then echo done. else echo failed. fi return $RETVAL}stop() { echo -n "Stopping the Firestarter firewall:" $FS_CONTROL stop > /dev/null RETVAL=$? if [ $RETVAL -eq 0 ]; then echo done. else echo failed. fi return $RETVAL}lock() { echo -n "Locking the Firestarter firewall:" $FS_CONTROL lock > /dev/null RETVAL=$? if [ $RETVAL -eq 0 ]; then echo done. else echo failed. fi return $RETVAL}# See how we were called.case "$1" in start) start RETVAL=$?;; stop) stop RETVAL=$?;; restart) stop start RETVAL=$?;; force-reload) stop start RETVAL=$?;; lock) lock RETVAL=$?;; status) if [ -e /var/lock/subsys/firestarter -o -e /var/lock/firestarter ]; then echo "Firestarter is running..." else echo "Firestarter is stopped" fi RETVAL=$?;; *) echo "Usage: firestarter {start|stop|restart|force-reload|lock|status}" exit 1esacexit $RETVALmatt@linux:~$ ls -l /etc/init.d | grep fire-rwxr-xr-x 1 root root 1636 2007-08-08 21:48 firestartermatt@linux:~$ ls -l /etc/rc2.d | grep firelrwxrwxrwx 1 root root 21 2007-08-08 21:49 S20firestarter -> ../init.d/firestartermatt@linux:~$ cat /etc/inittab | grep initdefaultcat: /etc/inittab: No such file or directory*Matt eyes that last one Quote Link to post Share on other sites
Matt Posted August 9, 2007 Author Report Share Posted August 9, 2007 shanenin, hold on a sec: Should I have done those commands on startup? I have manually started the firewall before entering those. Do you want me to do them again, without manually starting it? Quote Link to post Share on other sites
shanenin Posted August 9, 2007 Report Share Posted August 9, 2007 the output you showed me seems correct. It is identical to my configuration. I should not matter when you typed the commands. The only thing that seems odd it you do not have the file /etc/inittab. I thought all versions of linux use it.You restarted your system since following the method using the init script iccaros posted, right? Quote Link to post Share on other sites
shanenin Posted August 9, 2007 Report Share Posted August 9, 2007 assuming if after a reboot it does not start automatically. Will this command start it?/etc/init.d/firestarter start Quote Link to post Share on other sites
Matt Posted August 9, 2007 Author Report Share Posted August 9, 2007 I followed your instructions using the 2nd start script that iccaros posted.This may seem silly, but would system -> Preferences ->Sessions and adding sudo /usr/sbin/firestarter as a startup do any good? Or would this not work because there won't be the correct sudo privileges?Edit: give me a sec, I'll try that command on reboot Quote Link to post Share on other sites
Matt Posted August 9, 2007 Author Report Share Posted August 9, 2007 It did not start automatically again, and /etc/init.d/firestarter start did not start it either. Quote Link to post Share on other sites
shanenin Posted August 9, 2007 Report Share Posted August 9, 2007 I do have an old version of ubuntu, maybe the init system works differently. as to your question, I don't think that would matter.edit added later//I am currently downloading verison 7.04. Is that what you are using? Quote Link to post Share on other sites
Matt Posted August 9, 2007 Author Report Share Posted August 9, 2007 Quote I am currently downloading verison 7.04. Is that what you are using? Yes it is Quote Link to post Share on other sites
Matt Posted August 9, 2007 Author Report Share Posted August 9, 2007 hi shanenin. I'm wondering if there is a better way to go about following the steps I followed in my original post (editing sudoers or visudo). I'm also wondering if I should scrap Firestarter all together and go with something else that you might recommend?I'll wait for your reply. If this is a fight you think we can keep going at, then I'm all for it! If you think something else might be better, I can do that too.Thanks so much for the time an effort you've put into this thus far. Quote Link to post Share on other sites
shanenin Posted August 9, 2007 Report Share Posted August 9, 2007 As to the time and effort, I enjoy messing with other peoples systems :-) I hardly do anything with linux anymore, so I enjoy tweaking it. I already downloaded the iso, I will definitely get around to installing it. Then I can do some experimenting with some different techniques. Quote Link to post Share on other sites
Matt Posted August 9, 2007 Author Report Share Posted August 9, 2007 Thanks. I'm heading out of town again tonight, so after today, I won't be back again until Tuesday. If try anything else before I head out, I'll be sure to keep you posted. Quote Link to post Share on other sites
shanenin Posted August 9, 2007 Report Share Posted August 9, 2007 I am pretty busy with my move, I may get to it soon or not. In all honesty, I would rather play wit linux then do other stuff, but I should try to play less Quote Link to post Share on other sites
Matt Posted August 9, 2007 Author Report Share Posted August 9, 2007 Hehe, well no worries. I'm in no big rush. Good luck with your move! Quote Link to post Share on other sites
shanenin Posted August 9, 2007 Report Share Posted August 9, 2007 Thanks. I was just about to install in when I realized I have no cdrom in my computer. No it sounds like work :-) Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.