3

I am using Ubuntu 14.04 LTS. I config my /etc/network/interfaces like this:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.5.201
gateway 192.168.5.1
netmask 255.255.255.0
dns-nameservers 8.8.8.8 8.8.4.4

This is my ip addr result:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:d2:39:2e brd ff:ff:ff:ff:ff:ff
    inet 192.168.5.201/24 brd 192.168.5.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fed2:392e/64 scope link 
       valid_lft forever preferred_lft forever

This is my ifconfig result:

eth0      Link encap:Ethernet  HWaddr 00:0c:29:d2:39:2e  
      inet addr:192.168.5.201  Bcast:192.168.5.255  Mask:255.255.255.0
      inet6 addr: fe80::20c:29ff:fed2:392e/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:69923 errors:0 dropped:0 overruns:0 frame:0
      TX packets:47195 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:57438695 (57.4 MB)  TX bytes:6766887 (6.7 MB)

lo        Link encap:Local Loopback  
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:243516 errors:0 dropped:0 overruns:0 frame:0
      TX packets:243516 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1 
      RX bytes:48472222 (48.4 MB)  TX bytes:48472222 (48.4 MB)

I can connect to Internet correctly. I can telnet to my localhost

telnet localhost 9000

But somehow, I cannot telnet to myself using the LAN IP:

telnet 192.168.5.201 9000

telnet: Unable to connect to remote host: Connection refused

My IPTABLES has no rule. Why this happen, and (OR) how can I fix it?

2

It is probably only listening on localhost. Run sudo netstat -tulpn|grep ':9000'. If the line that comes up says something like 127.0.0.1:9000 then that means I'm correct, in which case you need to modify some sort of a bind-address or listen-address parameter.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.