Enrutamiento de Windows-7: Red inalámbrica OpenVPN Tap

Enrutamiento de Windows-7: Red inalámbrica  OpenVPN Tap

Mis objetivos en Windows 7:

  • Para que los usuarios conectados de forma inalámbrica se conecten o enruten a la red OpenVPN Tap.
  • Para que cualquier usuario que haya iniciado sesión en la consola o RDC tenga acceso normal (no VPN) a Internet.
  • Al iniciar el sistema, el inicio automático y sin cabeza de todos los componentes.

Puedo configurar manualmente el adaptador OpenVPN Tap para compartir con la red inalámbrica 3 (minipuerto Wifi virtual de MS), pero el recurso compartido no es persistente; después de reiniciar, se requiere otra configuración de uso compartido manual. No existe ningún parche W7 para solucionar este problema.

La red alojada inalámbrica fue creada con:

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

El segundo netsh no es persistente: después del reinicio, la red alojada no se inicia. Puedo arreglar eso en el script que inicia la VPN.

En SuperUser encontré “¿Cómo puedo configurar una PC con Win 7 como enrutador?”.

Según las publicaciones en SuperUser sobre el enrutamiento entre dos NIC, parece que se requieren dos rutas. Todavía estoy confundido sobre cómo construir las dos rutas. También tengo el requisito de que los usuarios de consola y RDC tengan acceso a Internet sin VPN. Y todo esto en una NIC, espero.

Como referencia, aquí hay información sobre las interfaces y rutas:

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

Respuesta1

He decidido tomar una dirección completamente diferente.

¿Pero cómo eliminar esta pregunta publicada? No encuentro ninguna opción.

información relacionada