V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  lilogo  ›  全部回复第 7 页 / 共 9 页
回复总数  173
1  2  3  4  5  6  7  8  9  
2020-02-11 19:48:34 +08:00
回复了 lilogo 创建的主题 宽带症候群 请教 iptables 防火墙及路由配置的打通两地局域网的问题
@hawhaw 按照你的步骤 1-4,在执行完第 4 步时依然 ping 不通,步骤如下:

A 节点:
```
root@OpenWrt:~# ip route show
default via 53.3.94.1 dev pppoe-wan proto static
53.3.94.1 dev pppoe-wan proto kernel scope link src 53.3.94.180
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1
172.16.14.0/24 dev tun0 proto kernel scope link src 172.16.14.1
root@OpenWrt:~# ip route add 10.200.30.0/24 via 172.16.14.1
root@OpenWrt:~# cat /proc/sys/net/ipv4/ip_forward
1
root@OpenWrt:~# /etc/init.d/firewall stop
Warning: Section @zone[1] (wan) cannot resolve device of network 'wan6'
* Flushing IPv4 filter table
* Flushing IPv4 nat table
* Flushing IPv4 mangle table
* Flushing IPv4 raw table
* Flushing IPv6 filter table
* Flushing IPv6 nat table
* Flushing IPv6 mangle table
* Flushing conntrack table ...
root@OpenWrt:~#
```




B 节点:
```
root@OpenWrt:~# ip route add 192.168.1.0/24 via 172.16.14.2
root@OpenWrt:~# /etc/init.d/firewall stop
Warning: Unable to locate ipset utility, disabling ipset support
Warning: Section @zone[1] (wan) cannot resolve device of network 'wan'
Warning: Section @zone[1] (wan) cannot resolve device of network 'wan6'
Warning: Section @zone[1] (wan) has no device, network, subnet or extra options
* Flushing IPv4 filter table
* Flushing IPv4 nat table
* Flushing IPv4 mangle table
* Flushing IPv6 filter table
* Flushing IPv6 mangle table
* Flushing conntrack table ...
root@OpenWrt:~# cat /proc/sys/net/ipv4/ip_forward
1
root@OpenWrt:~#
root@OpenWrt:~# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
^C
--- 192.168.1.1 ping statistics ---
15 packets transmitted, 0 packets received, 100% packet loss
root@OpenWrt:~#
```

B 节点 ping A 节点抓包:
```
root@OpenWrt:~# tcpdump -i tun0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on tun0, link-type RAW (Raw IP), capture size 262144 bytes
11:35:14.283993 IP6 fe80::31ad:504:165b:1666.63363 > ff02::c.1900: UDP, length 146
11:35:16.238521 IP 172.16.14.2 > 192.168.1.1: ICMP echo request, id 26670, seq 0, length 64
11:35:16.238591 IP 192.168.1.1 > 172.16.14.2: ICMP net 192.168.1.1 unreachable - unknown, length 92
11:35:17.238794 IP 172.16.14.2 > 192.168.1.1: ICMP echo request, id 26670, seq 1, length 64
11:35:17.238847 IP 192.168.1.1 > 172.16.14.2: ICMP net 192.168.1.1 unreachable - unknown, length 92
11:35:17.285547 IP6 fe80::31ad:504:165b:1666.63363 > ff02::c.1900: UDP, length 146
11:35:18.238836 IP 172.16.14.2 > 192.168.1.1: ICMP echo request, id 26670, seq 2, length 64
11:35:18.238885 IP 192.168.1.1 > 172.16.14.2: ICMP net 192.168.1.1 unreachable - unknown, length 92
11:35:19.238940 IP 172.16.14.2 > 192.168.1.1: ICMP echo request, id 26670, seq 3, length 64
11:35:19.238995 IP 192.168.1.1 > 172.16.14.2: ICMP net 192.168.1.1 unreachable - unknown, length 92
11:35:20.238975 IP 172.16.14.2 > 192.168.1.1: ICMP echo request, id 26670, seq 4, length 64
```
2020-02-11 19:07:23 +08:00
回复了 lilogo 创建的主题 宽带症候群 请教 iptables 防火墙及路由配置的打通两地局域网的问题
@sujin190 打开转发是第一步,肯定开了
2020-02-11 17:30:12 +08:00
回复了 lilogo 创建的主题 宽带症候群 请教 iptables 防火墙及路由配置的打通两地局域网的问题
@izoabr
从 B 上 traceroute A 的情况:
```
root@OpenWrt:~# traceroute 172.16.14.1
traceroute to 172.16.14.1 (172.16.14.1), 30 hops max, 46 byte packets
1 172.16.14.1 (172.16.14.1) 5.077 ms 5.189 ms 4.681 ms
root@OpenWrt:~# traceroute 192.168.1.1
traceroute to 192.168.1.1 (192.168.1.1), 30 hops max, 46 byte packets
1 192.168.1.1 (192.168.1.1) 0.003 ms !U 0.002 ms !U 0.002 ms !U
root@OpenWrt:~#
```

