Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using the terminal I was wondering if it would be possible to see a list of all the active firewalls on a particular system that I have shelled into. I want to be able to see which ports are active pertaining to each firewall, so that I can change the restrictions.

share|improve this question
What OS? What do you mean by "systems using firewalls"? A Firewall typically blocks traffic, with holes poked through it to allow access for a limited set of ports. Is that what you're asking? What ports are opened in the firewall? – jsbillings May 14 '12 at 18:16
Linux, as in which servers are using which firewalls. I wouldn't mind knowing which ports are opened either. – Jeff May 14 '12 at 18:19
What would you do with that information? – Mat May 14 '12 at 18:37
Please, think again about it and write your question when you are sure what you want. Your question doesn't make any sense. – diegows May 14 '12 at 19:29
up vote 1 down vote accepted

You could scan your localhost for open ports using a tool like nmap.

nmap -v -sT localhost

nmap can be built from source or installed from the repo of most (if not all) major distros.

share|improve this answer

A server doesn't use a firewall. You set up a firewall to block or allow ports. that's it. If you want to look at your firewall settings, try looking at the output of iptables -L. (or iptables -L -n if you don't want it to resolve IPs).

share|improve this answer

Your Answer


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.