Skip to contentSkip to conversation

VPN disconnect

DISCUSSION [email protected] 3 participants 3 messages Feb 4, 2009 – Feb 5, 2009 PPP protocol drivers and compressors

lore
Share & tools
lore
#0 lore raw

This is another VPN question.

We have a regular IP address which we use to connect to a PPTP VPN which assigns us 10.0.1.29. If the PPTP connection goes down, we will lose that address.

Our software relies on our IP address being 10.0.1.29. Is there a way, if the VPN temporarily goes down, to maintain the IP address of 10.0.1.29 ?

#1 lore raw
Quoted 9 lines · [email protected] writes:

This is another VPN question.

We have a regular IP address which we use to connect to a PPTP VPN which assigns us 10.0.1.29. If the PPTP connection goes down, we will lose that address.

Our software relies on our IP address being 10.0.1.29. Is there a way, if the VPN temporarily goes down, to maintain the IP address of 10.0.1.29 ?

You can tell pppd to request a particular address by adding it to your options, like this:

	pppd 10.0.1.29: ipcp-accept-local

(The ":" at the end means "request this local address, and don't insist on any particular peer address.")

pppd doesn't have an automatic means to save the last-used address for a link and pick it up again. Perhaps it should have one, but you could do this in a script by having your own /etc/ppp/ip-up that stores $IPREMOTE into a file, and then pull in that file's contents for a later invocation of pppd.

Note that this just tells pppd to request a particular address. There's no telling whether the peer understands what to do with such a request, or if it can or will honor it. Some servers may refuse to negotiate at all under such conditions, causing the link to fail. (Bugs are unfortunately common.)

Signature · 1 line
James Carlson         42.703N 71.076W         <[email protected]>
#2 lore raw
In reply to [email protected]
Quoted 5 lines · James Carlson

Note that this just tells pppd to request a particular address. There's no telling whether the peer understands what to do with such a request, or if it can or will honor it. Some servers may refuse to negotiate at all under such conditions, causing the link to fail. (Bugs are unfortunately common.)

On the peer side, pptpd on Linux in the default configuration gives the IP address to pppd on command line, and so the IP address is usually non-negotiable. I don't know about other peers.

Signature · 3 lines
James Cameron                         http://quozl.netrek.org/
HP Open Source, Volunteer             http://opensource.hp.com/
PPTP Client Project, Release Engineer http://pptpclient.sourceforge.net/