Results 1 to 8 of 8

Thread: All ports are closed until manually opened by user - is that correct?

  1. #1
    Join Date
    Dec 2012
    Beans
    51

    All ports are closed until manually opened by user - is that correct?

    I am new to Linux and Ubuntu. I googled and read some articles stating that all ports are closed until they are opened manually by the user. Is it correct?

    And what do you mean by "listening on a port" and "a port is established" in simple terms?

  2. #2
    Join Date
    Dec 2005
    Location
    Western Australia
    Beans
    11,480
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: All ports are closed until manually opened by user - is that correct?

    Quote Originally Posted by regency View Post
    I am new to Linux and Ubuntu. I googled and read some articles stating that all ports are closed until they are opened manually by the user. Is it correct?

    And what do you mean by "listening on a port" and "a port is established" in simple terms?
    On Ubuntu, when you boot it up, there are no programs listening for connections. If you open a program that listens, for instance Transmission or Apache Web Server, then anyone remotely can establish a connection to those programs.

    What you are asking is "Does Ubuntu have a fully set-up firewall". By default Ubuntu has a firewall, but set to "allow all". This is not a security risk, as a remote computer can only connect to any programs that are listening for connections. And there are none that will do that in the default Ubuntu install unless you actually start them up or install them.

    If incoming connections are being denied, either you don't have the necessary program running or you have a firewall in your modem.
    I try to treat the cause, not the symptom. I avoid the terminal in instructions, unless it's easier or necessary. My instructions will work within the Ubuntu system, instead of breaking or subverting it. Those are the three guarantees to the helpee.

  3. #3
    Join Date
    Jun 2011
    Location
    The Shadow Gallery
    Beans
    6,744

    Re: All ports are closed until manually opened by user - is that correct?

    On a default 12.10 intall for example then Ports 68/UDP, 5353/UDP and 631/TCP are listening.

    from https://wiki.ubuntu.com/Security/Features


    Default installations of Ubuntu must have no listening network services after initial install. Exceptions to this rule include network infrastructure services such as the DHCP client and mDNS (Avahi/ZeroConf, see ZeroConfPolicySpec for implementation details and justification). When installing Ubuntu Server, the administrator can, of course, select specific services to install beyond the defaults (e.g. Apache

    And you can run a NMAP scan on your install to show it, Canonicals "no listening services" means that some are, bit like Microsofts UNC is not universal

    If you are concerned with security you can read the daily security vulnerabilities here http://www.ubuntu.com/usn

    But more accurately from somewhere like http://www.exploit-db.com/ or https://cve.mitre.org/

    Peace
    Last edited by haqking; March 17th, 2013 at 12:13 PM.
    Backtrack - Giving machine guns to monkeys since 2006
    Kali-Linux - Adding a grenade launcher to the machine guns since 2013

  4. #4
    Join Date
    Dec 2012
    Beans
    51

    Re: All ports are closed until manually opened by user - is that correct?

    Quote Originally Posted by haqking View Post
    Default installations of Ubuntu must have no listening network services after initial install.
    What sudo command should I issue to find out that my default installation of Ubuntu 12.10 has no listening network services?

  5. #5
    Join Date
    Dec 2012
    Beans
    51

    Re: All ports are closed until manually opened by user - is that correct?

    Quote Originally Posted by 3rdalbum View Post
    By default Ubuntu has a firewall, but set to "allow all". This is not a security risk, as a remote computer can only connect to any programs that are listening for connections. And there are none that will do that in the default Ubuntu install unless you actually start them up or install them.
    I plan on installing OpenVPN and route all network traffic through the VPN tunnel. Whenever the VPN disconnects, all network traffic to and from my computer should terminate immediately. How do I go about routing all network traffic through the VPN tunnel?

    Any help would be most appreciated.

  6. #6
    Join Date
    Jun 2011
    Location
    The Shadow Gallery
    Beans
    6,744

    Re: All ports are closed until manually opened by user - is that correct?

    Quote Originally Posted by regency View Post
    What sudo command should I issue to find out that my default installation of Ubuntu 12.10 has no listening network services?
    From the link that I posted from which that was quoted it explains to use the following:

    Code:
    netstat -an --inet | grep LISTEN | grep -v 127.0.0.1
    There are many variations on this command including tools such as NMAP.

    LIke I said though canonical prefer to say there "no listening" and then add exceptions rather than clearly state there "are listening"

    Peace
    Backtrack - Giving machine guns to monkeys since 2006
    Kali-Linux - Adding a grenade launcher to the machine guns since 2013

  7. #7
    Join Date
    Jun 2011
    Location
    The Shadow Gallery
    Beans
    6,744

    Re: All ports are closed until manually opened by user - is that correct?

    Quote Originally Posted by regency View Post
    I plan on installing OpenVPN and route all network traffic through the VPN tunnel. Whenever the VPN disconnects, all network traffic to and from my computer should terminate immediately. How do I go about routing all network traffic through the VPN tunnel?

    Any help would be most appreciated.
    as soon as you connect to a VPN all traffic will go through the VPN, that is the point.

    as soon as you disconnect from the VPN then it will default to your standard connection.
    Backtrack - Giving machine guns to monkeys since 2006
    Kali-Linux - Adding a grenade launcher to the machine guns since 2013

  8. #8
    Join Date
    Dec 2012
    Beans
    51

    Re: All ports are closed until manually opened by user - is that correct?

    Quote Originally Posted by haqking View Post
    as soon as you disconnect from the VPN then it will default to your standard connection.
    That is why when my computer disconnects from the VPN, all network connections should be killed. How do I do that on Ubuntu 12.10?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •