My iPhone connectes to OpenVPN server on my Windows 7 desktop and the VPN icon shows on the iPhone when connected. However the iPhone doesn't get the external IP address of the server using whatismyip.com and keeps the Ip address it had before running the iPhone Open VPN client. In addition, the iPhone OpenVPN app has blank entries for "User" and "Client IP".
Very grateful for advice. Thanks.
client file:
dev tun
proto udp
remote 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt # local files
cert iPhone.crt
key iPhone.key
ns-cert-type server
comp-lzo
verb 3
server file:
port 1194
proto udp
dev tun
ca ca.crt # files in local folder
cert server.crt
key server.key
dh dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
iPhone app connection details:
Duration [ correct duration]
Packet received [ 1 second ago ]
Bytes In [ 32.81 KB ]
Bytes out [ 10.14 KB ]
VPN IPv4 10.8.0.6
VPN IPv6 [blank]
User [blank]
Client IP [blank]
Server [ correct server address ]
Server IP [ correct server IP]
Port 1194
Protocol UDPv4
iPhone connects but IP address does not change
-
- OpenVpn Newbie
- Posts: 3
- Joined: Sat Apr 20, 2013 3:15 pm
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: iPhone connects but IP address does not change
this happens because you're not redirecting all traffic via the OpenVPN server; in principle this can be done on the VPN server by adding a line
but you will need to take some additional steps to get it working on your Win7 desktop : what is needed is IP forwarding and some type of Network Address Translation; if you're lucky then you can add a route on your home router to accept (and foward) VPN traffic - if not, then you'll have to set up NATting on Win7, which is doable but not nice.
Code: Select all
push "redirect-gateway def1"
-
- OpenVpn Newbie
- Posts: 3
- Joined: Sat Apr 20, 2013 3:15 pm
Re: iPhone connects but IP address does not change
I am forwarding port 1194 on my router to Win7 which is on a static IP.
I have opened the Win7 firewall for UDP port 1194.
I have added to the server config:
push "redirect-gateway def1"
Unfortunately my iPhone is still not acquiring the server IP address.
Have you any pointers on how to set up NATting on Win7 ?
Many thanks.
I have opened the Win7 firewall for UDP port 1194.
I have added to the server config:
push "redirect-gateway def1"
Unfortunately my iPhone is still not acquiring the server IP address.
Have you any pointers on how to set up NATting on Win7 ?
Many thanks.
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: iPhone connects but IP address does not change
add an extra route to your home router:
source = 10.8.0.0
mask = 255.255.255.0
destination = Win7 static IP
as for a tutorial, try topic7806.html
source = 10.8.0.0
mask = 255.255.255.0
destination = Win7 static IP
as for a tutorial, try topic7806.html
-
- OpenVpn Newbie
- Posts: 3
- Joined: Sat Apr 20, 2013 3:15 pm
Re: iPhone connects but IP address does not change
Tried to add a static route but got a LAN conflict. There may be a known problem with static routes on my Netgear WNDR though.
I therefore followed the link you posted, used the server and client scripts and made the changes to the Win7 network plus registry edit.
Success! The iPhone now acquires the server IP address and can access my home network.
Many thanks for your help.
I therefore followed the link you posted, used the server and client scripts and made the changes to the Win7 network plus registry edit.
Success! The iPhone now acquires the server IP address and can access my home network.
Many thanks for your help.