在用netstat查出端口使用情况,Local Address有多个:::冒号,不知道什么情况,也连不上应用
(No info could be read for "-p": geteuid()=501 but you should be root.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:59836 0.0.0.0:* LISTEN -
tcp 0 0 10.0.2.15:22 10.0.2.2:54209 ESTABLISHED -
tcp 0 0 :::8109 :::* LISTEN -
tcp 0 0 :::111 :::* LISTEN -
tcp 0 0 :::50931 :::* LISTEN -
tcp 0 0 :::8180 :::* LISTEN -
tcp 0 0 :::22 :::* LIST
--------------我需要使用的是 8109 ,但是,前面全部是冒号
查出 ifconfig
[vagrant@localhost ~]$ ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:62:52:B8
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe62:52b8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:796 errors:0 dropped:0 overruns:0 frame:0
TX packets:508 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:82932 (80.9 KiB) TX bytes:75431 (73.6 KiB)
eth1 Link encap:Ethernet HWaddr 08:00:27:D9:E1:91
inet addr:10.10.10.201 Bcast:10.10.10.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fed9:e191/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:87 errors:0 dropped:0 overruns:0 frame:0
TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7434 (7.2 KiB) TX bytes:3928 (3.8 KiB)
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:16436 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
[vagrant@localhost ~]$ netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.10.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 eth0
请大拿帮忙看看。