Ubuntu – Are the ports opened?

firewallnetworking

Im using virtual server on hosting. There is Ubuntu 12.04 LTS. Im building pool websites, and stratum mining. I can connect to stratum on port 3333 via minerd on server, but cant connect from outside cpu miner, like mine. Here is a list which i get when trying this command netstat -ntlp | grep LISTEN :

root@vm9807:~# netstat -ntlp | grep LISTEN
tcp        0      0 0.0.0.0:3334            0.0.0.0:*               LISTEN      1757/python     
tcp        0      0 127.0.0.1:10025         0.0.0.0:*               LISTEN      1219/master     
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      987/mysqld      
tcp        0      0 0.0.0.0:587             0.0.0.0:*               LISTEN      1219/master     
tcp        0      0 127.0.0.1:11211         0.0.0.0:*               LISTEN      1121/memcached  
tcp        0      0 0.0.0.0:8332            0.0.0.0:*               LISTEN      1721/python     
tcp        0      0 0.0.0.0:8333            0.0.0.0:*               LISTEN      1757/python     
tcp        0      0 0.0.0.0:32333           0.0.0.0:*               LISTEN      1686/betacoind  
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      969/dovecot     
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      969/dovecot     
tcp        0      0 0.0.0.0:9333            0.0.0.0:*               LISTEN      1678/litecoind  
tcp        0      0 31.31.75.108:53         0.0.0.0:*               LISTEN      999/named       
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      999/named       
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      856/sshd        
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      1219/master     
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      999/named       
tcp        0      0 0.0.0.0:4190            0.0.0.0:*               LISTEN      969/dovecot     
tcp        0      0 127.0.0.1:7777          0.0.0.0:*               LISTEN      1117/python     
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      969/dovecot     
tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN      969/dovecot     
tcp        0      0 0.0.0.0:3333            0.0.0.0:*               LISTEN      1721/python     
tcp6       0      0 :::32332                :::*                    LISTEN      1686/betacoind  
tcp6       0      0 :::32333                :::*                    LISTEN      1686/betacoind  
tcp6       0      0 :::80                   :::*                    LISTEN      1319/apache2    
tcp6       0      0 :::9333                 :::*                    LISTEN      1678/litecoind  
tcp6       0      0 :::53                   :::*                    LISTEN      999/named       
tcp6       0      0 :::9334                 :::*                    LISTEN      1678/litecoind  
tcp6       0      0 :::22                   :::*                    LISTEN      856/sshd        
tcp6       0      0 ::1:953                 :::*                    LISTEN      999/named       
root@vm9807:~# 

My vserver hosting is not blocking any ports, im not using any firewall. Help me please thankx

Best Answer

Just use nmap from another computer - this will scan and show all the open ports on your machine, as well as hardware and software information it is possible to get from it.

Just run:

sudo nmap -A -O IP_ADDRESS

or for more informative output:

sudo nmap -A -O -vvv IP_ADDRESS

You may need to install it with sudo apt-get install nmap first. atleast, that is the command for an Ubuntu/Debian machine.


For example, if I run this:

sudo nmap -A -O -vvv 192.168.1.6

it shows:

Starting Nmap 6.40 ( http://nmap.org ) at 2013-12-22 16:32 GMT
Nmap scan report for 192.168.1.6
Host is up (0.00037s latency).
Not shown: 991 filtered ports
PORT     STATE  SERVICE      VERSION
21/tcp   closed ftp
22/tcp   open   ssh  
2049/tcp closed nfs
MAC Address: **:**:**:**:**:** (MANUFACTURER-OF-NETWORKING-HARDWARE)
Device type: general purpose
Running: Linux 2.6.X
OS CPE: cpe:/o:linux:linux_kernel:2.6
OS details: Linux 2.6.9 - 2.6.27
Network Distance: 1 hop

TRACEROUTE
HOP RTT     ADDRESS
1   0.37 ms 192.168.1.6


OS and Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 13.24 seconds

This shows that it currently only has the ssh port open to access, on port 22, with the ftp and nfs ports available, but closed, on 21 and 2049 ports.

Yes, I have edited secret info out of the above output - including MAC Address: **:**:**:**:**:** (MANUFACTURER-OF-NETWORKING-HARDWARE)

Hope this helps smiley

Related Question