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 am using Ubuntu 12.04 . while learning some new things about iptables i cant through this . see at the image . while i am trying to start ,its saying as

 root@badfox:~# iptables -L -n -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
root@badfox:~# service iptables stop
iptables: unrecognized service
root@badfox:~# service iptables start
iptables: unrecognized service

Source: http://www.cyberciti.biz/tips/linux-iptables-examples.html

Why i am getting like this ?

EDIT: So my firewall already started but why i am not getting the output as i mentioned in the link at source link in first workout. .

Here is my output

root@badfox:~# sudo start ufw
start: Job is already running: ufw
root@badfox:~# iptables -L -n -v
Chain INPUT (policy ACCEPT 4882 packets, 2486K bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 5500 packets, 873K bytes)
 pkts bytes target     prot opt in     out     source               destination         
root@badfox:~# 
share|improve this question
1  
iptables isnt a service, it runs all the time, the only true way to stop the firewall is to flush the rules to get everything empty and to ACCEPT. What exactly are you asking, though? By default there never are any rules configured. –  Thomas W. Jul 9 '12 at 13:22
    
@LordofTime , click source link please –  AgentCool Jul 9 '12 at 14:11
1  
The above commands shows you don't have any user defined rule.If by that you mean you want to learn the firewall , implemented by the iptables , then follow this answer , though my answer but it has relevant links to get you started on iptables in Ubuntu. Also see its man page.And please edit the question to What exactly you are asking in simple words. –  atenz Jul 9 '12 at 14:23
2  
Just a suggestion ,why don't you refer the Official iptables how to. –  atenz Jul 9 '12 at 15:24
    
No (the why don't ) , was just a way of suggesting , not to ask the reason or any other thing :D . Thanks , i will never try that One-liner again :D. –  atenz Jul 9 '12 at 15:50
show 1 more comment

1 Answer 1

up vote 16 down vote accepted

The Universal FireWall or ufw is the firewall using iptables that comes by default on Ubuntu. So if you wanted to start or stop the ufw firewall service, you'd have to do something like this

#To stop
nits@excalibur:~$ sudo service ufw stop
ufw stop/waiting

#To start
nits@excalibur:~$ sudo service ufw start
ufw start/running

About why you are not receiving the output as shown in the source. It clearly states there that the output you are receiving is for an inactive firewall, that is, no rules have been set. So try setting up some rules in iptables. Here's the Ubuntu Wiki on iptables that shows you how to set, edit them and such.

share|improve this answer
    
thanks for the answer .I have added some more information after EDIT . please look at that ,:) –  AgentCool Jul 9 '12 at 14:57
2  
To be able to see the rules you will have to insert rules ,read the Link entirely as #4: Insert Firewall Rules there. –  atenz Jul 9 '12 at 15:16
1  
@imwrng Updated answer. And I agree with tjybba :) –  nitstorm Jul 9 '12 at 15:18
    
Thank you for the answer ,its helpful . –  AgentCool Jul 9 '12 at 15:48
1  
@imwrng Most welcome :) –  nitstorm Jul 9 '12 at 15:49
add comment

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.