从 A 上 traceroute B 的情况:
```
root@OpenWrt:~# traceroute 172.16.14.2
traceroute to 172.16.14.2 (172.16.14.2), 30 hops max, 38 byte packets
1 172.16.14.2 (172.16.14.2) 6.088 ms 4.304 ms 4.858 ms
root@OpenWrt:~# traceroute 10.200.30.55
traceroute to 10.200.30.55 (10.200.30.55), 30 hops max, 38 byte packets
1 10.200.30.55 (10.200.30.55) 1.315 ms !U 0.031 ms !U 0.030 ms !U
root@OpenWrt:~#
```
2020-02-11 16:10:17 +08:00
回复了 lilogo 创建的主题 宽带症候群 请教 iptables 防火墙及路由配置的打通两地局域网的问题
抱歉上一条有一行错了,参考这个:
A 节点的:
```
root@OpenWrt:~# ip route show
default via 53.3.94.1 dev pppoe-wan proto static
10.200.30.0/24 via 172.16.14.2 dev tun0
53.3.94.1 dev pppoe-wan proto kernel scope link src 53.3.94.180
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1
172.16.14.0/24 dev ztmjffzrix proto kernel scope link src 172.16.14.1
172.16.14.0/24 dev tun0 proto kernel scope link src 172.16.14.1
192.168.133.0/24 dev tun1 proto kernel scope link src 192.168.133.1
root@OpenWrt:~# ip ru sh
0: from all lookup local
1001: from all iif pppoe-wan lookup main
2001: from all fwmark 0x100/0x3f00 lookup 1
2061: from all fwmark 0x3d00/0x3f00 blackhole
2062: from all fwmark 0x3e00/0x3f00 unreachable
32766: from all lookup main
32767: from all lookup default
root@OpenWrt:~#
```

B 节点的:
```
root@OpenWrt:~# ip route show
default via 10.200.30.250 dev br-lan src 10.200.30.1
10.200.30.0/24 dev br-lan scope link src 10.200.30.1
192.168.1.0/24 via 172.16.14.1 dev tun0
172.16.14.0/24 dev tun0 scope link src 172.16.14.2
root@OpenWrt:~# ip ru sh
0: from all lookup local
32766: from all lookup main
32767: from all lookup default
root@OpenWrt:~#
```

@izoabr
2020-02-11 16:05:05 +08:00
回复了 lilogo 创建的主题 宽带症候群 请教 iptables 防火墙及路由配置的打通两地局域网的问题
A 节点的:
```
root@OpenWrt:~# ip route show
default via 53.3.94.1 dev pppoe-wan proto static
10.200.30.0/24 via 172.16.14.122 dev tun0
53.3.94.1 dev pppoe-wan proto kernel scope link src 53.3.94.180
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1
172.16.14.0/24 dev ztmjffzrix proto kernel scope link src 172.16.14.1
172.16.14.0/24 dev tun0 proto kernel scope link src 172.16.14.1
192.168.133.0/24 dev tun1 proto kernel scope link src 192.168.133.1
root@OpenWrt:~# ip ru sh
0: from all lookup local
1001: from all iif pppoe-wan lookup main
2001: from all fwmark 0x100/0x3f00 lookup 1
2061: from all fwmark 0x3d00/0x3f00 blackhole
2062: from all fwmark 0x3e00/0x3f00 unreachable
32766: from all lookup main
32767: from all lookup default
root@OpenWrt:~#
```

