LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 01-16-2006, 02:00 PM   #1
taiwf
Member
 
Registered: Jun 2005
Distribution: debian, ubuntu, redhat,knoppix
Posts: 194

Rep: Reputation: 31
where is firewall script in ubuntu 5.10 ?


I have install ubuntu 5.10 but i can't find firewall script in /etc/init.d/ . In debian there is such script that allow me to do iptables start/stop/status/etc.

I do have iptable installed . But without such script is there anyway i can check if my firewall is running? Besides, can i use the script from lastest debian distro? Or is there any generic script i can download and use without modification? I am newb at shell.



thx in advance
 
Old 01-16-2006, 03:22 PM   #2
nephish
Member
 
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456

Rep: Reputation: 30
i have firestarter on my ubuntu box, does all the work for you, sets up iptables, rules, what-not. i know of scripts out there, but i dont know one exactly. i would caution you about using a debian script. Even though they are very very similar, Debian and Ubuntu are not exactly the same thing.
 
Old 01-16-2006, 03:53 PM   #3
Aramil
LQ Newbie
 
Registered: Nov 2005
Posts: 5

Rep: Reputation: 0
Just use firestarter.Its much easier than configuring iptables by your own.Then you can add a small script in init.d in order to start firestarter on startup.But I can't help you with that cause I m no good at scritps....hehehe
 
Old 01-16-2006, 05:38 PM   #4
taiwf
Member
 
Registered: Jun 2005
Distribution: debian, ubuntu, redhat,knoppix
Posts: 194

Original Poster
Rep: Reputation: 31
ok, i got a set of rule for iptables (ie. mainly traffic directing and blocking stuff). Now if i installed firestarter , will i able to use those rule?
 
Old 01-16-2006, 07:40 PM   #5
nephish
Member
 
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456

Rep: Reputation: 30
dude, just use firestarter. its gui, and you set up all the rules you want like that, really easy. Install firestarter and see what it can do before you mess with scripts by hand, save yourself some trouble.
good luck
 
Old 01-17-2006, 03:26 PM   #6
Aramil
LQ Newbie
 
Registered: Nov 2005
Posts: 5

Rep: Reputation: 0
the rules can be set up again with just a few clicks!I m sure you ll find it much easier!Let us know!Gl
 
Old 01-17-2006, 06:39 PM   #7
taiwf
Member
 
Registered: Jun 2005
Distribution: debian, ubuntu, redhat,knoppix
Posts: 194

Original Poster
Rep: Reputation: 31
well, the linux box is used as server where i need to frequently ssh into it to admin remotely. I try to stay away from remote desktop as i heard it introduce more problem in term of security. I google abit and it seems this ubuntu doesn't seem to have script like debian...

I can probably use gui for now till i get script rdy. Just one question, does this firestarter generated a little script (or safe it somewhere in system ) for its own rule set once you create by it? I used to use webmin and thats what it did for the firewall module. I have the firewall rule in bash file, and just dont' want to mess up with one generated by firestarter (if it creates any).


thx

Last edited by taiwf; 01-17-2006 at 06:48 PM.
 
Old 11-18-2006, 12:07 AM   #8
0x29a
LQ Newbie
 
Registered: Jun 2004
Posts: 16

Rep: Reputation: 0
I just setup a test server with ubuntu 6.06 LTS and I've been wondering the same thing about firewalls since I'm in the process of migrating away from SuSE which is the distro my firewall is currently running. I'm going to install firestarter and I'll post my findings here including whatever file(s) it generates.
 
Old 11-18-2006, 07:36 AM   #9
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Just create your ip-tables script and call it from /etc/rc.local . This will automatically start the script at boot (after everything else !). Depending on the luxury that you want, you can add the start, stop and so on in the script; in that case your call in rc.local will be something like my_iptables_script start.

I don't know what the best place is to store the script (probably /etc/init.d).

If your script supports start, stop etc, I think that it will also work if you place a symlink to your script in rc2.d (or whatever runlevel directory is used on your system) instead of using rc.local.

The following script is in /etc/init.d on my Dapper box. There is a symlink to it in my rc2.d (S20firestarter). This might help you to write your own script without installing firestarter.
Code:
#!/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

. /lib/lsb/init-functions

FS_CONTROL="/etc/firestarter/firestarter.sh"

[ -x /usr/sbin/firestarter ] || exit 0
[ -x $FS_CONTROL ] || exit 0
[ -s /etc/firestarter/configuration ] || exit 0

RETVAL=0

start() {
	log_begin_msg "Starting the Firestarter firewall..."
	$FS_CONTROL start > /dev/null
	RETVAL=$?
	if [ $RETVAL -eq 0 ]; then
		log_end_msg 0
	else
		log_end_msg 1
	fi
	return $RETVAL
}

stop() {
	log_begin_msg "Stopping the Firestarter firewall..."
	$FS_CONTROL stop > /dev/null
	RETVAL=$?
	if [ $RETVAL -eq 0 ]; then
		log_end_msg 0
	else
		log_end_msg 1
	fi
	return $RETVAL
}

lock() {
	log_begin_msg "Locking the Firestarter firewall..."
	$FS_CONTROL lock > /dev/null
	RETVAL=$?
	if [ $RETVAL -eq 0 ]; then
		log_end_msg 0
	else
		log_end_msg 1
	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
		log_warning_msg "Firestarter is running..."
	else
		log_warning_msg "Firestarter is stopped"
	fi
	RETVAL=$?
	;;
  *)
	log_success_msg "Usage: firestarter {start|stop|restart|force-reload|lock|status}"
	exit 1
esac
exit $RETVAL
PS I have not analyzed the script so I don't know the finer details. I'm still trying to figure out how it all works in combination with ppp under ubuntu (slackware is a lot more transparent from that perspective).
 
  


Reply

Tags
firestarter, ubuntu



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu How to run Python script on Login? warnetgm Linux - General 14 03-13-2012 06:11 PM
Running Python Script in UBUNTU Session Manager warnetgm Linux - Newbie 2 12-06-2006 03:08 PM
Ubuntu Firewall Linux31 Ubuntu 2 07-03-2005 05:18 AM
Installing via install.sh script files in Ubuntu Incognegro Linux - Newbie 1 04-13-2005 01:19 AM
slackware's /etc/rc.d/rc.firewall equivalent ||| firewall script startup win32sux Debian 1 03-06-2004 09:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 05:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration