我按照本指南成功配置了通过互联网连接到我的家庭网络的 VPN 连接。
目前的配置是:
家庭网络(远程)
LAN:
192.168.1.1 => Router/Modem Gateway
192.168.1.20 => OpenVPN server (BananaPI device) on port 1194
192.168.1.40 => Other Device (with WebInterface)
Services:
The ISP has a Dynamic Public IP so in the Router a Dynamic DNS service is configured:
my.domain.com points to the public IP
Port Forwarding:
- External Port 1194 is forwarded to Local 1194 for 192.168.1.20
(I can access the VPN server from internet at the address my.domain.com:1194)
Run Code Online (Sandbox Code Playgroud)
客户端网络(本地)
192.168.1.1 => Router/Modem Gateway
192.168.1.2 => VPN Client (connects to my.domain.com:1194 and gets 10.8.0.6 Ip address)
Run Code Online (Sandbox Code Playgroud)
通过此配置,我可以成功连接到 VPN,我可以访问互联网,并且当我将客户端连接到 VPN 时,从http://whatsmyip.com报告的 IP是Home Newtork 的预期。当(显然)连接到 VPN 时,我还可以通过 Internet192.168.1.40从客户端网络访问Web 界面。
唯一的问题是,如果我192.168.1.1在连接到 VPN 时访问,我会得到客户端网络路由器的配置 Web 界面,而不是家庭网络的.
我应该如何解决这个 IP 冲突?
route print来自(Windows)客户端(客户端网络上的192.168.1.2 )
IPv4 route table
===========================================================================
Active Route:
Network Destination Mask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.3 20
0.0.0.0 128.0.0.0 10.8.0.5 10.8.0.6 20
10.8.0.1 255.255.255.255 10.8.0.5 10.8.0.6 20
10.8.0.4 255.255.255.252 On-link 10.8.0.6 276
10.8.0.6 255.255.255.255 On-link 10.8.0.6 276
10.8.0.7 255.255.255.255 On-link 10.8.0.6 276
82.104.210.184 255.255.255.255 192.168.1.1 192.168.1.3 20
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
128.0.0.0 128.0.0.0 10.8.0.5 10.8.0.6 20
192.168.1.0 255.255.255.0 On-link 192.168.1.3 276
192.168.1.1 255.255.255.255 192.168.1.1 192.168.1.3 20
192.168.1.3 255.255.255.255 On-link 192.168.1.3 276
192.168.1.255 255.255.255.255 On-link 192.168.1.3 276
192.168.56.0 255.255.255.0 On-link 192.168.56.1 276
192.168.56.1 255.255.255.255 On-link 192.168.56.1 276
192.168.56.255 255.255.255.255 On-link 192.168.56.1 276
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.56.1 276
224.0.0.0 240.0.0.0 On-link 192.168.1.3 276
224.0.0.0 240.0.0.0 On-link 10.8.0.6 276
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.56.1 276
255.255.255.255 255.255.255.255 On-link 192.168.1.3 276
255.255.255.255 255.255.255.255 On-link 10.8.0.6 276
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11482 次 |
| 最近记录: |