Cannot connect even though ports are open

0

On my TurnKey Linux I have a number of programs running. When I access it using another computer I can see website working, I can connect using SSH. But Webmin (port 12321), MySql (3306) and others cannot be reached. Here's my netstat:

$sudo netstat -nlp

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:12320           0.0.0.0:*               LISTEN      2073/stunnel4 
tcp        0      0 0.0.0.0:12321           0.0.0.0:*               LISTEN      2073/stunnel4 
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      30017/mysqld 
tcp        0      0 127.0.0.1:10000         0.0.0.0:*               LISTEN      12859/perl 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      2104/sshd 
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      2243/master 
tcp        0      0 127.0.0.1:12319         0.0.0.0:*               LISTEN      1202/shellinaboxd 
tcp6       0      0 :::12322                :::*                    LISTEN      1274/apache2 
tcp6       0      0 :::80                   :::*                    LISTEN      1274/apache2 
tcp6       0      0 :::22                   :::*                    LISTEN      2104/sshd 
tcp6       0      0 :::443                  :::*                    LISTEN      1274/apache2 
udp        0      0 0.0.0.0:10000           0.0.0.0:*                           12859/perl

What am I missing?

alex

Posted 2016-09-23T20:53:36.080

Reputation: 550

Answers

0

You need to check your firewall or iptables. Just because netstat shows the ports are in use locally, doesn't mean they're accessible from the outside.

strobelight

Posted 2016-09-23T20:53:36.080

Reputation: 473

0

I'm sure you've already checked firewall software and/or host intrusion software on the Linux system to make sure it's not blocking the traffic. If not - then do that. :)

Beyond that, I'd also say to check your MySql configuration. That netstat output makes it appears that it is only listening to local/loopback traffic (127.0.0.1). So, you'd never be able to see it from another system.

David Woodward

Posted 2016-09-23T20:53:36.080

Reputation: 1 094

0

If iptables is running check your rules with iptables -L to see if you are allowing those ports. Check also if SELinux is activated: sestatus, and in which mode (permissive|enforcing); if it is enforcing you can modify the mode with sestatus 0.

andrade

Posted 2016-09-23T20:53:36.080

Reputation: 399