Community Support Forum
 
  OpenVPN.net  •  Forum Index  •  FAQ  

It is currently Fri Apr 18, 2014 10:35 am




Post new topic Reply to topic  [ 5 posts ] 
 iPhone connects but IP address does not change 
Author Message
 Post subject: iPhone connects but IP address does not change
PostPosted: Sat Apr 20, 2013 3:21 pm 
OpenVpn Newbie

Joined: Sat Apr 20, 2013 3:15 pm
Posts: 3
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 [I have my address here] 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


Offline
 Profile  
 
 Post subject: Re: iPhone connects but IP address does not change
PostPosted: Mon Apr 22, 2013 11:01 am 
Forum Team
User avatar

Joined: Fri Aug 20, 2010 2:57 pm
Posts: 2702
Location: Amsterdam
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
Code:
push "redirect-gateway def1"

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.

_________________
JJK / Jan Just Keijser
http://www.nikhef.nl/~janjust/vpn/OpenVPN2-Cookbook/index.html
http://www.nikhef.nl/~janjust/vpn/OpenVPN2-Cookbook/errata.html


Offline
 Profile  
 
 Post subject: Re: iPhone connects but IP address does not change
PostPosted: Mon Apr 22, 2013 10:32 pm 
OpenVpn Newbie

Joined: Sat Apr 20, 2013 3:15 pm
Posts: 3
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.


Offline
 Profile  
 
 Post subject: Re: iPhone connects but IP address does not change
PostPosted: Tue Apr 23, 2013 9:07 pm 
Forum Team
User avatar

Joined: Fri Aug 20, 2010 2:57 pm
Posts: 2702
Location: Amsterdam
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 https://forums.openvpn.net/topic7806.html

_________________
JJK / Jan Just Keijser
http://www.nikhef.nl/~janjust/vpn/OpenVPN2-Cookbook/index.html
http://www.nikhef.nl/~janjust/vpn/OpenVPN2-Cookbook/errata.html


Offline
 Profile  
 
 Post subject: Re: iPhone connects but IP address does not change
PostPosted: Wed Apr 24, 2013 10:21 pm 
OpenVpn Newbie

Joined: Sat Apr 20, 2013 3:15 pm
Posts: 3
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.


Offline
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


 Who is online 

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


phpBB SEO
[ Time : 0.178s | 12 Queries | GZIP : On ]

 
Index  |  FAQ


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group