Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
33
rated 0 times [  33] [ 0]  / answers: 1 / hits: 209505  / 3 Years ago, thu, october 28, 2021, 3:15:12

While learning some new things about iptables I can't through this. 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:~#

More From » iptables

 Answers
4

The Uncomplicated Firewall or ufw is the configuration tool for iptables that comes by default on Ubuntu. So if you wanted to start or stop the ufw service, you'd have to do something like this



#To stop
$ sudo service ufw stop
ufw stop/waiting

#To start
$ 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.


[#36979] Saturday, October 30, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
aradxalte

Total Points: 70
Total Questions: 116
Total Answers: 116

Location: Dominica
Member since Sat, Nov 5, 2022
2 Years ago
;