does using ifconfig-push garanteed that no other client will take this ip ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • emoxam
    Junior Member
    • May 2024
    • 3

    does using ifconfig-push garanteed that no other client will take this ip ?

    Does using ifconfig-push garanteed that no other client will take this ip ?
  • Pippin
    Administrator
    • Dec 2023
    • 18

    #2
    Hi,

    It depends on the setup.
    Please post your server configuration.

    You would want to start read about
    Code:
    --topology mode
    --server args
    --ifconfig-pool args
    --ifconfig-push args
    in manual 2.6

    Comment

    • emoxam
      Junior Member
      • May 2024
      • 3

      #3
      Code:
      topology subnet
      push "topology subnet"
      ifconfig 192.168.200.1 255.255.255.0
      server 192.168.200.0 255.255.255.0 nopool
      ifconfig-pool 192.168.200.2 192.168.200.100
      route-gateway 192.168.200.1
      push "route-gateway 192.168.200.1"
      push "dhcp-option DNS 172.16.10.1"
      push "dhcp-option DNS 172.16.10.2"
      push "route 172.16.10.0 255.255.255.0"
      push "route 172.16.11.0 255.255.255.0"
      ifconfig-pool-persist ipp.txt​
      And i created files at /etc/openvpn/ccd with the different ips (* means each client has it's own ip)
      Code:
      ifconfig-push 192.168.200.* 255.255.255.0
      But i forget about 1 client and he begin to use ip witch used different client! at the same time! That client has permanent ip set! But other occupied it!

      Comment

      • Pippin
        Administrator
        • Dec 2023
        • 18

        #4
        Hi,

        I see you already use the nopool and ifconfig-pool options which makes ifconfig-pool-persist a possible conflicting option.
        Just remove,
        Code:
        ifconfig-pool-persist ipp.txt
        .
        For clarity,
        Code:
        ifconfig-pool 192.168.200.2 192.168.200.100
        means that dynamic clients (clients without ccd file) will be allocated a tunnel IP from 192.168.200.2 till 192.168.200.100
        Fixed clients (clients with ccd file) can be allocated a tunnel IP from 192.168.200.101 till 192.168.200.254 via ifconfig-push.

        Also,
        Code:
        ifconfig 192.168.200.1 255.255.255.0
        route-gateway 192.168.200.1
        push "route-gateway 192.168.200.1"
        push "topology subnet"
        are not necessary because of
        Code:
        server 192.168.200.0 255.255.255.0 nopool
        .
        Please read
        Code:
        --server args
        in manual 2.6 to understand why.
        (dev tun AND topology == subnet)

        Comment

        Working...
        😀
        😂
        🥰
        😘
        🤢
        😎
        😞
        😡
        👍
        👎