Skip to contentSkip to conversation

pptp client server

DISCUSSION [email protected] 2 participants 2 messages Oct 22, 2009 – Oct 26, 2009 PPP protocol drivers and compressors

lore
Share & tools
lore
#0 lore raw

Am I correct in assuming (and I am asking for Linux, CentOS 4.5 to be exact) that when a pptp client makes a connection to a pptp servcer (does the call), the server actually assigns (or more like "picks") the next available ip address from the ip pool you provide, even before it examines the login and password from the client?

If so, then not only can you not specify a specific VPN IP address for a client, but also (assume the IP pool is 10.0.0.26-29 and 10.0.0.26 is the only one in use), even if the client specifies 10.0.0.29: in the /etc/ppp/options.pptp file, if 27 is the next available one, it will use 27 instead of 29 and fail, even though the client requested 29?

If this is true, is there any way the client can always get the same IP address (other than just by happenstance logging in when it is the next available)?

I notice that pptpd on the server spawns a pppd process with like 10.0.0.98:10.0.0.27. This pppd is spawned by pptpd when the connection. Anyway to intervene in this spawning and change the ip to what I wish (i.e. 10.0.0.29).

By the way I know one thing you are thinking, but I can't have an ip pool of just 1, because we have at least 3 or 4 clients which need to connect.

#1 lore raw
Quoted 5 lines · On Thu, Oct 22, 2009 at 07:34:48PM +0000, [email protected] wrote:

Am I correct in assuming (and I am asking for Linux, CentOS 4.5 to be exact) that when a pptp client makes a connection to a pptp servcer (does the call), the server actually assigns (or more like "picks") the next available ip address from the ip pool you provide, even before it examines the login and password from the client?

Yes, usually.

pptpd does not examine the login and password from the client, but pppd does.

pptpd can function with address pool management by pptpd or pppd.

pptpd is not packaged by CentOS 4.5, so a build from source will take the default action of using pptpd pool management.

In pptpd 1.3.1 and later, the "delegate" option in pptpd.conf causes pool management to be delegated to pppd. In pptpd 1.3.0 and earlier, the source has to be configured --with-pppd-ip-alloc to achieve the same result.

Once address pool management is assigned to pppd, it is up to pppd to allocate an appropriate IP address. This can be achieved in various ways, using pppd options files. See the pppd options in the pppd documentation.

In the default mode of address pool management by pptpd, the address is passed to pppd on the command line. This is why you see that.

Signature · 2 lines
James Cameron
http://quozl.linux.org.au/