LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-03-2011, 02:04 AM   #1
kirthika
LQ Newbie
 
Registered: Jul 2011
Posts: 23

Rep: Reputation: Disabled
iptables error


root@linux-laptop:/home/linux# service iptables status
iptables: unrecognized service

Why is it so??
Please do help me..
 
Old 08-03-2011, 02:10 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

It would help us a lot if you indicate what distro and version you are using. Check if you have iptables installed as root with:
Code:
which iptables
(should be in /sbin if I'm not mistaking). Then check if you have a startup script for iptables in /etc/init.d.

Kind regards,

Eric
 
Old 08-03-2011, 02:18 AM   #3
kirthika
LQ Newbie
 
Registered: Jul 2011
Posts: 23

Original Poster
Rep: Reputation: Disabled
Thanks for reply...
I am using Ubuntu 10.04 Lucid Lynx. I want to check if firewall is enabled in my laptop.

linux@linux-laptop:~$ which iptables
/sbin/iptables

How to check if I have startup script for iptables??
 
Old 08-03-2011, 03:38 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

Check if you have file named iptables in /etc/init.d.

Kind regards,

Eric

Last edited by EricTRA; 08-03-2011 at 03:42 AM.
 
Old 08-03-2011, 03:55 AM   #5
kirthika
LQ Newbie
 
Registered: Jul 2011
Posts: 23

Original Poster
Rep: Reputation: Disabled
In /etc/init.d I dont find iptables.
What does it mean??
 
Old 08-03-2011, 04:02 AM   #6
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
In Ubuntu the firewall is always enabled, it is not a service - it is a kernel feature, enabled during compilation. But besides enabled firewall you need to write some rules for it and execute them after each reboot, for example as network interface startup script. Programming rules is simple, for example:
Code:
iptables -P INPUT DENY # By default do not allow to anybody to start connection with your machine
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT # By default allow you connecting to anywhere from your machine
iptables -A INPUT -p TCP --dport 80 -j ACCEPT # Allow anybody to connect to your machine on port 80
This is only example, you can also find some high level tools to administer iptable rules.
 
  


Reply



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
iptables error in android: iptables-save and iptables-restore not working preetb123 Linux - Mobile 5 04-11-2011 01:56 PM
An error occured getting IPtables status from the command /etc/rc.d/init.d/iptables s CrazyMAzeY Linux - Newbie 10 08-12-2010 05:25 AM
iptables v1.2.9: Unknown arg `/sbin/iptables' Try `iptables -h' or 'iptables --help' Niceman2005 Linux - Security 4 12-29-2005 08:20 PM
Need help with iptables error. Anxiety Linux - Networking 1 03-31-2004 03:01 PM
iptables error dat64597 Linux - Security 3 02-03-2003 01:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:15 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