Answer the question
In order to leave comments, you need to log in
How to setup static ip address for OpenVPN client by one key?
I broke my head ... more than sure the issue is solved in a couple of lines, I would like to know which ones ...
Task:
There is a server with a deployed OPENVPN, there are, say, 2 clients (located on the other side of the city), it is necessary to view certain client files from the server, clients ping to the ip-address assigned to the WindowsTAP network card, and of course, I see the shared files I need. So, naively, I tried to manually enter the ip address I needed for the openvpn network card, but every time the client PC is rebooted, the network card defaults = \ After reading a mountain of topics on this problem, I realized that there was a problem in the configs. In general, I need to assign the ip addresses I need to client PCs.
Server config
# Поднимаем L3-туннель
dev tun
# Протокол
proto udp
# Порт который слушает впн
port (такой-то)
# Ключи и сертификаты
duplicate-cn
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
# Грубо говоря экономим адреса
topology subnet
# Пул адресов
server 192.168.2.0 255.255.255.0
# Метод шифрования
cipher AES-128-CBC
# Сжатие
comp-lzo
# Немного улучшит пинг
mssfix
# Время жизни клиентов, если не откликнулся — отключает
keepalive 10 120
# Уровень отладки
verb 3
client-to-client
push «dhcp-option DNS 192.168.2.1»
client
dev tun
proto udp
# Адрес и порт сервера
remote (здесь имя подключения и порт)
# Ключи должны лежать в папке с конфигом
ca ca.crt
cert client.crt
key client.key
cipher AES-128-CBC
nobind
comp-lzo
persist-key
persist-tun
verb 3
Answer the question
In order to leave comments, you need to log in
Added a line
after the line to the server config
Then created ipp.txt in the same directory where the openvpn config is located in it the
following
code Or even reboot the server?
Guys, the topic is still relevant ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question