Windows-7 路由:无线网络 OpenVPN Tap

Windows-7 路由:无线网络  OpenVPN Tap

我对 Windows 7 的目标:

  • 对于无线连接的用户,可以桥接或路由到 OpenVPN Tap 网络。
  • 对于任何控制台或 RDC 登录的用户都可以正常(非 VPN)访问互联网。
  • 系统启动时所有组件均无头并自动启动。

我可以手动设置 OpenVPN Tap 适配器以与无线网络 3(MS Virtual Wifi Miniport)共享,但共享不是持久的 - 重启后需要再次手动共享设置。没有 W7 补丁可以解决这个问题。

无线托管网络的创建采用了以下技术:

netsh wlan set hostednetwork mode=allow "ssid=MySSID" "key=MyKey" keyUsage=persistent 
netsh wlan start hostednetwork 

第二个 netsh 不是持久性的——重启后托管网络未启动。我可以在启动 VPN 的脚本中修复该问题。

在 SuperUser 上我发现“如何将 Win7 PC 设置为路由器?”。

从 SuperUser 上关于两个 NIC 之间的路由的帖子来看,似乎需要两条路由。我仍然不清楚如何构建这两条路由。我还要求控制台和 RDC 用户具有非 VPN 互联网访问权限。我希望所有这些都在一个 NIC 上完成。

以下是有关接口和路由的信息,供参考:

Hosted network settings 
----------------------- 
    Mode                   : Allowed
    SSID name              : "MySSID"
    Max number of clients  : 10
    Authentication         : WPA2-Personal
    Cipher                 : CCMP

Hosted network status   
--------------------- 
    Status                 : Started
    BSSID                  : 98:48:27:66:28:d5
    Radio type             : 802.11n
    Channel                : 10
    Number of clients      : 0

Configuration for interface "Wireless Network Connection 3"     MS Virtual Wifi Miniport
    DHCP enabled:                         No
    InterfaceMetric:                      10
    Statically Configured DNS Servers:    103.86.96.100
                                          103.86.99.100
    Register with which suffix:           Primary only
    Statically Configured WINS Servers:   None

Configuration for interface "Wireless Network Connection 2"     TP-Link Wireless USB
    DHCP enabled:                         Yes
    InterfaceMetric:                      5
    DNS servers configured through DHCP:  None
    Register with which suffix:           Primary only
    WINS servers configured through DHCP: None

Configuration for interface "OpenVPN TAP-Windows6"
    DHCP enabled:                         Yes
    InterfaceMetric:                      10
    DNS servers configured through DHCP:  103.86.96.100
                                          103.86.99.100
    Register with which suffix:           Primary only
    WINS servers configured through DHCP: None

Configuration for interface "OpenVPN Wintun"
    DHCP enabled:                         No
    InterfaceMetric:                      5
    Statically Configured DNS Servers:    None
    Register with which suffix:           Primary only
    Statically Configured WINS Servers:   None

Configuration for interface "Local Area Connection"
    DHCP enabled:                         Yes
    IP Address:                           192.168.0.112
    Subnet Prefix:                        192.168.0.0/24 (mask 255.255.255.0)
    Default Gateway:                      192.168.0.1
    Gateway Metric:                       20
    InterfaceMetric:                      20
    DNS servers configured through DHCP:  192.168.0.1
    Register with which suffix:           Primary only
    WINS servers configured through DHCP: None

Configuration for interface "Local Area Connection 2"     Not Used
    DHCP enabled:                         Yes
    InterfaceMetric:                      5
    Register with which suffix:           Primary only
    WINS servers configured through DHCP: None

Configuration for interface "Loopback Pseudo-Interface 1"
    DHCP enabled:                         No
    IP Address:                           127.0.0.1
    Subnet Prefix:                        127.0.0.0/8 (mask 255.0.0.0)
    InterfaceMetric:                      50
    Statically Configured DNS Servers:    None
    Register with which suffix:           Primary only
    Statically Configured WINS Servers:   None

===========================================================================
Interface List
 23...34 e8 94 f8 85 94 ......TP-Link Gigabit PCI Express Adapter
 18...98 48 27 66 28 d5 ......Microsoft Virtual WiFi Miniport Adapter
 16...98 48 27 66 28 d5 ......TP-Link Wireless USB Adapter
 15...00 ff c6 01 bf 5f ......TAP-Windows Adapter V9
 14...........................Wintun Userspace Tunnel
 11...44 8a 5b 25 f8 05 ......Realtek PCIe GbE Family Controller
  1...........................Software Loopback Interface 1
 13...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
 21...00 00 00 00 00 00 00 e0 Microsoft 6to4 Adapter
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      192.168.0.1    192.168.0.112     40
        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
      192.168.0.0    255.255.255.0         On-link     192.168.0.112    276
    192.168.0.112  255.255.255.255         On-link     192.168.0.112    276
    192.168.0.255  255.255.255.255         On-link     192.168.0.112    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.0.112    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.0.112    276
===========================================================================
Persistent Routes:
  None

IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination      Gateway
  1    306 ::1/128                  On-link
 11    266 fe80::/64                On-link
 11    266 fe80::d055:7ea9:674e:5cc7/128
                                    On-link
  1    306 ff00::/8                 On-link
 11    266 ff00::/8                 On-link
===========================================================================
Persistent Routes:
  None

答案1

我决定走一条完全不同的道路。

但是如何删除这个发布的问题?我找不到任何选项。

相关内容