Ip static for win7 client

Need help configuring your VPN? Just post here and you'll get that help.

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
jimbo
OpenVpn Newbie
Posts: 4
Joined: Tue Sep 06, 2011 7:52 am

Ip static for win7 client

Post by jimbo » Tue Sep 06, 2011 8:33 am

Hello,

We had setup a new openvpn server (rooted mode) on ubuntu LTS server. All client (win 7 and Linux) are connected, all route are push DNS too. We use the last stable version of openvpn.

All works fine but given a static ip address to win7 client does not worked. The client hold on "obtening configuration".

is it possible to "push" "forced" a ip address to win7 client ? works for Linux client.

we have this configuration :

Code: Select all

push "ip-win32 dynamic"

push "redirect-gateway def1"

ifconfig-push 10.8.0.25 10.8.0.24

iroute 192.168.10.0 255.255.255.0
and test with : dynamic, netsh, ipapi

Have you the same issue ? or I need to change somethings on the server/client ?

Code: Select all

# Port protocole et interface
mode server
proto udp
port 1122
#proto tcp
dev tun

# Chemin vers les fichiers ssl
ca serverconf/ca.crt
cert serverconf/ws-vpn.crt
key serverconf/ws-vpn.key
dh serverconf/dh2048.pem
#tls-auth serverconf/tls.key 0
cipher AES-256-CBC


# IP désirée pour le serveur
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
ping-timer-rem
#tun-mtu 6000
fragment 0
mssfix 0
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status /var/log/openvpn/openvpn-status.log 10
status-version 2
# Because we use chroot
client-config-dir ccd
#client-config-dir /etc/openvpn/jail/ccd
ccd-exclusive
chroot /etc/openvpn/jail
log-append /var/log/openvpn/openvpn.log
verb 4
mute 20
management 127.0.0.1 5001

# On définit le serveur VPN comme passerelle par défaut pour les clients
push "redirect-gateway def1"
push "redirect-gateway"
push "ip-win32 dynamic"
push "route 192.168.10.0 255.255.255.0"
route 192.168.10.0 255.255.255.0

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Ip static for win7 client

Post by janjust » Tue Sep 06, 2011 9:59 am

yes this should be possible, but your 'ifconfig-push' is odd , plus you're pushing the default gateway twice. Post the client log when it is connecting, preferably with 'verb 5' set and we should be able to tell what is happening.
ifconfig-push 10.8.0.25 10.8.0.24
is not a valid net30 subnet. Try using

Code: Select all

ifconfig-push 10.8.0.26 10.8.0.25
instead.

jimbo
OpenVpn Newbie
Posts: 4
Joined: Tue Sep 06, 2011 7:52 am

Re: Ip static for win7 client

Post by jimbo » Tue Sep 06, 2011 11:47 am

:D thanks it works !!!

I use the right range net/30

I did not understand that this was hostmax / hostmin ....

Post Reply