LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-12-2015, 04:24 PM   #1
Caver1
LQ Newbie
 
Registered: May 2014
Location: USA
Distribution: Ubuntu, always virtualizing others
Posts: 8

Rep: Reputation: Disabled
UFW ValueError


I just tried allowing Firefox by sudo ufw allow Firefox. I get back the following message;

Traceback (most recent call last):
File "/usr/sbin/ufw", line 115, in <module>
pr.data['iptype'], pr.force)
File "/usr/lib/python3/dist-packages/ufw/frontend.py", line 679, in do_action
res = self.set_rule(rule, ip_version)
File "/usr/lib/python3/dist-packages/ufw/frontend.py", line 419, in set_rule
rules = self.backend.get_app_rules_from_template(rule)
File "/usr/lib/python3/dist-packages/ufw/backend.py", line 413, in get_app_rules_from_template
(port, proto) = ufw.util.parse_port_proto(p)
File "/usr/lib/python3/dist-packages/ufw/util.py", line 76, in parse_port_proto
raise ValueError
ValueError

Firefox's profile is in UFW's app list. I have tried other apps in the list with the same problem.
I did the same on another machine with no problem.
I did try uninstalling UFW and making sure that all UFW files were gone then reinstalling UFW.
Didn't work. Same message.
I know nothing about the files in the message so I have no idea what's wrong.
Using Ubuntu 14.04.
 
Old 06-12-2015, 06:18 PM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
What are you looking to accomplish with that command?
And where did you get it?

Code:
ufw version
ufw 0.34~rc-0ubuntu2
Copyright 2008-2012 Canonical Ltd.
Code:
ufw allow firefox
ERROR: Could not find a profile matching 'firefox'
Code:
ufw status verbose | less
shows me this:
Code:
Default: deny (incoming), allow (outgoing), disabled (routed)
See https://help.ubuntu.com/community/UFW and/or
https://help.ubuntu.com/community/Gufw
 
Old 06-12-2015, 06:41 PM   #3
Caver1
LQ Newbie
 
Registered: May 2014
Location: USA
Distribution: Ubuntu, always virtualizing others
Posts: 8

Original Poster
Rep: Reputation: Disabled
You have to have a profile for the app that you want to allow. Some make their own
UFW profiles but most you have to make one for them and put it in /etc/ufw/applications.d.
To show what applications are there, the command is> sudo ufw app list.
You will be presented with a list of app profiles that are stored.
The profile defines what port/s and what protocol/s the app can use.

Last edited by Caver1; 06-12-2015 at 06:44 PM.
 
Old 06-12-2015, 07:13 PM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Aren't the defaults enough?
 
Old 06-12-2015, 07:23 PM   #5
Caver1
LQ Newbie
 
Registered: May 2014
Location: USA
Distribution: Ubuntu, always virtualizing others
Posts: 8

Original Poster
Rep: Reputation: Disabled
That doesn't help me solve my problem.
 
Old 06-13-2015, 08:14 AM   #6
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by Caver1 View Post
That doesn't help me solve my problem.
If you are looking for hand-holding or to be spoon-fed, this is not the place for that.
I notice that you didn't answer the question. So, show us your firefox profile for UFW then.
 
Old 06-13-2015, 08:55 AM   #7
Caver1
LQ Newbie
 
Registered: May 2014
Location: USA
Distribution: Ubuntu, always virtualizing others
Posts: 8

Original Poster
Rep: Reputation: Disabled
If you don't know anything about app profiles in UFW then you obviously can't help.
Going beyond the defaults has nothing to do with why it won't work on this one computer.
I am not asking for hand holding. I am asking for some direction.
My Firefox UFW profile;

[Firefox]
title=browser
description=mail newsgroups
ports=80,443/tcp

Now tell me how this generates the print out I get from trying to allow Firefox.
 
Old 06-13-2015, 02:41 PM   #8
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by Caver1 View Post
If you don't know anything about app profiles in UFW then you obviously can't help.
You have no idea what I know or don't know.

Last edited by Habitual; 06-14-2015 at 08:39 AM.
 
  


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
ValueError: max() arg is an empty sequence Traceback (most recent call last): File puru45 Ubuntu 1 11-25-2014 02:26 PM
[SOLVED] ufw judoka Linux - Networking 5 07-08-2010 03:03 PM
ufw firewall rhlnewbie Linux - Software 2 10-18-2009 03:23 PM
ufw in Slackware mattydee Slackware 2 05-19-2009 02:35 PM
Can't install a Xen VM: ValueError: Could not find an installable distribution at abefroman Linux - Server 3 01-11-2009 11:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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