Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Can't close port 80

  1. #1
    Join Date
    Apr 2007
    Location
    Out in Left Field
    Beans
    1,090
    Distro
    Ubuntu 16.04 Xenial Xerus

    Can't close port 80

    I noticed that I have Port 80 open and I am not sure what is using it. I tried to close it using the command
    Code:
    sudo ufw deny  80
    and also through the graphical firewall interface (shows port denied but it is greyed out). How do I close this Port and How do I find out why it is open

    Thanks

    This may be a clue but I am not sure what it means
    Code:
    david@MainSqueeze:~$ netstat -tulpn | grep :80
    (Not all processes could be identified, non-owned process info
     will not be shown, you would have to be root to see it all.)
    tcp6       0      0 :::80                   :::*                    LISTEN      -               
    david@MainSqueeze:~$
    Last edited by SuperFreak; January 26th, 2014 at 05:40 PM.
    MB: Asrock Extreme4-M CPU: Intel(R) Core(TM) i7-3770K CPU @3.50GHz Memory: Corsair Low Profile Vengeance 16.00 GB. GC On CPU HD4000 Platform: x86_64 Distribution: Dual Boot -Ubuntu 16.04 Xenial Xerus with Cinnamon DE and Linux Mint 18 Sarah Cinnamon

  2. #2
    Join Date
    Sep 2007
    Location
    In here watching you!
    Beans
    Hidden!

    Re: Can't close port 80

    Port 80 is used for HTTP. You browser uses it for one thing.
    Use whatever OS or desktop works for you. Dual boot or use VMs if you want. Backup your computer regularly, and definitely before upgrading, partitioning, or installing an OS.

    No support requests by PM please.

  3. #3
    Join Date
    Apr 2007
    Location
    Out in Left Field
    Beans
    1,090
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Can't close port 80

    Quote Originally Posted by Old_Grey_Wolf View Post
    Port 80 is used for HTTP. You browser uses it for one thing.
    Some time ago I tested my ports usig Shield's Up and all ports were in Stealth mode. Now Port 80 shows as open. I am not sure I understand what has changed. Is HTTP and the use of port 80 needed for browsing the internet or can Port 80 be closed or at least put in stealth mode?

    According to Bohdi.zazen Port 80 is used to run Apache. I will have to investigate further but I think there is a reason I need Apache to run
    Last edited by SuperFreak; January 26th, 2014 at 06:13 PM.
    MB: Asrock Extreme4-M CPU: Intel(R) Core(TM) i7-3770K CPU @3.50GHz Memory: Corsair Low Profile Vengeance 16.00 GB. GC On CPU HD4000 Platform: x86_64 Distribution: Dual Boot -Ubuntu 16.04 Xenial Xerus with Cinnamon DE and Linux Mint 18 Sarah Cinnamon

  4. #4
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    2,324
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Can't close port 80

    If you inquire with root level, you can see what process is listening on port 80. Example:
    Code:
    doug@doug-64:~$ netstat -tulpn | grep :80
    (No info could be read for "-p": geteuid()=1000 but you should be root.)
    tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      -
    doug@doug-64:~$ sudo netstat -tulpn | grep :80
    [sudo] password for doug:
    tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1525/apache2
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

  5. #5
    Join Date
    Apr 2007
    Location
    Out in Left Field
    Beans
    1,090
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Can't close port 80

    Right you are...Thanks
    Code:
    david@MainSqueeze:~$ sudo netstat -tulpn | grep :80
    [sudo] password for david: 
    tcp6       0      0 :::80                   :::*                    LISTEN      2456/apache2    
    david@MainSqueeze:~$
    Now I just have to determine whether I need Apache2

    edit: Disabling and removing Apache2 did not seem to close port
    Code:
    sudo apt-get remove apache2
    Last edited by SuperFreak; January 26th, 2014 at 06:39 PM.
    MB: Asrock Extreme4-M CPU: Intel(R) Core(TM) i7-3770K CPU @3.50GHz Memory: Corsair Low Profile Vengeance 16.00 GB. GC On CPU HD4000 Platform: x86_64 Distribution: Dual Boot -Ubuntu 16.04 Xenial Xerus with Cinnamon DE and Linux Mint 18 Sarah Cinnamon

  6. #6
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Can't close port 80

    Quote Originally Posted by SuperFreak View Post
    Right you are...Thanks
    Code:
    david@MainSqueeze:~$ sudo netstat -tulpn | grep :80
    [sudo] password for david: 
    tcp6       0      0 :::80                   :::*                    LISTEN      2456/apache2    
    david@MainSqueeze:~$
    Now I just have to determine whether I need Apache2

    edit: Disabling and removing Apache2 did not seem to close port
    Code:
    sudo apt-get remove apache2
    Are you sure Apache2 has been removed? What do you get with this command
    Code:
    dpkg -l apache2
    Are you aware that the IP address you are listing is for IPv6?
    -BAB1

  7. #7
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    scanning

    Also, make sure to run any scans from a second machine. Doing the scan from the same machine won't give meaningful results as different rules apply for the localhost.

  8. #8
    Join Date
    Apr 2007
    Location
    Out in Left Field
    Beans
    1,090
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Can't close port 80

    Quote Originally Posted by bab1 View Post
    Are you sure Apache2 has been removed? What do you get with this command
    Code:
    dpkg -l apache2
    Are you aware that the IP address you are listing is for IPv6?
    I think I wrecked the uninstall/purge of Apache2. This is what I get from the dpkg command
    Code:
    david@MainSqueeze:~$ dpkg -l apache2
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name           Version        Description
    +++-==============-==============-============================================
    un  apache2        <none>         (no description available)
    david@MainSqueeze:~$
    I was'nt aware it was IPv6 and I am not sure what that might mean


    @Lars Noodén Thanks. I don't think it is possible to use Shield's Up in that way but I am beginning to get the impression it is not of much value anyway. How would I scan for open Ports from a second computer?
    Last edited by SuperFreak; January 26th, 2014 at 09:32 PM.
    MB: Asrock Extreme4-M CPU: Intel(R) Core(TM) i7-3770K CPU @3.50GHz Memory: Corsair Low Profile Vengeance 16.00 GB. GC On CPU HD4000 Platform: x86_64 Distribution: Dual Boot -Ubuntu 16.04 Xenial Xerus with Cinnamon DE and Linux Mint 18 Sarah Cinnamon

  9. #9
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Can't close port 80

    Quote Originally Posted by SuperFreak View Post
    I think I wrecked the uninstall/purge of Apache2. This is what I get from the dpkg command
    Code:
    david@MainSqueeze:~$ dpkg -l apache2
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name           Version        Description
    +++-==============-==============-============================================
    un  apache2        <none>         (no description available)
    david@MainSqueeze:~$
    I was'nt aware it was IPv6 and I am not sure what that might mean


    @Lars Noodén Thanks. I don't think it is possible to use Shield's Up in that way but I am beginning to get the impression it is not of much value anyway. How would I scan for open Ports from a second computer?
    Apache2 is still installed. If you want to get rid of apache2 you need to purge it. Use this command and recheck
    Code:
    sudo apt-get purge apache2
    What @Lars Noodén is saying is you need 2 computers on the network to correctly test. I'm not sure that it's really true, but that is what he is saying.

    Here is what I get with netstat the localhost (the only machine on at this time)
    Code:
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 0.0.0.0:58122           0.0.0.0:*               LISTEN      1146/rpc.mountd 
    tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      857/smbd      <--Samba  
    tcp        0      0 0.0.0.0:49837           0.0.0.0:*               LISTEN      -               
    tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      658/rpcbind    <-- For NFS     
    tcp        0      0 0.0.0.0:38482           0.0.0.0:*               LISTEN      1146/rpc.mountd 
    tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      884/sshd        <-- SSH        
    tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1012/cupsd      
    tcp        0      0 0.0.0.0:42971           0.0.0.0:*               LISTEN      1146/rpc.mountd <-- For NFS  
    tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      857/smbd         <--Samba  
    tcp        0      0 0.0.0.0:2049            0.0.0.0:*               LISTEN      -               
    tcp        0      0 0.0.0.0:51908           0.0.0.0:*               LISTEN      904/rpc.statd     <-- For NFS 
    -BAB1

  10. #10
    Join Date
    Apr 2007
    Location
    Out in Left Field
    Beans
    1,090
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Can't close port 80

    Thanks Bab1. This is the result of another purge
    Code:
    david@MainSqueeze:~$ sudo apt-get purge apache2
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Package apache2 is not installed, so not removed
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    david@MainSqueeze:~$
    and then
    Code:
    david@MainSqueeze:~$ dpkg -l apache2
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name           Version        Description
    +++-==============-==============-============================================
    un  apache2        <none>         (no description available)
    david@MainSqueeze:~$

    Does "un apache2" indicate it is not known whether it is installed or not?
    Last edited by SuperFreak; January 26th, 2014 at 09:52 PM.
    MB: Asrock Extreme4-M CPU: Intel(R) Core(TM) i7-3770K CPU @3.50GHz Memory: Corsair Low Profile Vengeance 16.00 GB. GC On CPU HD4000 Platform: x86_64 Distribution: Dual Boot -Ubuntu 16.04 Xenial Xerus with Cinnamon DE and Linux Mint 18 Sarah Cinnamon

Page 1 of 2 12 LastLast

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
  •