Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I installed Firestarter, and configured my firewall.

But I'm in doubt : On boot, I sometimes see a [FAIL] marker, and to the left, I guess it was something like "start firewall". I can't be sure because the message is seen for less than a second, so I wanted to know if there is a way, without starting the whole firestarter software, to know if the firewall is on and working, or not.

Either a gadget, or better, some console instruction, the exact name of the firewall process/daemon, or bash script, will do.

Edit: I already tested my computer with the "Shield's Up" http://www.grc.com feature, which marks my computer as "Stealth", but as I am behind a router, I'm not surprised. Still, apparently, my computer answers to pings... Strange...

share|improve this question
    
The Ubuntu firewall will let pings through unless you specifically configure it to do otherwise. –  snostorm Aug 2 '10 at 21:37
    
This question appears to be abandoned, if you are experiencing a similar issue please ask a new question with details pertaining to your problem. If you feel this question is not abandoned, please flag the question explaining that. :) –  Ringtail Feb 27 '12 at 23:08
    
This question has helpful, upvoted answers and consequently is not abandoned. It should be reopened. –  Eliah Kagan Apr 13 '13 at 9:02

3 Answers 3

There are basically 2 ways of seeing if the firewall is configured. You should use both of the methods and verify that the firewall is both configured and configured the way you wish it to be.

First, check that the firewall rules have been applied. Pretty much all modern Linux firewall solutions use iptables for firewall. You can see that there are rules in place with iptables command:

iptables -L

This will return the current set of rules. There can be a few rules in the set even if your firewall rules haven't been applied. Just look for lines that match your given rulesets. This will give you an idea of what rules have been entered to the system. this doesn't guarantee the validity of the rules, only that they have been understood.

Next, you will use a second computer to test for connections against the host in question. This can be easily done with the nmap command (found in nmap package). Quick and dirty way of checking is:

nmap -P0 10.0.0.10
nmap -P0 -sU 10.0.0.10

Replace the IP address 10.0.0.10 with your destination hosts IP address.

The first line will scan for TCP ports that are open and available from the second computer. Second line will repeat the scan but this time with UDP ports. -P0 flag will prevent the host from being tested with a ICMP Echo packet, but might be blocked by your firewall rules.

The scan might take a while so be patient. There is also a GUI frontend for nmap called zenmap which makes it a bit easier to interpret the scan results if there is a lot of output.

share|improve this answer
    
Using another computer was something I would like to avoid (I am behind an external router, which works as a firewall. I already use the firewall testing from grc.com which could be considered as "another computer". Still, thanks for the console instructions. –  paercebal Jul 31 '10 at 15:37
    
Zenmap seems to give complicated logs, but it is awesome! Thanks for the info. +1, of course. –  paercebal Jul 31 '10 at 18:47

First of all, you can review the syslog for any error messages from services with sudo less /var/log/syslog. That may give you a clue as to why the firestarter service didn't start.

You can manipulate services with the service command. To check whether a service runs, use service [service_name] status. In your case, I guess service_name is just firestarter. You can use tab-completion to get a list of available services (service TAB TAB), or take a look at the contents of directory /etc/init.d (every file is a script to manage a service).

Ubuntu has its own firewall system, called Uncomplicated Firewall (ufw). Maybe it's easier to use that one within Ubuntu. If you install the package gufw, you can access the configuration in System -> Administration -> Firewall configuration.

The iptables command mentioned above works on any Linux system. All Linux firewall configuration tools (like ufw, firestarter, and many others) are basically front-ends to iptables.

share|improve this answer

You can use this command:

ufw status  
share|improve this answer
    
Note that this only works if you have ufw installed and using it. –  Braiam Dec 14 '13 at 21:49
    
ufw is install by default on ubuntu, whether or not you are using it, it tells you the status. –  windox Dec 15 '13 at 4:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.