2

Long story short.

Apache2 running on 0.0.0.0:80

Mysqld running on 0.0.0.0:3306

Can't access these ports from localhost, but CAN access them from remote hosts.

From Remote host (laptop)

MacBook-Pro:~ codemaster$ telnet 192.168.0.10 3306
Trying 192.168.0.10...
Connected to 192.168.0.10.
Escape character is '^]'.
T
5.5.40-0+wheezy1/QmQ,%uA?0b|m+.BDn|G*mysql_native_password^CConnection closed by foreign host.
MacBook-Pro:~ codemaster$ telnet 192.168.0.10 80
Trying 192.168.0.10...
Connected to 192.168.0.10.
Escape character is '^]'.

From Localhost (192.168.0.10)

root@udoo-debian-hfp:/# uname -a
Linux udoo-debian-hfp 3.0.35 #1 SMP PREEMPT Mon Mar 3 15:17:07 CET 2014 armv7l GNU/Linux
root@udoo-debian-hfp:/# netstat -a -n -p|grep 3306
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      21469/mysqld    
root@udoo-debian-hfp:/# netstat -a -n -p|grep 80
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      3614/apache2    
unix  3      [ ]         STREAM     CONNECTED     3880     3763/dbus-daemon    

root@udoo-debian-hfp:/# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:c0:08:88:a1:1c  
          inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6781 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4389 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:956650 (934.2 KiB)  TX bytes:644410 (629.3 KiB)

usb0      Link encap:Ethernet  HWaddr 7e:82:37:77:b9:01  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 7c:dd:90:3a:4a:a6  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Tried several options, hangs on 'trying to connect'

root@udoo-debian-hfp:/# telnet 192.168.0.10 80
Trying 192.168.0.10...
^C
root@udoo-debian-hfp:/# telnet 192.168.0.10 3306
Trying 192.168.0.10...
^C
root@udoo-debian-hfp:/# telnet 127.0.0.1 3306
Trying 127.0.0.1...
^C
root@udoo-debian-hfp:/# telnet 127.0.0.1 80
Trying 127.0.0.1...
^C

No IPTABLES

root@udoo-debian-hfp:/# iptables -L
FATAL: Module ip_tables not found.
iptables v1.4.14: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

Never met with something like this before... Either it was iptables blocking or daemons bound to the local interface.. but local to local?

2
  • 3
    Is your loopback interface up? Try ip link set lo up.
    – Celada
    Commented Jul 19, 2015 at 21:18
  • Amazing - job done. Celada - post as an answer please.
    – PeeS
    Commented Jul 19, 2015 at 21:19

1 Answer 1

6

It seems like your loopback interface isn't up. The loopback interface (IPv4 127.0.0.1/8, IPv6 ::1/128) is necessary for communications from one host to the same host.

On Debian, the loopback interface is normally turned up at boot time with the following configuration in /etc/network/interfaces:

auto lo
iface lo inet loopback

I don't know why your loopback interface didn't come up properly but try ifup lo (managed, preferred) or ip link set lo up (unmanaged) and also make sure the above lines are present in /etc/network/interfaces.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .