Page 1 of 1

Server connection running on a private IP

Posted: Thu Sep 29, 2011 1:57 pm
by Jane
Is there a way how to use server running on a private IP that is dynamicly assigned by DHCP server?

For example, my LAN subnet has a public address 72.63.172.23.That IP is the same all the time.
But I would like to setup OpenVPn server in my LAN subnet with one of my PC behind the ADSL rooter/DHCP server.
Computer in my subnet gets IP from the DHCP local pool( e.g.192.168.1.3) but a particular computer can have different IP in different time. So I must first know what IP was assigned to the server, then I must change client's configuratio IP and only that I can connect.

Is there a smarter way ?
Thanks

Re: Server connection running on a private IP

Posted: Thu Sep 29, 2011 2:14 pm
by janjust
this is not really an openvpn issue but a local router issue - can you configure your DSL router to forward a port (1194) to a DHCP client based on the name?

Re: Server connection running on a private IP

Posted: Thu Sep 29, 2011 3:15 pm
by Mimiko
There will be time, when the OpenVPN service will not be accessible, due to server renew its IP from DHCP service, but router will not be aware some time of that new IP. So I reccomend you set a static IP on PC that will run OpenVPN, or configure DHCP service to give same IP to the MAC-address.

Re: Server connection running on a private IP

Posted: Thu Sep 29, 2011 3:27 pm
by Jane
I use this DSL router
http://www.tp-link.com/en/products/deta ... -8840#spec

I do not think I can assign IP address according to the host name :(

Re: Server connection running on a private IP

Posted: Thu Sep 29, 2011 8:41 pm
by janjust
but you CAN assign the same IP to a host all the time: read the manual

http://www.tp-link.com/common/download/ ... 160731.pdf

page 34 DHCP reservation.

Re: Server connection running on a private IP

Posted: Fri Sep 30, 2011 6:39 pm
by Jane
Thanks for your replies and help. Now I am a little further but still OpenVPN server does not work.
I receive the TLS Error: TLS key negotiation failed to occur within 60....
I do not think I properly forwarded IP addresses to port 1194. But which addresses shall I forward; please see my adapter connections below.( That is my XP running OpenVPN)
--------------------

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Marvell Yukon 88E8042 PCI-E Fast Ethernet Controller
Physical Address. . . . . . . . . : 00-22-64-5E-8E-E3
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 192.168.1.21
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 192.168.1.1
Lease Obtained. . . . . . . . . . : Friday, September 30, 2011 7:53:32 AM
Lease Expires . . . . . . . . . . : Saturday, October 01, 2011 10:53:32AM

Ethernet adapter SERVERVPN:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : TAP-Win32 Adapter V9
Physical Address. . . . . . . . . : 00-FF-08-9C-86-07
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 10.8.0.6
Subnet Mask . . . . . . . . . . . : 255.255.255.252
Default Gateway . . . . . . . . . :
DHCP Server . . . . . . . . . . . : 10.8.0.5
Lease Obtained. . . . . . . . . . : Friday, September 30, 2011 5:10:23 PM
Lease Expires . . . . . . . . . . : Saturday, September 29, 2012 5:10:23 PM

---------------------------
If the public address is e.g. 74.62.173.27,
shall I forward 10.8.0.6 to port 1194 or 192.168.1.21 to port 1194 or even another IP?
Thanks

Re: Server connection running on a private IP

Posted: Fri Sep 30, 2011 9:00 pm
by janjust
if your VPN server is now fixed at IP 192.168.1.21 then you should forward UDP and TCP port 1194 to this IP.