Backup route

How to customize and extend your OpenVPN installation.
Post Reply
bistritapcv
OpenVpn Newbie
Posts: 4
Joined: Wed Dec 01, 2010 1:25 am

Backup route

Post by bistritapcv » Fri Dec 10, 2010 1:13 pm

Hello

I have an eth0 address, say it is 192.168.5.191. I connect to my openvpn as server and get a VPN IP of
172.21.1.5 (so now I have both).

The software I am running relies on the fact that I have an IP address 172.21.1.5. However, if communication is temporarily
lost between my machine and the VPN server I will no longer have the 172 address, and there will be problems.

I want to just do an ifconfig eth0:1 172.21.1.5 netmask 255.255.0.0

But then I will have two interfaces (usually) with the 172.21.1.5 address. I would make the netmask the full 255.255.255.255
so only one route would be affected.

Is it OK to have the VPN IP and eth0:1 IP address the same or will it cause problems?
Yes you can tell me to try it which I did and it appears to be OK but appearances can be deceptive.

Thanks

User avatar
ecrist
Forum Team
Posts: 254
Joined: Wed Nov 26, 2008 10:33 pm
Location: Minneapolis, MN
Contact:

Re: Backup route

Post by ecrist » Sun Dec 12, 2010 6:47 pm

For this situation, what I would do, is run a bridged VPN. Keep the 172.x address assigned and configure a static tap interface which will be bridged with the interface you've assigned the 172.x address to. When the VPN is up, you'll be able to communicate to the other 172.x systems, when it's not, you'll have have an orphaned IP on that network.
:mrgreen:
OpenVPN Community Administrator
IRC: #openvpn, #openvpn-devel Twitter: @ecrist
Co-Author of Mastering OpenVPN
Author of Troubleshooting OpenVPN

User avatar
krzee
Forum Team
Posts: 729
Joined: Fri Aug 29, 2008 5:42 pm

Re: Backup route

Post by krzee » Thu Jan 13, 2011 9:46 am

or you can just create a static tun interface

Post Reply