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

    PfSense 2.1 + OpenVPN = нет связи с LAN

    Scheduled Pinned Locked Moved Russian
    8 Posts 3 Posters 5.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.
    • S
      shtamm
      last edited by

      Hi, All!

      Есть вопросец по настройке сабжа:
      дефолтно настроенный pfSense, openvpn настроен по таториалу http://www.youtube.com/watch?v=VdAHVSTl1ys.
      соединение происходит, а доступа к локальным ресурсам не имею.
      что я делаю не так?
      помогите, пожалуйста!

      Bye, All!

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

        На сервере для указания маршрута в сеть клиента  - добавьте директиву route xxx.xxx.xxx.xxx; Где xxx.xxx.xxx.xxx - адрес сети за клиентом.

        Для доступа из сети клиента в сеть за сервером - директива push "route yyy.yyy.yyy.yyy"; Плюс у клиента в конфиге должна быть директива pull для принятия настроек от сервера

        Для доступа в сеть клиента из сети сервера - директива iroute aaa.aaa.aaa.aaa; в дополнительных настройках клиента (Client) на сервере

        Плюс про правила fw не забывать!

        И самое главное - прочитать и понять , как настраивается и работает OpenVPN :

        http://forum.ixbt.com/topic.cgi?id=14:40906
        http://forum.ixbt.com/topic.cgi?id=14:49976

        1 Reply Last reply Reply Quote 0
        • S
          shtamm
          last edited by

          Hi, werter!

          Спасибо, помогло!

          Bye, werter!

          1 Reply Last reply Reply Quote 0
          • S
            Safer
            last edited by

            Присоединюсь, чтоб не плодить темы  ::)
            Похожая ситуация.
            Соединение проходит.
            Но пинги не ходят даж внутри туннеля :(
            Конфиги выглядят следующим образом:
            OpenVPN в режиме Remote Access (SSL/TLS +User Auth)
            Dev Mode: Tun
            Tunnel Network: 192.168.25.0/24
            Local Network: 10.214.0.0/24
            Dynamic IP "Yes"  Allow connected clients to retain their connections if their IP address changes.
            Address Pool "Yes"  Provide a virtual adapter IP address to clients (see Tunnel Network)
            Правила FW:
            WAN:
            ID Proto Source Port Destination Port Gateway Queue Schedule Description
            UDP * * WAN address 1194 (OpenVPN) * none   OpenVPN OpenVPN_con wizard
            UDP * * WAN address 34447 * none   OpenVPN OpenVPN_con wizard
            OpenVPN:
            ID Proto Source Port Destination Port Gateway Queue Schedule Description
                * * * * * * none   OpenVPN OpenVPN_con wizard
            После подключения таблица маршрутизации на винде выглядит следующим образом:
            IPv4 таблица маршрута

            Активные маршруты:
            Сетевой адрес          Маска сети      Адрес шлюза      Интерфейс  Метрика
                      0.0.0.0          0.0.0.0      192.168.1.1      192.168.1.6    20
                  10.214.0.0    255.255.255.0    192.168.25.5    192.168.25.6    30
                    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.1.0    255.255.255.0        On-link      192.168.1.6    276
                  192.168.1.6  255.255.255.255        On-link      192.168.1.6    276
                192.168.1.255  255.255.255.255        On-link      192.168.1.6    276
                192.168.25.0    255.255.255.0    192.168.25.5    192.168.25.6    30
                192.168.25.1  255.255.255.255    192.168.25.5    192.168.25.6    30
                192.168.25.4  255.255.255.252        On-link      192.168.25.6    286
                192.168.25.6  255.255.255.255        On-link      192.168.25.6    286
                192.168.25.7  255.255.255.255        On-link      192.168.25.6    286
                    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.1.6    276
                    224.0.0.0        240.0.0.0        On-link      192.168.25.6    286
              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.1.6    276
              255.255.255.255  255.255.255.255        On-link      192.168.25.6    286

            Но увы, не пинугются ни сети за туннелем, ни шлюз самого туннеля. Чего еще я забыл?

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

              2 Safer

              0. Рисуйте схему сети (с адресами)
              1. Скрины fw в студию
              2. Выкладывайте конфиги сервера и клиента.

              P.s.

              OpenVPN:
              ID  Proto  Source  Port      Destination  Port            Gateway      Queue      Schedule  Description 
                    *          *    *          *      *            *          none        OpenVPN OpenVPN_con wizard

              Уберите явное указание Gateway.

              Плюс не вижу правила fw на LAN.

              1 Reply Last reply Reply Quote 0
              • S
                Safer
                last edited by

                @werter:

                2 Safer

                0. Рисуйте схему сети (с адресами)
                1. Скрины fw в студию
                2. Выкладывайте конфиги сервера и клиента.

                P.s.

                OpenVPN:
                ID  Proto  Source  Port      Destination  Port            Gateway      Queue      Schedule  Description 
                      *          *    *          *      *            *          none        OpenVPN OpenVPN_con wizard

                Уберите явное указание Gateway.

                Плюс не вижу правила fw на LAN.

                Схема сети
                <<10.214.0.0/24 - office>>–<10.214.0.25-Lan (PF, OpenVPN) Wan-78.24..>--<<<tunnel 30="" 192.168.25.0="">>>--<win7 24="" lanint="" 192.168.1.0="">>

                Server Mode: Remote Access (SSL/TLS)
                Protocol: UDP
                Device Mode: tun
                Interface: WAN
                Enable authentication of TLS packets
                Tunnel Network: 192.168.25.0/24
                Local Network: 10.214.0.0/24
                Compress tunnel packets using the LZO algorithm
                Allow connected clients to retain their connections if their IP address changes
                Provide a virtual adapter IP address to clients 
                Advanced config: clear
                

                Client conf```

                dev tun
                persist-tun
                persist-key
                cipher AES-128-CBC
                tls-client
                client
                resolv-retry infinite
                remote 78.24.. 34447 udp
                tls-remote VPNUser
                auth-user-pass
                pkcs12 intergate-udp-34447-VPNUser.p12
                tls-auth intergate-udp-34447-VPNUser-tls.key 1
                comp-lzo

                FW Screen
                
                ![ScreenShot001.png](/public/_imported_attachments_/1/ScreenShot001.png)
                ![ScreenShot001.png_thumb](/public/_imported_attachments_/1/ScreenShot001.png_thumb)
                ![ScreenShot002.png](/public/_imported_attachments_/1/ScreenShot002.png)
                ![ScreenShot002.png_thumb](/public/_imported_attachments_/1/ScreenShot002.png_thumb)
                ![ScreenShot003.png](/public/_imported_attachments_/1/ScreenShot003.png)
                ![ScreenShot003.png_thumb](/public/_imported_attachments_/1/ScreenShot003.png_thumb)</win7></tunnel>
                1 Reply Last reply Reply Quote 0
                • S
                  Safer
                  last edited by

                  OpenVPN:
                  ID  Proto  Source  Port      Destination  Port            Gateway      Queue      Schedule  Description 
                        *          *    *          *      *            *          none        OpenVPN OpenVPN_con wizard

                  Уберите явное указание Gateway.

                  Плюс не вижу правила fw на LAN.

                  Не очень понятно, что имеется в виду?

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

                    На сервере в OpenVPN: Server:Advanced configuration- route 192.168.1.0 255.255.255.0;
                    На сервере в OpenVPN: Client: Advanced configuration - iroute 192.168.1.0 255.255.255.0;

                    Плюс что у вас за второе правило в fw на LAN?

                    P.s. Мой рабочий пример конфига для Win 7 в кач-ве клиента. Пляшите от него (обратите внимание на выделенные жирным директивы!) :

                    dev tun
                    keepalive 5 10
                    ping-timer-rem
                    persist-tun
                    persist-key
                    proto udp
                    cipher BF-CBC
                    tls-client
                    client
                    script-security 2
                    resolv-retry infinite
                    remote xxx.xxx.xxx.xxx 1195
                    tls-remote Road Warrior Server CA
                    pkcs12 pfsense2-udp-1195.p12
                    tls-auth pfsense2-udp-1195-tls.key 1
                    comp-lzo
                    comp-noadapt
                    route-delay 5
                    route-method exe
                    ip-win32 netsh
                    pull
                    verb 3

                    P.p.s. OpenVPN устанавливать и запускать на Vista/Win 7/Win 8 от имени Администратора. Это важно. Если не сделали этого - переустановите опенвпн.

                    И еще.  Если у вас за вин7-клиентом есть сеть и вы хотите , чтобы она была доступна сети за сервером - включите маршрутизацию между интерфейсами - http://how-it.ru/public/root/100-vklyuchaem_marshrutizatsiyu_v_windows_xp_vista_7.html

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