Server connection running on a private IP

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
Jane
OpenVpn Newbie
Posts: 10
Joined: Thu Sep 29, 2011 1:48 pm

Server connection running on a private IP

Post by Jane » Thu Sep 29, 2011 1:57 pm

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

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

Re: Server connection running on a private IP

Post by janjust » Thu Sep 29, 2011 2:14 pm

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?

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: Server connection running on a private IP

Post by Mimiko » Thu Sep 29, 2011 3:15 pm

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.

Jane
OpenVpn Newbie
Posts: 10
Joined: Thu Sep 29, 2011 1:48 pm

Re: Server connection running on a private IP

Post by Jane » Thu Sep 29, 2011 3:27 pm

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 :(

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

Re: Server connection running on a private IP

Post by janjust » Thu Sep 29, 2011 8:41 pm

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.

Jane
OpenVpn Newbie
Posts: 10
Joined: Thu Sep 29, 2011 1:48 pm

Re: Server connection running on a private IP

Post by Jane » Fri Sep 30, 2011 6:39 pm

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

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

Re: Server connection running on a private IP

Post by janjust » Fri Sep 30, 2011 9:00 pm

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.

Post Reply