I'm developing a server-client application (command-line based) in Java. I want to run it on my Raspberry Pi (RPi), but it turns out I can't login to my server-part from my laptop. The problem is that when running the server-part of my application (sockets, port 4444), then I can connect with telnet from my RPi without any problems. When I run the server-part on my RPi, no connection can be established.. I'm not to familiar with Linux, but is it something I need to do in iptables? Other suggestions?
Can connect from RPi to laptop, but not other way around
networking;java;raspberry pi
For starters I would make sure that the firewall (iptables) isn't an issue. You can confirm with this command on the RPi:$ iptables -LChain INPUT (policy ACCEPT)target     prot opt source               destination         Chain FORWARD (policy ACCEPT)target     prot opt source               destination         Chain OUTPUT (policy ACCEPT)target     prot opt source               destination    If the firewall looks OK (as above), then start your Java application, and confirm with this command that it's listening on the correct port:$ netstat -anptActive Internet connections (servers and established)Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    tcp        0      0 127.0.0.1:9090          0.0.0.0:*               LISTEN      970/xbmc.bintcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      970/xbmc.bintcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      936/sshdtcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      1086/smbdtcp        0      0 192.168.1.85:22         192.168.1.20:34971      ESTABLISHED 6762/0tcp        0      0 :::53                   :::*                    LISTEN      829/connmandtcp        0      0 :::22                   :::*                    LISTEN      936/sshdtcp        0      0 :::445                  :::*                    LISTEN      1086/smbdThis command shows which IP address and port each daemon is listening on. For example, the following line:tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      970/xbmc.binShows a process (xbmc.bin), whose process ID is 970, is listening on port 80, on all the interfaces (0.0.0.0). The last bit all interfaces means that if there are multiple network interfaces (ethernet, wifi, etc.) that the daemon will accept connections from any of them. If it just said an IP address such as 192.168.1.10, then the daemon would only accept connections from the interface that had that IP address assigned to it.One last thing to note, the types of connections that the above daemon will accept are TCP. The other type is UDP, which this daemon would not accept.