当连接到我的networkingVPN服务器时,我在访问我的Apache2 Intranet站点时遇到了一些问题。
我的设置/环境:
Apache2服务器上的Intranet站点被configuration为只有LAN地址可以访问(如下所示):
Order deny,allow Deny from all Allow from localhost # IPv4 Allow from 127.0.0.0/8 # IPv4 Loopback Addresses Allow from 169.254.0.0/16 # IPv4 Link-local Addresses Allow from 10.0.0.0/8 # IPv4 Normal LAN Address Space
我的华硕RT-660U路由器configuration了一个内置的PPTP VPN服务器,我用Windows 7内置的VPN客户端连接到它。
关于局域网的VPN连接工作正常; 我可以访问networking共享,SSH到Linux / Apache2服务器,并访问路由器的网页界面在10.0.0.1。 到现在为止还挺好。
但是,我无法访问Apache2服务器上的Intranet虚拟站点。 当连接到局域网时,我可以访问它,并从外部获得403 Forbidden消息。 所以基本上它应该如此。
但是,当我连接到VPN,并尝试打开内部网站,我仍然得到403 Forbidden消息。 如上所述,这是访问其他LAN资源时没有问题的。
当我连接到VPN时,从我的移动networking,这是Windows ipconfig信息:
PPP adapter AEV25 VPN: Connection-specific DNS Suffix . : IPv4 Address. . . . . . . . . . . : 10.0.0.200 Subnet Mask . . . . . . . . . . . : 255.255.255.255 Default Gateway . . . . . . . . . : 0.0.0.0 Wireless LAN adapter Wireless Network Connection: Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::ccb5:407b:3314:5a66%12 IPv4 Address. . . . . . . . . . . : 192.168.1.206 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1
Windows 7 PC连接到我的Android手机networking(热点),然后连接到VPN。
从我对networking的基本理解来看,Apache2似乎使用通过手机连接到“外部”的无线局域网的地址,而不是PPTP适配器地址,即局域网地址。
那么,我怎样才能让Apache2识别“正确的”适配器/地址,以便我可以通过VPN连接访问内部站点呢?
什么是你的/var/log/apache2/error.log和/var/log/apache2/access.log的输出? 这应该提供一些线索,为什么它被拒绝,特别是客户端IP。
如果您使用错误的路线到服务器,请确保您给客户正确的路线。 当他们尝试访问Intranetnetworking时,您应该通过VPN网关发送它们。