Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    OpenVPN и статическая ip-адресация

    Scheduled Pinned Locked Moved Russian
    8 Posts 2 Posters 3.3k 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.
    • D
      dirar
      last edited by

      Возникла необходимость назначать статические ip-адреса клиентам. Здесь на форуме нашел ветку, где идет обсуждение https://forum.pfsense.org/index.php?topic=106612.msg593940#msg593940
      Но я там до конца не понял, как это настроить. Если нетрудно, подскажите по-шагово  как настроить.

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

        Что конкретно непонятно?
        В последнем посте вроде все разжевано.

        1 Reply Last reply
        Reply Quote 0
        • D
          dirar
          last edited by

          pigbrother,
          все получилось. Спасибо. По этой статье https://fastinetserver.wordpress.com/2013/03/09/pfsense-openvpn-static-ip-for-clients/ сделал.
          Только при соединении происходит задержка.

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

            Мне не очень нравится этот вариант, хотя работать он будет. В нем сервер может выдать заданный адрес произвольному клиенту раньше, чем станет подключаться клиент, котрому вы назначили этот IP.

            Остановился на решении с ifconfig-pool-persist ipp.txt 0.
            В нем можно резервировать пул адресов для списка клиентов, клиенты же не входящие в пул будут получать динамические адреса.

            1 Reply Last reply
            Reply Quote 0
            • D
              dirar
              last edited by

              Эту строчку ifconfig-pool-persist ipp.txt добавляю в Advanced? Я правильно понял?
              А файл ipp.txt где разместить в pfSense?

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

                @dirar:

                Эту строчку ifconfig-pool-persist ipp.txt добавляю в Advanced? Я правильно понял?
                А файл ipp.txt где разместить в pfSense?

                Да, с указанием пути к файлу.
                например
                ifconfig-pool-persist /cf/conf/ips.list 0

                1 Reply Last reply
                Reply Quote 0
                • D
                  dirar
                  last edited by

                  @pigbrother:

                  @dirar:

                  Эту строчку ifconfig-pool-persist ipp.txt добавляю в Advanced? Я правильно понял?
                  А файл ipp.txt где разместить в pfSense?

                  Да, с указанием пути к файлу.
                  например
                  ifconfig-pool-persist /cf/conf/ips.list 0

                  Создал файл ips.list в директории  /cf/conf и добавил туда строчки
                  client1,10.5.0.201
                  client2,10.5.0.202
                  А в  OpenVPN - Server - Advanced добавил
                  ifconfig-pool-persist /cf/conf/ips.list

                  Но к сожалению, пока не работает.

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

                    @dirar:

                    @pigbrother:

                    @dirar:

                    Эту строчку ifconfig-pool-persist ipp.txt добавляю в Advanced? Я правильно понял?
                    А файл ipp.txt где разместить в pfSense?

                    Да, с указанием пути к файлу.
                    например
                    ifconfig-pool-persist /cf/conf/ips.list 0

                    Создал файл ips.list в директории  /cf/conf и добавил туда строчки
                    client1,10.5.0.201
                    client2,10.5.0.202
                    А в  OpenVPN - Server - Advanced добавил
                    ifconfig-pool-persist /cf/conf/ips.list

                    Но к сожалению, пока не работает.

                    Если  сервер работает с типом сети net30 (НЕ стоит галка Topology) то адреса следует раздавать с шагом в 4 адреса, начиная с 6:
                    имя_сертификата,адрес
                    samara1,10.6.63.6
                    samara2,10.6.63.10
                    samara3,10.6.63.14
                    samara4,10.6.63.18
                    samara5,10.6.63.22
                    samara6,10.6.63.26

                    Адреса смените на свои
                    10.5.0.х
                    или перевести сервер в режим subnet (поставить галку Topology)
                    Адреса тогда можно раздавать со 2-го с шагом в единицу, как у вас.

                    А в  OpenVPN - Server - Advanced добавил
                    ifconfig-pool-persist /cf/conf/ips.list

                    Надо
                    ifconfig-pool-persist /cf/conf/ips.list 0;

                    1 Reply Last reply
                    Reply Quote 0

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    • First post
                      Last post
                    Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
                    Privacy Policy · Cookie Policy