Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    IPSec IKEv2 пропадает интернет на клиентской машинe

    Scheduled Pinned Locked Moved Russian
    7 Posts 3 Posters 2.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • X Offline
      Xandir
      last edited by

      Добрый день,

      Настроил IPSec IKEv2 VPN по этой инструкции: https://doc.pfsense.org/index.php/IKEv2_with_EAP-MSCHAPv2
      Подключаюсь с ОС Windows 7.
      При подключении пропадает интернет на клиентской машине.

      В настройках VPN > IPsec > Mobile Clients > Edit Phase 2
      Local Network: LAN subnet

      Я не хочу чтобы интернет трафик шёл через VPN. Хочу чтобы через VPN была доступна только локальная сеть организации. Это можно реализовать?

      1 Reply Last reply Reply Quote 0
      • P Offline
        pigbrother
        last edited by

        В Windows 7 нет такой настройки?

        Если вдруг нет - попробуйте через powershell:
        Set-VpnConnection -Name "myVPN" -SplitTunneling $True
        https://superuser.com/questions/954801/how-can-i-disable-use-default-gateway-for-remote-networks-setting-in-windows-1
        или
        go to here: %appdata%\Microsoft\Network\Connections\Pbk\rasphone.pbk open with text editor and for every Vpn connection listed change IpPrioritizeRemote=1 – change this to 0 to disable

        1 Reply Last reply Reply Quote 0
        • X Offline
          Xandir
          last edited by

          Да, есть такая настройка, но если её отключить то удалённая подсеть, в которую я подключаюсь, становится недоступной. Наверное потому что в таблице маршрутизации клиентского ПК ничего неизвестно про эту подсеть.

          Если маршрут добавить вручную, то всё начинает работать:
          route ADD 10.1.1.0 MASK 255.255.255.0 192.168.32.255

          В Windows 7 есть PowerShell но эти команды в нём не срабатывают:
          Set-VpnConnection -Name "myVPN" -SplitTunneling $True

          Может быть кто-то знает, как заставить VPN на Windows 7 машине работать без костылей?

          1 Reply Last reply Reply Quote 0
          • P Offline
            pigbrother
            last edited by

            В Windows 7 есть PowerShell но эти команды в нём не срабатывают:
            Set-VpnConnection -Name "myVPN" -SplitTunneling $True

            "myVPN" - на имя своего соединения меняли?

            Может быть кто-то знает, как заставить VPN на Windows 7 машине работать без костылей?
            Я отказался от использования встроенных VPN. Что ни ОС\конкретный компьютер - потенциальные проблемы.

            1 Reply Last reply Reply Quote 0
            • X Offline
              Xandir
              last edited by

              @pigbrother:

              В Windows 7 есть PowerShell но эти команды в нём не срабатывают:
              Set-VpnConnection -Name "myVPN" -SplitTunneling $True

              "myVPN" - на имя своего соединения меняли?

              Может быть кто-то знает, как заставить VPN на Windows 7 машине работать без костылей?
              Я отказался от использования встроенных VPN. Что ни ОС\конкретный компьютер - потенциальные проблемы.

              Да, конечно менял. PowerShell ругается на команду Set-VpnConnection говорит что не знает такую.

              1 Reply Last reply Reply Quote 0
              • werterW Offline
                werter
                last edited by

                Доброе.
                https://forum.pfsense.org/index.php?topic=127457.0

                •  Open a PowerShell window, as administrator.
                •  (type ‘powershell’ in the task bar search box. When it finds it, right-click on it and select “Run as Administrator).

                •  Enter the below command (or edit it somewhere then just copy/paste it), with the following changes:
                •  Replace “VPN_NAME” with whatever you want to call this VPN connection on the client’s computer.
                •  Replace “firewall.domain.com” with the address of your VPN server. (LAN IP of your PFSense box, or DNS name of it).

                Add-VpnConnection -Name "VPN_NAME" -ServerAddress "firewall.domain.com" –TunnelType IKEv2 -EncryptionLevel Required -AuthenticationMethod EAP -SplitTunneling –AllUserConnection

                Keep PowerShell open for the next step.

                1. Add VPN Routes

                Copy/paste the following into PowerShell, replacing 10.5.0.0/16 with the appropriate remote LAN subnet:

                Add-VpnConnectionRoute -ConnectionName "VPN_NAME" -DestinationPrefix 10.5.0.0/16 -PassThru

                That will tell Windows to send anything meant for 10.5.* over the VPN.

                Т.е. с пом. gui win создавать vpn не надо. Удаляйте созданное ранее и проделайте выше описанное с пом. powershell.

                1 Reply Last reply Reply Quote 0
                • X Offline
                  Xandir
                  last edited by

                  @werter:

                  Доброе.
                  https://forum.pfsense.org/index.php?topic=127457.0

                  •  Open a PowerShell window, as administrator.
                  •  (type ‘powershell’ in the task bar search box. When it finds it, right-click on it and select “Run as Administrator).

                  •  Enter the below command (or edit it somewhere then just copy/paste it), with the following changes:
                  •  Replace “VPN_NAME” with whatever you want to call this VPN connection on the client’s computer.
                  •  Replace “firewall.domain.com” with the address of your VPN server. (LAN IP of your PFSense box, or DNS name of it).

                  Add-VpnConnection -Name "VPN_NAME" -ServerAddress "firewall.domain.com" –TunnelType IKEv2 -EncryptionLevel Required -AuthenticationMethod EAP -SplitTunneling –AllUserConnection

                  Keep PowerShell open for the next step.

                  1. Add VPN Routes

                  Copy/paste the following into PowerShell, replacing 10.5.0.0/16 with the appropriate remote LAN subnet:

                  Add-VpnConnectionRoute -ConnectionName "VPN_NAME" -DestinationPrefix 10.5.0.0/16 -PassThru

                  That will tell Windows to send anything meant for 10.5.* over the VPN.

                  Т.е. с пом. gui win создавать vpn не надо. Удаляйте созданное ранее и проделайте выше описанное с пом. powershell.

                  В Windows 7 вышеуказанные PowerShell команды не срабатывают к сожалению. Нужен другой способ.

                  В настройках VPN подключения есть такая опция: "Отключить добавление маршрута, основанное на классе", эта опция выключена.

                  На сколько я понимаю, это должно работать так: при установке VPN соединения, роутер должен передать список доступных подсетей клиенту и они автоматически добавятся в маршруты. Но этого не происходит.

                  На роутере установлены следующие настройки:
                  Раздел: VPN / IPsec / Mobile Clients
                  Provide a virtual IP address to clients (вкл)
                  Provide a list of accessible networks to clients (вкл)

                  VPN / IPsec / Mobile Clients / Phase 1
                  Split connections (выключено)

                  VPN / IPsec / Mobile Clients / Phase 2
                  Mode: Tunnel IPv4
                  Local Network: LAN subnet
                  NAT/BINAT translation: none

                  На клиентской стороне такие настройки: (прикрепленное изображение)

                  –-

                  Если изменить настройку на роутере: VPN / IPsec / Mobile Clients / Phase 1 > Split connections (вкл), клиент перестаёт подключаться к VPN, выдаёт ошибку 809.

                  888.png
                  888.png_thumb

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.