eunrui 最近的时间轴更新
eunrui

eunrui

V2EX 第 467398 号会员,加入于 2020-02-01 13:57:57 +08:00
今日活跃度排名 9866
根据 eunrui 的设置,主题列表被隐藏
二手交易 相关的信息,包括已关闭的交易,不会被隐藏
eunrui 最近回复了
@bmjiamin 不知道为什么,搬家之后,这个问题没遇到过了,自己好了,但是软路由的配置没有改过
不是有一段代码可以开启放大功能
```
# 开启
defaults write com.apple.ScreenContinuity showScalingControls 1
# 关闭
defaults delete com.apple.ScreenContinuity showScalingControls

```
22 天前
回复了 eunrui 创建的主题 程序员 WireGuard 如何直接使用局域网的 IP 访问
结贴,配置追加到正文了
22 天前
回复了 eunrui 创建的主题 程序员 WireGuard 如何直接使用局域网的 IP 访问
@ovoo 感谢,重启了下,莫名其妙就可以了,
22 天前
回复了 eunrui 创建的主题 程序员 WireGuard 如何直接使用局域网的 IP 访问
@ovoo 最新战况,要在 docker 里把内网服务器的 AllowedIPs 里加上 192.168.11.0/24 ,https://github.com/wg-easy/wg-easy/issues/921 这个 issues 里有说,我自己进容器手动加上了,虽然新加设备或重启的时候会被重置。


现在我可以连通内网服务器 192.168.11.222 了,但是没办法访问其他内网设备的资源,比如说 192.168.11.215 上的 9098 的 web 服务,但是又能 ping 通 215 的 ip ,ssh 也连不上,
22 天前
回复了 eunrui 创建的主题 程序员 WireGuard 如何直接使用局域网的 IP 访问
@shiyuu 感谢,转发的 server 和内网服务器都开启了,但是 server 那边的配置貌似 AllowedIPs 没办法改,进入容器看了 wg0.conf 的注释,说不要直接在里面改,会被覆盖。server 的 Peer 都是 wg-easy 自动写入的。我先消化一下。
22 天前
回复了 eunrui 创建的主题 程序员 WireGuard 如何直接使用局域网的 IP 访问
@taygetus 我的和你的除了 DNS 不一样,没加 MTU ,其他的没区别
22 天前
回复了 eunrui 创建的主题 程序员 WireGuard 如何直接使用局域网的 IP 访问
➜ ~ ping 10.0.8.1
PING 10.0.8.1 (10.0.8.1): 56 data bytes
64 bytes from 10.0.8.1: icmp_seq=0 ttl=64 time=149.753 ms
64 bytes from 10.0.8.1: icmp_seq=1 ttl=64 time=192.396 ms
64 bytes from 10.0.8.1: icmp_seq=2 ttl=64 time=236.938 ms
64 bytes from 10.0.8.1: icmp_seq=3 ttl=64 time=260.519 ms
64 bytes from 10.0.8.1: icmp_seq=4 ttl=64 time=24.365 ms
64 bytes from 10.0.8.1: icmp_seq=5 ttl=64 time=24.365 ms
64 bytes from 10.0.8.1: icmp_seq=6 ttl=64 time=24.495 ms
^C
--- 10.0.8.1 ping statistics ---
7 packets transmitted, 7 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 24.365/130.404/260.519/97.249 ms

➜ ~ ping 10.0.8.3
PING 10.0.8.3 (10.0.8.3): 56 data bytes
64 bytes from 10.0.8.3: icmp_seq=0 ttl=63 time=44.425 ms
64 bytes from 10.0.8.3: icmp_seq=1 ttl=63 time=46.835 ms
64 bytes from 10.0.8.3: icmp_seq=2 ttl=63 time=44.923 ms
64 bytes from 10.0.8.3: icmp_seq=3 ttl=63 time=46.621 ms
^C
--- 10.0.8.3 ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 44.425/45.701/46.835/1.045 ms

➜ ~ ping 192.168.11.222
PING 192.168.11.222 (192.168.11.222): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
^C
--- 192.168.11.222 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss

➜ ~ ping 192.168.11.215
PING 192.168.11.215 (192.168.11.215): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
^C
--- 192.168.11.215 ping statistics ---
4 packets transmitted, 0 packets received, 100.0% packet loss
22 天前
回复了 eunrui 创建的主题 程序员 WireGuard 如何直接使用局域网的 IP 访问
@ovoo 嗯呢,192.168.11.222 就是我在内网中安装 wireguard 的服务器,因为网络这块儿我不是很懂,chatgpt 问了一些规则,不知道是不是你说的转发那些
```
PreUp = sysctl -w net.ipv4.ip_forward=1

PreUp = iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PreUp = iptables -A FORWARD -i wg0 -o eth0 -s 10.0.8.0/24 -d 192.168.11.0/24 -j ACCEPT
PreUp = iptables -A FORWARD -i eth0 -o wg0 -s 192.168.11.0/24 -d 10.0.8.0/24 -j ACCEPT

PostDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -o eth0 -s 10.0.8.0/24 -d 192.168.11.0/24 -j ACCEPT
PostDown = iptables -D FORWARD -i eth0 -o wg0 -s 192.168.11.0/24 -d 10.0.8.0/24 -j ACCEPT
```
这样配置还是笔记本还是没法 ping 内网,笔记本配置的 AllowIPs=10.0.8.0/24, 192.168.11.0/24 ,
目前还是只有 10.0.8.1 、.2 、.3 这三个能互相 ping 通,上面的规则有什么错误的地方吗,希望指点一下
22 天前
回复了 eunrui 创建的主题 程序员 WireGuard 如何直接使用局域网的 IP 访问
@javazero 现在应该就是这样的,server 和本地都 AllowedIPs = 10.0.8.0/24, 192.168.11.0/24 了,内网服务器 AllowedIPs =10.0.8.0/24
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2346 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 05:19 · PVG 13:19 · LAX 22:19 · JFK 01:19
Developed with CodeLauncher
♥ Do have faith in what you're doing.