B 节点的:
```
root@OpenWrt:~# ip route show
default via 10.200.30.250 dev br-lan src 10.200.30.1
10.200.30.0/24 dev br-lan scope link src 10.200.30.1
192.168.1.0/24 via 172.16.14.1 dev tun0
172.16.14.0/24 dev tun0 scope link src 172.16.14.2
root@OpenWrt:~# ip ru sh
0: from all lookup local
32766: from all lookup main
32767: from all lookup default
root@OpenWrt:~#
```
@izoabr
2020-02-11 15:50:30 +08:00
回复了 lilogo 创建的主题 宽带症候群 请教 iptables 防火墙及路由配置的打通两地局域网的问题
@izoabr
@jasonyang9 在 B 上加上了到 A 的路由依然不行:

```
ip route add 192.168.1.0/24 via 172.16.14.1
```
2020-02-11 15:42:59 +08:00
回复了 lilogo 创建的主题 宽带症候群 请教 iptables 防火墙及路由配置的打通两地局域网的问题
补充下所有主机都是可 ping 的,而且直接在 A、B 节点上 ping 172.16.14.0/24 网段内机器都是可以 ping 通的。
另外 tcpdump 抓虚拟网卡的命令是 tcpdump -i tun0
2020-02-11 15:34:57 +08:00
回复了 lilogo 创建的主题 宽带症候群 请教 iptables 防火墙及路由配置的打通两地局域网的问题
在 A 节点机器 ping B 节点时,在 A 节点上使用 `tcpdump tun0` 抓包如下:

```
15:28:25.364435 IP 172.16.14.1 > 10.200.30.55: ICMP echo request, id 63083, seq 19, length 64
15:28:25.364779 IP 10.200.30.55 > 172.16.14.1: ICMP net 10.200.30.55 unreachable - unknown, length 92
15:28:26.364657 IP 172.16.14.1 > 10.200.30.55: ICMP echo request, id 63083, seq 20, length 64
15:28:26.365404 IP 10.200.30.55 > 172.16.14.1: ICMP net 10.200.30.55 unreachable - unknown, length 92
15:28:27.364882 IP 172.16.14.1 > 10.200.30.55: ICMP echo request, id 63083, seq 21, length 64
15:28:27.365638 IP 10.200.30.55 > 172.16.14.1: ICMP net 10.200.30.55 unreachable - unknown, length 92
15:28:28.365165 IP 172.16.14.1 > 10.200.30.55: ICMP echo request, id 63083, seq 22, length 64
15:28:28.365573 IP 10.200.30.55 > 172.16.14.1: ICMP net 10.200.30.55 unreachable - unknown, length 92
```
2020-02-11 15:18:51 +08:00
回复了 lilogo 创建的主题 宽带症候群 请教 iptables 防火墙及路由配置的打通两地局域网的问题
@jasonyang9 应该不是这个原因,理论上 B 收到的包应该是来自 172.16.14.1 的,而不是 192.168.1.1 的,而 172 网段的是 VPN 网段,本身即可正常通信。
2020-01-20 09:20:10 +08:00
回复了 sagaxu 创建的主题 程序员 私力全面摇号,这是变相推高学区房么?
话说私立如果全部摇号的话,私立学校的生源如何保证?
从私立校角度考虑的话肯定不干啊
2020-01-16 09:23:55 +08:00
回复了 lilogo 创建的主题 Apple 如何提高虚拟机下 macOS 性能
@hackpro ESXi 上安装我觉得比 vmware workstation 简单多了,用 unlocker 解锁下配置,然后找个对应版本的 iso 就 OK 了。
2020-01-16 09:21:45 +08:00
回复了 lilogo 创建的主题 Apple 如何提高虚拟机下 macOS 性能
@gamexg 我用的 6.7,从这里下载的 unlocker https://github.com/o0xmuhe/macOS_on_ESXi
竟然有这种事?于法于理都不符逻辑
@twjacy3 群在哪里
1  2  3  4  5  6  7  8  9  
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2535 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 22ms · UTC 02:53 · PVG 10:53 · LAX 18:53 · JFK 21:53
♥ Do have faith in what you're doing.