How to check openvpn ccd static ip file for your clients

Chuan Chudabut
1 min readOct 17, 2024

--

Follow this instruction https://www.itsfullofstars.de/2018/09/openvpn-assign-static-ip-to-client/

You need to know which file name you need to create in/etc/openvpn/ccd directory for client static ip setting.

You can check by enable open vpn debug log in file /etc/openvpn/server.conf with options

verb 7
log /var/log/openvpn/openvpn.log

Then restart openvpn

sudo systemctl restart openvpn@server

after that grep the log by command

cat /var/log/openvpn/openvpn/log | grep ccd

you will find

2024–10–17 11:20:51 us=241248 client_config_dir = ‘ccd’
2024–10–17 11:20:51 us=241252 ccd_exclusive = DISABLED
2024–10–17 11:20:54 us=380346 vpn1/171.97.104.21:20988 TEST FILE ‘ccd/vpn1’ [0]
2024–10–17 11:20:54 us=380352 vpn1/171.97.104.21:20988 TEST FILE ‘ccd/DEFAULT’ [0]
2024–10–17 11:22:51 us=758591 EZ/139.59.39.24:44155 TEST FILE ‘ccd/EZ’ [0]
2024–10–17 11:22:51 us=758602 EZ/139.59.39.24:44155 TEST FILE ‘ccd/DEFAULT’ [0]

Check your wan ip address you will find the name of file
For me this is my find name

2024–10–17 11:20:54 us=380346 vpn1/171.97.104.21:20988 TEST FILE ‘ccd/vpn1’ [0]

my file name is vpn1
If you found you file, you can add static ip to file like this

ifconfig-push 10.8.0.100 255.255.255.0

restart openvpn server again and restart you openvn client.

Hope this help…

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response