We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
The Forum now has a brand new text editor, adding a bunch of handy features to use when creating posts. Read more in our how-to guide

What Linux tools and security??

1468910

Comments

  • tweeter
    tweeter Posts: 3,958 Forumite
    Part of the Furniture
    edited 6 July 2010 at 2:08PM
    Thanks for the info fwor. As I said earlier I've one foot in the grave but I'm not doing to bad for an old girl really, in trying to understand all this.
    Peel back your baby's eyelid to find no nationality or religious identity mark there. Peer at your baby's eyes for them to reflect back just people-throw away your flags and religious symbols...



  • weegie.geek
    weegie.geek Posts: 3,432 Forumite
    tronator wrote: »
    If you install a service like ssh, then you want to access it. So what's the point of having a firewall enabled if you need to open this port anyway for.

    Because you might want to lock down access to things you are running to certain IP addresses or ranges? I know there are other ways of doing this, but iptables is about as easy as any other way.
    They say it's genetic, they say he can't help it, they say you can catch it - but sometimes you're born with it
  • JustPassingBy
    JustPassingBy Posts: 710 Forumite
    fwor wrote: »

    Brian - here's a test for you: take a fresh Ubuntu installation and add gufw directly from the standard repositories. Start gufw and what does it tell you? That the firewall is not enabled.

    I don't need gufw,
    brian@desktop:~/$ iptables -L
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination         
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination         
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    
    No rules. No packet filtering. In your terms - no firewall. Which is what I said in posts #38 and #40. (Are we now down to four "incorrect" posts?)
    That's right. The kernel comes with the iptables/netfilter modules built-in, and it has an almost trivial default rule set in place (allow all outgoing, deny all incoming), but by default the firewall function is turned off.
    The empty ruleset means all packets (both incoming and outgoing) are passed. Nothing is denied by netfilter. What the kernel does with the packets is a different matter.
  • JustPassingBy
    JustPassingBy Posts: 710 Forumite
    Mr_Oink wrote: »

    It would appear that in his drive-by multi-post trolling, JustPassingBy has missed that simple - but important - fact

    CUPS does listen on port 631 - but only for connections from the local machine. By default connections from the internet and the LAN are rejected. You definitely didn't look at /etc/cupsd.conf or go to http://localhost:631.

    The udp ports are of less concern. You don't say what is listening on them (one service might be avahi) but I expect they don't listen for remote connections.

    So there we have it. Nothing at all listening for requests from remote machines. Packets from such machines are rejected by the kernel. Complete security in that regard.

    So can you explain - without hand-waving or references to trousers - why it is so important for tweeter to configure a firewall when it is evident none is required for the basic use she will make of the machine.
  • Mr_Oink
    Mr_Oink Posts: 1,012 Forumite
    edited 6 July 2010 at 3:43PM
    CUPS does listen on port 631 - but only for connections from the local machine. By default connections from the internet and the LAN are rejected. You definitely didn't look at /etc/cupsd.conf or go to http://localhost:631.
    .

    And you are familiar with the recent wide hole in CUPS allowing remote exploitation? No?
    It was discovered that CUPS did not properly handle memory allocations in
    the texttops filter. If a user or automated system were tricked into
    printing a crafted text file, a remote attacker could cause a denial of
    service or possibly execute arbitrary code with privileges of the CUPS user
    (lp). (CVE-2010-0542)
    
    Whilst this has *no* bearing on the port being wide open (the exploit makes no use of this) by default everything is open and there are services listening.
    Additionally, the current downloadable iso of 10.4 still contains the broken CUPS and this is resolved on the initial update.

    So we have established that by default 10.4 has nothing blocked by iptables, and that there are TCP and some UDP ports 'listening'. Yes?
    Would you agree with that fact - yes or no?
    So can you explain why it is so important for tweeter to configure a firewall when it is evident none is required for the basic use she will make of the machine.
    Do you think they have now discovered and patched *all* weaknesses in CUPS (or other potentially exploitable issues)? Do you think it would be best security practice to update the rule set (in this case by way of an easy gui) to *block* by default unnecessarily open ports? Or do you think your view of just leaving it open and assuming it to be 'secure enough' represents best practice?
  • JustPassingBy
    JustPassingBy Posts: 710 Forumite
    fwor wrote: »

    tronator - while I agree with the spirit of what you say, as Mr_Oink says, by default there is at least one service listening (CUPS on port 631), . . . . .

    Mr_Oink has it wrong. No doubt he will be along later to say as much.
    . . . . . . . and you don't have to do much in terms of installing software to add others, which an average user probably won't even be aware of.
    A fair point. But suppose a user does install a server unknowingly or without fully realising the implications. A mail server, for example. What is the problem?

    I'll help a little: all servers on Ubuntu are considered (like CUPS) to come with safe default settings.
  • fwor
    fwor Posts: 6,942 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    Perhaps we could debate the "when is a firewall not a firewall" issue to death, but, in my opinion, when a firewall is not performing any firewalling function, it's not acting as a firewall. You can view it differently and I really don't mind at all.
    I'll help a little: all servers on Ubuntu are considered (like CUPS) to come with safe default settings.

    This is where you are (probably) most wrong - because it means that you have assumed that whoever wrote the code that underlies that service has not made any mistakes. This includes mistakes that have already been discovered, and mistakes that might be discovered at some point in the future.

    History has shown that this is not a good assumption to make. If you do so you expose yourself to a greater level of risk, though, as I've already said, I currently consider it to be too low a level of risk for me to worry about - hence I do not use s/w firewalls. Or, in your terminology, I use a s/w firewall that does nothing.
  • JustPassingBy
    JustPassingBy Posts: 710 Forumite
    Mr_Oink wrote: »

    Do you think they have now discovered and patched *all* weaknesses in CUPS (or other potentially exploitable issues)?

    For today, yes.
    Do you think it would be best security practice to update the rule set (in this case by way of an easy gui) to *block* by default unnecessarily open ports? Or do you think your view of just leaving it open and assuming it to be 'secure enough' represents best practice?
    I've explained the situation with CUPS. There is no remote access to it. There are no security risks unless the user of the machine is malicious. In which case we are into "all bets are off if there is physical access" territory.

    Filtering packets to CUPS would disable printing on the local machine. Purging the software from the machine produces the same effect if that is what you want.

    I think you regard open ports as bad, whereas they are good. They enable you to do things. Also, I suspect you use the term "wide open" to mean no firewall is in place. Firewalls don't open or close ports. Starting or stoppng services does.
  • Mr_Oink
    Mr_Oink Posts: 1,012 Forumite
    For today, yes.
    Any you can guarantee that there never will be? Yes?
    I think you regard open ports as bad, whereas they are good. They enable you to do things. Also, I suspect you use the term "wide open" to mean no firewall is in place. Firewalls don't open or close ports. Starting or stoppng services does.
    No, wide open means just that - wide open. I could have a door that would keep out burglars, yet leave it wide open to allow them to start looking around.

    You appear to have missed my question. Do you consider closing unnecessarily open ports as best security practice - yes or no will do.
  • JustPassingBy
    JustPassingBy Posts: 710 Forumite
    Mr_Oink wrote: »

    Any you can guarantee that there never will be? Yes?

    Of course not. We can only fix known potential exploits.
    You appear to have missed my question. Do you consider closing unnecessarily open ports as best security practice - yes or no will do.
    Stopping an unnecessary or unwanted service is good practice. Doing so closes the port. Firewalls don't come into it.
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 353.5K Banking & Borrowing
  • 254.2K Reduce Debt & Boost Income
  • 455.1K Spending & Discounts
  • 246.6K Work, Benefits & Business
  • 603K Mortgages, Homes & Bills
  • 178.1K Life & Family
  • 260.6K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16K Discuss & Feedback
  • 37.7K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.