LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-27-2009, 11:57 AM   #1
egshane
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Rep: Reputation: 0
how to check if local firewall is enabled


red hat enterprise as 4 update 4

hello guys, newest of the newbs here. how do i check the status of a local firewall?
 
Old 10-27-2009, 12:04 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
iptables -L
 
Old 10-27-2009, 12:08 PM   #3
egshane
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Original Poster
Rep: Reputation: 0
thanks for the quick response...that was awesome. i ran that command, and i get command not found...would that indicate that i don't have a local firewall setup?
 
Old 10-27-2009, 12:13 PM   #4
egshane
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by egshane View Post
thanks for the quick response...that was awesome. i ran that command, and i get command not found...would that indicate that i don't have a local firewall setup?
i also tried /sbin/iptabls -L...that time i got no such file or directory
 
Old 10-27-2009, 12:50 PM   #5
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
it should be /sbin/iptables -L. You may need to be root or have sudo access.
 
Old 10-27-2009, 01:17 PM   #6
Linville79
Member
 
Registered: Nov 2006
Location: Indiana, U.S.A.
Distribution: Red Hat Enterprise Linux, Fedora, CentOS
Posts: 134

Rep: Reputation: 16
Just use (as root/superuser):

Code:
#service iptables status
That's all you need in RHEL.

You can also use:

Code:
#service iptables stop
and

Code:
#service iptables start
To turn it off an on.

If you want to turn it off completely, you'll want to use the chkconfig command.

Code:
#chkconfig iptables off
or
Code:
#chkconfig iptables on
Which will make the changes for runlevels 2, 3, 4 and 5.

Code:
#chkconfig --list
Will let you look at what services are set to be off and on based on runlevels.

Good luck!
 
Old 10-27-2009, 01:39 PM   #7
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
In Ubuntu:
Code:
sudo iptables -L
It should give you quite a long list. To speed it up (no DNS lookups), you can add the -n option

Last edited by Wim Sturkenboom; 10-27-2009 at 01:42 PM.
 
Old 10-30-2009, 10:15 AM   #8
egshane
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Original Poster
Rep: Reputation: 0
awesome guys...thanks. the service iptables status gave me what i needed. wow...you guys are kickass.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Check if quota is enabled in Linux bostjan Linux - General 6 09-18-2010 07:23 AM
How I can check that I have SMTP-AUTH enabled. linuxjamil Linux - Server 1 05-24-2009 04:27 AM
How can I check if DMA is enabled? LegendBreath Fedora 7 06-06-2005 06:22 AM
How to Check for enabled ports diego_ar Linux - Networking 1 12-21-2004 08:07 AM
troubleshooting nfs/can't ping local while firewall enabled toastermaker Linux - Newbie 18 11-28-2003 11:34 PM


All times are GMT -5. The time now is 07:49 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration