我有一个apache服务器运行在我的Ubuntu笔记本电脑上,它连接到wifi,通过同一个wifi网络,我有我的安道尔电话连接。
当我试图从android浏览器连接到apache web服务器主页时,它会使主机无法访问。另外,当我试图在android上使用终端仿真器进行ping时,它也会给出相同的消息,“主机不可达”。
我检查了android上的防火墙,它有http/80端口打开。
我使用的无线路由器是网具JNR1010。
什么是问题,因为理想情况下,它应该能够连接?
编辑:包含更多细节
Ubuntu
eth0 Link encap:Ethernet HWaddr 5asdw:5sdf5:sfe4:asfd:afq3:adfsdf
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)
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:11589 errors:0 dropped:0 overruns:0 frame:0
TX packets:11589 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6456404 (6.4 MB) TX bytes:6456404 (6.4 MB)
wlan0 Link encap:Ethernet HWaddr asf15:sfsd:551511:zf:5s5d:4sDF
inet addr:10.0.0.13 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: zxc::zxc:zxc:zxc:zxc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3884 errors:0 dropped:0 overruns:0 frame:0
TX packets:3808 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1537732 (1.5 MB) TX bytes:391968 (391.9 KB)Android ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:53938 errors:0 dropped:0 overruns:0 frame:0
TX packets:53938 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4568288 (4.3 MiB) TX bytes:4568288 (4.3 MiB)
p2p0 Link encap:Ethernet HWaddr asd:sdf:sdfsd:afs:afsdf:sdfe1
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)
wlan0 Link encap:Ethernet HWaddr 4df:sdfsd:asfas:asfA:asfq2:asf2
inet addr:10.0.0.9 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:300872 errors:0 dropped:344 overruns:0 frame:0
TX packets:186978 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:232591035 (221.8 MiB) TX bytes:25023755 (23.8 MiB)netstat -anp|grep :80 - Ubuntu
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 10.0.0.13:55288 445.889.322.651:80 ESTABLISHED 2959/chrome
tcp 0 0 10.0.0.13:37328 15.231.1511.2115:80 ESTABLISHED 2959/chrome
tcp6 0 0 :::80 :::* LISTEN iptables -L -v -n --行号:Ubuntu
Chain INPUT (policy DROP 108 packets, 3576 bytes)
num pkts bytes target prot opt in out source destination
1 24411 13M ufw-before-logging-input all -- * * 0.0.0.0/0 0.0.0.0/0
2 24411 13M ufw-before-input all -- * * 0.0.0.0/0 0.0.0.0/0
3 284 18450 ufw-after-input all -- * * 0.0.0.0/0 0.0.0.0/0
4 108 3576 ufw-after-logging-input all -- * * 0.0.0.0/0 0.0.0.0/0
5 108 3576 ufw-reject-input all -- * * 0.0.0.0/0 0.0.0.0/0
6 108 3576 ufw-track-input all -- * * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 0 0 ufw-before-logging-forward all -- * * 0.0.0.0/0 0.0.0.0/0
2 0 0 ufw-before-forward all -- * * 0.0.0.0/0 0.0.0.0/0
3 0 0 ufw-after-forward all -- * * 0.0.0.0/0 0.0.0.0/0
4 0 0 ufw-after-logging-forward all -- * * 0.0.0.0/0 0.0.0.0/0
5 0 0 ufw-reject-forward all -- * * 0.0.0.0/0 0.0.0.0/0
6 0 0 ufw-track-forward all -- * * 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 2 packets, 80 bytes)
num pkts bytes target prot opt in out source destination
1 24346 11M ufw-before-logging-output all -- * * 0.0.0.0/0 0.0.0.0/0
2 24346 11M ufw-before-output all -- * * 0.0.0.0/0 0.0.0.0/0
3 721 82037 ufw-after-output all -- * * 0.0.0.0/0 0.0.0.0/0
4 721 82037 ufw-after-logging-output all -- * * 0.0.0.0/0 0.0.0.0/0
5 721 82037 ufw-reject-output all -- * * 0.0.0.0/0 0.0.0.0/0
6 721 82037 ufw-track-output all -- * * 0.0.0.0/0 0.0.0.0/0
Chain ufw-after-forward (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-after-input (1 references)
num pkts bytes target prot opt in out source destination
1 43 3894 ufw-skip-to-policy-input udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:137
2 25 5868 ufw-skip-to-policy-input udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:138
3 0 0 ufw-skip-to-policy-input tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:139
4 0 0 ufw-skip-to-policy-input tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:445
5 0 0 ufw-skip-to-policy-input udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:67
6 0 0 ufw-skip-to-policy-input udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:68
7 108 5112 ufw-skip-to-policy-input all -- * * 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type BROADCAST
Chain ufw-after-logging-forward (1 references)
num pkts bytes target prot opt in out source destination
1 0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "
Chain ufw-after-logging-input (1 references)
num pkts bytes target prot opt in out source destination
1 92 3056 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "
Chain ufw-after-logging-output (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-after-output (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-before-forward (1 references)
num pkts bytes target prot opt in out source destination
1 0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
2 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 3
3 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 4
4 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 11
5 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 12
6 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 8
7 0 0 ufw-user-forward all -- * * 0.0.0.0/0 0.0.0.0/0
Chain ufw-before-input (1 references)
num pkts bytes target prot opt in out source destination
1 17215 9965K ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
2 6855 2658K ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
3 0 0 ufw-logging-deny all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate INVALID
4 0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate INVALID
5 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 3
6 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 4
7 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 11
8 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 12
9 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 8
10 0 0 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp spt:67 dpt:68
11 341 24125 ufw-not-local all -- * * 0.0.0.0/0 0.0.0.0/0
12 57 5675 ACCEPT udp -- * * 0.0.0.0/0 224.0.0.251 udp dpt:5353
13 0 0 ACCEPT udp -- * * 0.0.0.0/0 239.255.255.250 udp dpt:1900
14 284 18450 ufw-user-input all -- * * 0.0.0.0/0 0.0.0.0/0
Chain ufw-before-logging-forward (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-before-logging-input (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-before-logging-output (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-before-output (1 references)
num pkts bytes target prot opt in out source destination
1 17215 9965K ACCEPT all -- * lo 0.0.0.0/0 0.0.0.0/0
2 6410 542K ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
3 721 82037 ufw-user-output all -- * * 0.0.0.0/0 0.0.0.0/0
Chain ufw-logging-allow (0 references)
num pkts bytes target prot opt in out source destination
1 0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW ALLOW] "
Chain ufw-logging-deny (2 references)
num pkts bytes target prot opt in out source destination
1 0 0 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate INVALID limit: avg 3/min burst 10
2 0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "
Chain ufw-not-local (1 references)
num pkts bytes target prot opt in out source destination
1 0 0 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type LOCAL
2 165 9251 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type MULTICAST
3 176 14874 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type BROADCAST
4 0 0 ufw-logging-deny all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min burst 10
5 0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0
Chain ufw-reject-forward (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-reject-input (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-reject-output (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-skip-to-policy-forward (0 references)
num pkts bytes target prot opt in out source destination
1 0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0
Chain ufw-skip-to-policy-input (7 references)
num pkts bytes target prot opt in out source destination
1 176 14874 DROP all -- * * 0.0.0.0/0 0.0.0.0/0
Chain ufw-skip-to-policy-output (0 references)
num pkts bytes target prot opt in out source destination
1 0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain ufw-track-forward (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-track-input (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-track-output (1 references)
num pkts bytes target prot opt in out source destination
1 145 8700 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 ctstate NEW
2 574 73257 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 ctstate NEW
Chain ufw-user-forward (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-user-input (1 references)
num pkts bytes target prot opt in out source destination
1 0 0 DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8080
2 0 0 DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
3 0 0 DROP udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:80
Chain ufw-user-limit (0 references)
num pkts bytes target prot opt in out source destination
1 0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min burst 5 LOG flags 0 level 4 prefix "[UFW LIMIT BLOCK] "
2 0 0 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
Chain ufw-user-limit-accept (0 references)
num pkts bytes target prot opt in out source destination
1 0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain ufw-user-logging-forward (0 references)
num pkts bytes target prot opt in out source destination
Chain ufw-user-logging-input (0 references)
num pkts bytes target prot opt in out source destination
Chain ufw-user-logging-output (0 references)
num pkts bytes target prot opt in out source destination
Chain ufw-user-output (1 references)
num pkts bytes target prot opt in out source destination ping -c 4 ubuntu #ping从android到ubuntu
ping -c 4 10.0.0.13
PING 10.0.0.13 (10.0.0.13) 56(84) bytes of data.
From 10.0.0.9: icmp_seq=1 Destination Host Unreachable
From 10.0.0.9: icmp_seq=2 Destination Host Unreachable
From 10.0.0.9: icmp_seq=3 Destination Host Unreachable
From 10.0.0.9: icmp_seq=4 Destination Host Unreachable
--- 10.0.0.13 ping statistics ---
4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 3006ms
pipe 3编辑2:
我的默认网关(路由器)是10.0.0.1,所以ping给它提供了来自ubuntu膝上型计算机的100%的数据包丢失,与android相同
发布于 2016-04-26 17:05:50
显示来自Ubuntu和Android的ifconfig输出。
ifconfig #both devices
netstat -anp|grep :80 #Ubuntu
iptables -L -v -n --line-numbers #Ubuntu
ping -c 4 ubuntu #ping from android to ubuntu发布于 2016-04-27 15:09:31
我的“无线隔离”在上。把它从路由器上关掉。现在起作用了。
https://stackoverflow.com/questions/36868802
复制相似问题