在 DD-WRT 路由器后面时无法通过 VPN 访问远程 PC?
随机向您询问有关 IP 的问题。
我有一个奇怪的问题,我可以连接到我公司的 VPN,但无法使用 IP 地址 192.168.1.117 访问我的系统。
我家里有一个 DD-WRT 路由器。我想知道是否有人知道是否由于某种原因在连接 VPN 时无法获取 LAN IP?或者是否有一个配置设置允许 192.xxx IP 路由到我的工作电脑?
Random question about IPs for you.
I have a weird problem where I can connect to my company VPN, but cannot access my system with IP address 192.168.1.117.
I am behind a DD-WRT router at home. I was wondering if anyone knew if for some reason you cannot get LAN IPs while connected to VPN? Or is there a config setting that will allow a 192.x.x.x IP to route to my work PC?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,有多种可能的原因,具体取决于您未指定的多个变量,但简单的解释可能是在连接到您的工作 VPN 时,您的工作路由规则正在应用于流量,这意味着它是通过 VPN 隧道将 192.168.1.117 路由到您的工作单位,而不是您的 LAN。
我家里也有一台 DD-WRT 路由器。适用于我的类似场景如下:
拨入 VPN 时,我的 Web 浏览器加载我的工作 Web 代理设置并想要使用这些设置。我的工作 Web 代理设置希望将定向到 192.168.1.x 的流量路由到我公司的代理服务器,而我真正想要的是将该流量保留在我的家庭 LAN 本地。
解决方案:对于 Firefox,使用 FoxyProxy 附加组件并设置“家庭”和“工作”,其中家庭设置告诉它对于流量 192.168.1.x 将其保留在本地 LAN 上, 使用代理设置。
对于 Chrome,有一个类似的附加组件,称为 Proxy Switchy,它可以做同样的事情。
此外,您可以将 DD-WRT 设置为本地 DNS 名称服务器。这会将本地域名分配给本地网络 ( . ) 上的所有计算机,这意味着无论是否连接到 VPN,完全限定的主机名 yourhost.yourdomain 将正确解析到您的网络,而不是尝试在您的网络上查找该主机名。通过 VPN 的工作网络。这非常有用:请参阅 http://www.dd-wrt.com/wiki /index.php/DNSMasq_as_DHCP_server
Well, there are several possible reasons, depending on multiple variables which you haven't specified, but the simple explanation is likely to be what while connected to your work VPN, you work routing rules are being applied for traffic and this means that it is routing 192.168.1.117 over the VPN tunnel to your work, and not to your LAN.
I also have a DD-WRT router setup at home. A similar scerario which applies to me is the following:
When dialed into the VPN, my web browser loads my work web proxy settings and want to use those. My work web proxy settings want to route traffic directed at 192.168.1.x to my company proxy server, whereas what I actually want is to keep that traffic local to my home LAN.
Solution: for Firefox, use the FoxyProxy add-on and have a setting for "Home" and "Work", where the home setting tells it that for traffic 192.168.1.x to keep it on the local LAN and not use the proxy setup.
For Chrome there is a similar add-on called Proxy Switchy which does the same thing.
In addition, you can setup DD-WRT to act as a local DNS nameserver. This will assign a local domain name to all machines on your local network ( . ) meaning that whether connected to the VPN or not, a fully qualitied hostname yourhost.yourdomain will resolve correctly to your network, and not try to find that hostname on your work network over the VPN. This is very useful: see http://www.dd-wrt.com/wiki/index.php/DNSMasq_as_DHCP_server
再补充一下 liamf 的背景信息,我发现将我的 LAN 放在 192.168.2.x/24 网络上通常可以解决路由问题。有时,VPN 会添加规则以通过隧道路由所有流量,然后您必须手动添加规则以不将隧道用于 192.168.2.x/24 网络。
Too add on to liamf's background information, I've found that putting my LAN on the 192.168.2.x/24 network can usually solve the routing issues. Sometimes the VPN will add rules to route all of your traffic through the tunnel, and then you would have to manually add rules to not use the tunnel for your 192.168.2.x/24 network.