Results 1 to 5 of 5

Thread: What is wrong with netstat?

  1. #1
    Join Date
    Jun 2006
    Beans
    147
    Distro
    Ubuntu 7.04 Feisty Fawn

    What is wrong with netstat?

    Hi Guys,

    Question...

    How on earth do I view listening ports and est ports?
    Netstat on ubuntu is giving completely different output than any other distro i have used?

    ( Cont copy and past because its via a hyperv console.. )

    Anyway,
    It looks like:
    unix 4 [] DGRAM /dev/log

    It seems to show internal connections?

    How do I see a normal netstat that outputs "normally" lol?

  2. #2
    Join Date
    Mar 2011
    Location
    UK
    Beans
    125
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: What is wrong with netstat?

    Hi

    Try running

    Code:
    netstat -l
    for all listening ports

    Code:
    netstat -a
    for all ports.

    you can also add -t or -u for only tcp or udp.

    Alternatively if you just want to know which ports are open install nmap and portscan yourself.

    Code:
    sudo apt-get install nmap
    
    nmap localhost
    Hope this helps!

    Barry
    Desktop: Z77X-UD5H, Intel i7 3770k, NVidia GeForce 660 Ti Sli 16GB DDR3 RAM 2TB HDD
    OSes: Mint 14 x64 Windows 7 Ultimate x64
    Laptop: Dell Latitude E6430
    OSes: Ubuntu 13.04 x64, Backtrack 5 R3

  3. #3
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    5,431
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: What is wrong with netstat?

    man netstat will give you the details, but:
    netstat -t : shows only tcp connections
    netstat -u : shows only udp connectons
    netstat -l : shows only listening ports
    netstat -lntua : shows all listening and connected tcp or udp ports with numeric addresses

  4. #4
    Join Date
    Jun 2006
    Beans
    147
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: What is wrong with netstat?

    Quote Originally Posted by PowerBarry43 View Post
    Hi

    Try running

    Code:
    netstat -l
    for all listening ports

    Code:
    netstat -a
    for all ports.

    you can also add -t or -u for only tcp or udp.

    Alternatively if you just want to know which ports are open install nmap and portscan yourself.

    Code:
    sudo apt-get install nmap
    
    nmap localhost
    Hope this helps!

    Barry

    Nope doesnt work.
    I just see the unix sockets with no port details and a whole bunch of dbus stuff.

    It looks like this: ( Certainly nothing like what im used to seeing... )

    unix 3 [ ] STREAM CONNECTED 9513
    unix 3 [ ] STREAM CONNECTED 9524 @/tmp/dbus-QAwlQdsJQE
    unix 3 [ ] STREAM CONNECTED 9512
    unix 3 [ ] STREAM CONNECTED 9486 @/tmp/dbus-QAwlQdsJQE
    unix 3 [ ] STREAM CONNECTED 9485
    unix 3 [ ] STREAM CONNECTED 9484 /tmp/.esd-1000/socket
    unix 3 [ ] STREAM CONNECTED 9483
    unix 3 [ ] STREAM CONNECTED 9481 @/tmp/.ICE-unix/1747
    unix 3 [ ] STREAM CONNECTED 9480
    unix 3 [ ] STREAM CONNECTED 9482 /tmp/orbit-shawnc/linc-732-0-3edd427234522
    unix 3 [ ] STREAM CONNECTED 9479
    unix 3 [ ] STREAM CONNECTED 9477 /tmp/orbit-shawnc/linc-76d-0-394aba96acf46
    unix 3 [ ] STREAM CONNECTED 9476
    unix 3 [ ] STREAM CONNECTED 9478 /tmp/orbit-shawnc/linc-76b-0-14ac964fad8a9
    unix 3 [ ] STREAM CONNECTED 9475
    unix 2 [ ] DGRAM 9462

    I issue,
    netstat -t
    -a
    whatever and its just streams of unix sockets.

    I normally issue netstat -tunap on any server. yet this LTS server is odd..

  5. #5
    Join Date
    Jun 2006
    Beans
    147
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: What is wrong with netstat?

    Found the issue.

    Turns out if the firewall hasnt got it allowed out, then it doesnt show!?

    Go figure.

    _g



    Quote Originally Posted by lynxus View Post
    Nope doesnt work.
    I just see the unix sockets with no port details and a whole bunch of dbus stuff.

    It looks like this: ( Certainly nothing like what im used to seeing... )

    unix 3 [ ] STREAM CONNECTED 9513
    unix 3 [ ] STREAM CONNECTED 9524 @/tmp/dbus-QAwlQdsJQE
    unix 3 [ ] STREAM CONNECTED 9512
    unix 3 [ ] STREAM CONNECTED 9486 @/tmp/dbus-QAwlQdsJQE
    unix 3 [ ] STREAM CONNECTED 9485
    unix 3 [ ] STREAM CONNECTED 9484 /tmp/.esd-1000/socket
    unix 3 [ ] STREAM CONNECTED 9483
    unix 3 [ ] STREAM CONNECTED 9481 @/tmp/.ICE-unix/1747
    unix 3 [ ] STREAM CONNECTED 9480
    unix 3 [ ] STREAM CONNECTED 9482 /tmp/orbit-shawnc/linc-732-0-3edd427234522
    unix 3 [ ] STREAM CONNECTED 9479
    unix 3 [ ] STREAM CONNECTED 9477 /tmp/orbit-shawnc/linc-76d-0-394aba96acf46
    unix 3 [ ] STREAM CONNECTED 9476
    unix 3 [ ] STREAM CONNECTED 9478 /tmp/orbit-shawnc/linc-76b-0-14ac964fad8a9
    unix 3 [ ] STREAM CONNECTED 9475
    unix 2 [ ] DGRAM 9462

    I issue,
    netstat -t
    -a
    whatever and its just streams of unix sockets.

    I normally issue netstat -tunap on any server. yet this LTS server is odd..

Tags for this Thread

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
  •