ipp.txt has different ip from client assigns itself. Cant ping

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
bonnyk
OpenVpn Newbie
Posts: 1
Joined: Tue Jan 09, 2018 9:17 pm

ipp.txt has different ip from client assigns itself. Cant ping

Post by bonnyk » Tue Jan 09, 2018 9:33 pm

I am trying to build OpenVPN in a small office network in windows environment. The very first day i was able to ping the server successfully also access the share folder and remote desktop from outside n/w (of course). That time i used OpenVPN GUI to start and stop the service.

Since It is not practical in a real server usage, because of the restarts/updates that always happens with Windows. So i setup the service to Automatic and restarted the server to make sure it run automatically during server restarts.After that moment it stops behaving as we expect.I could see the logs are good and client has been connecting successfully. But one thing i noticed was ip-pool has ip different to what client assigned itself.

For example, my ipp.txt has ip 10.8.0.4 & 10.8.0.8
For the same client ip's are 10.8.0.6 & 10.8.0.10

I think this could be the reason i am not able to ping the server. Even i tried setting static ip. That didnt help me either.

server.config
----------------
port 1194
proto udp
dev tun
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\ovpn-SERVER.crt"
key "C:\\Program Files\\OpenVPN\\config\\ovpn-SERVER.key" # This file should be kept secret
dh "C:\\Program Files\\OpenVPN\\config\\dh4096.pem"
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
cipher AES-256-CBC
persist-key
persist-tun
status "C:\\Program Files\\OpenVPN\\log\\openvpn-status.log"
log "C:\\Program Files\\OpenVPN\\log\\openvpn.log"
log-append "C:\\Program Files\\OpenVPN\\log\\openvpn.log"
verb 3
explicit-exit-notify 1

client.config
---------------

client
dev tun
proto udp
remote xx.xx.xxx.x 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\ovpn-BONNYK.crt"
key "C:\\Program Files\\OpenVPN\\config\\ovpn-BONNYK.key"
cipher AES-256-CBC
status "C:\\Program Files\\OpenVPN\\log\\openvpn-status.log"
log "C:\\Program Files\\OpenVPN\\log\\openvpn.log"
log-append "C:\\Program Files\\OpenVPN\\log\\openvpn.log"
verb 3


i am totally lost here. i made fresh installations few times.
Could you guys help me please?

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: ipp.txt has different ip from client assigns itself. Cant ping

Post by TinCanTech » Tue Jan 09, 2018 9:51 pm

bonnyk wrote:
Tue Jan 09, 2018 9:33 pm
For example, my ipp.txt has ip 10.8.0.4 & 10.8.0.8
For the same client ip's are 10.8.0.6 & 10.8.0.10
--ifconfig-pool-persist
  • Note that the entries in this file are treated by OpenVPN as suggestions only, based on past associations between a common name and IP address. They do not guarantee that the given common name will always receive the given IP address. If you want guaranteed assignment, use --ifconfig-push
See --ifconfig-pool-persist & --ifconfig-push in The Manual v24x

Also, you may be confused by --topology net30 which assigns one /30 subnet per client.

See --topology in The Manual v24x

glorsh66
OpenVpn Newbie
Posts: 18
Joined: Tue Mar 10, 2020 11:17 am

Re: ipp.txt has different ip from client assigns itself. Cant ping

Post by glorsh66 » Sat Mar 26, 2022 8:34 am

What is the best way to set a static IP?

Post Reply