LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-03-2022, 05:56 PM   #1
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Rep: Reputation: Disabled
regarding ufw status --again.


Sorry, i am confused again
I want to check if my ufw is up or down, because kdeconnect is not working right.
When checked with systemctl, it said active
when checked with ufw status, it said inactive !!
what wrong ?!
which should i believe ?

Code:
$ systemctl status ufw                
● ufw.service - CLI Netfilter Manager
     Loaded: loaded (/usr/lib/systemd/system/ufw.service; enabled; vendor preset: disabled)
     Active: active (exited) since Sun 2022-02-27 19:18:31 CET; 4 days ago
    Process: 404 ExecStart=/usr/lib/ufw/ufw-init start (code=exited, status=0/SUCCESS)
   Main PID: 404 (code=exited, status=0/SUCCESS)
        CPU: 9ms

Feb 27 19:18:31 user1-pc systemd[1]: Starting CLI Netfilter Manager...
Feb 27 19:18:31 user1-pc ufw-init[410]: Skip starting firewall: ufw (not enabled)
Feb 27 19:18:31 user1-pc systemd[1]: Finished CLI Netfilter Manager.


$ sudo ufw status verbose
Status: inactive
[/CODE]
 
Old 03-03-2022, 06:15 PM   #2
tmick
Member
 
Registered: Jun 2005
Location: North Dakota
Distribution: Debian Testing
Posts: 247

Rep: Reputation: 20
Question

If you have the Gui for it does it shows as active?
 
Old 03-03-2022, 06:21 PM   #3
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,748

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
Quote:
Originally Posted by andrewysk View Post
Sorry, i am confused again
I want to check if my ufw is up or down, because kdeconnect is not working right.
When checked with systemctl, it said active
when checked with ufw status, it said inactive !!
what wrong ?!
which should i believe ?

Code:
$ systemctl status ufw                
● ufw.service - CLI Netfilter Manager
     Loaded: loaded (/usr/lib/systemd/system/ufw.service; enabled; vendor preset: disabled)
     Active: active (exited) since Sun 2022-02-27 19:18:31 CET; 4 days ago
    Process: 404 ExecStart=/usr/lib/ufw/ufw-init start (code=exited, status=0/SUCCESS)
   Main PID: 404 (code=exited, status=0/SUCCESS)
        CPU: 9ms

Feb 27 19:18:31 user1-pc systemd[1]: Starting CLI Netfilter Manager...
Feb 27 19:18:31 user1-pc ufw-init[410]: Skip starting firewall: ufw (not enabled)
Feb 27 19:18:31 user1-pc systemd[1]: Finished CLI Netfilter Manager.


$ sudo ufw status verbose
Status: inactive
[/CODE]
The systemctl status is reporting that ufw didn’t start, and why.
Looks to be what happened at boot, yes?

Last edited by scasey; 03-03-2022 at 06:23 PM.
 
Old 03-03-2022, 07:04 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,783

Rep: Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936
Deja vu?
https://www.linuxquestions.org/quest...fw-4175707244/

Code:
[Unit]
Description=Uncomplicated firewall
Documentation=man:ufw(8)
DefaultDependencies=no
Before=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/lib/ufw/ufw-init start quiet
ExecStop=/lib/ufw/ufw-init stop

[Install]
WantedBy=multi-user.target
Basically RemainAfterExit=yes will keep the service active even when all its processes exited. The ufw-init is a SySV style script that if ufw is enabled will load the saved firewall rules.
 
Old 03-04-2022, 12:47 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by andrewysk View Post
Sorry, i am confused again
I want to check if my ufw is up or down, because kdeconnect is not working right.
When checked with systemctl, it said active
when checked with ufw status, it said inactive !!
Make it so that both are active and stop obsessing about it.
Code:
sudo systemctl start ufw
sudo systemctl enable ufw
sudo ufw enable
 
  


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
[SOLVED] Difference between ufw status vs systemctl status ufw andrewysk Linux - Security 9 02-02-2022 07:10 AM
Noob questions regarding ufw and maybe firewalls in general LMtheCat Linux - Newbie 9 09-14-2018 12:02 AM
[SOLVED] ufw status world writeable group writeable masuch Linux - Security 2 02-28-2012 10:31 AM
Dualbooting again, again, again... Procrastinator Linux - General 4 10-28-2004 11:04 AM
Need help installing Mandrake (again, again, again...) DicedMalt Mandriva 6 08-26-2003 04:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:34 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
Open Source Consulting | Domain Registration