LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-08-2017, 03:22 AM   #1
kevinguerreiro
LQ Newbie
 
Registered: Mar 2017
Location: Portugal
Distribution: Debian / Centos
Posts: 2

Rep: Reputation: Disabled
Bind ppp0 connection to use the same IP


Hello Linux question forum,

I'm more a windows user, and just started linux a few months ago.
My question is, is it possible to bind a vpns connection let's say ppp0 to use always the same ip?

I have a linux pptp vpn server, and when someone connects to the vpn, i need that that user to have the same ip ( that is possible by setting it on the chap file) and the same pppX number.

Is that possible ?

Thanks Allot
Kevin
 
Old 03-08-2017, 12:54 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
I've never done this (as usually I leave pptpd to allocate IP addresses), but I know from reading man pptpd.conf that the delegate option can be used

Quote:
delegate
delegates the allocation of client IP addresses to pppd(8).
Without this option, which is the default, pptpd manages the
list of IP addresses for clients and passes the next free
address to pppd. With this option, pptpd does not pass an
address, and so pppd may use radius or chap-secrets to allocate
an address.

localip ip-specification
one or many IP addresses to be used at the local end of the
tunnelled PPP links between the server and the client. If one
address only is given, this address is used for all clients.
Otherwise, one address per client must be given, and if there
are no free addresses then any new clients will be refused.
localip will be ignored if the delegate option is used.

remoteip ip-specification
a list of IP addresses to assign to remote PPTP clients. Each
connected client must have a different address, so there must be
at least as many addresses as you have simultaneous clients, and
preferably some spare, since you cannot change this list without
restarting pptpd. A warning will be sent to syslog(3) when the
IP address pool is exhausted. remoteip will be ignored if the
delegate option is used.
then I assume (but open to correction) /etc/ppp/chap-secrets is configured with the IP address allocation like this
Code:
# Secrets for authentication using CHAP
# client        server  secret            acceptable local IP addresses
jim             aaa.bbb smith             192.168.5.100

Last edited by ferrari; 03-08-2017 at 12:57 PM.
 
Old 03-08-2017, 01:57 PM   #3
kevinguerreiro
LQ Newbie
 
Registered: Mar 2017
Location: Portugal
Distribution: Debian / Centos
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hello Ferrari,

Thanks for your reply.

I Have managed to do what i needed.

After a little scripting i got it working. What i did was a script in /etc/ppp/ip-up, to verify what ip the ppt connection has,since i defined the usernames with fixed ip's, it makes the correct static route that i need for that specific connection.

If anyone need the scipt or a different explanation don't hesitante to ask.

Best Regards
Kevin Guerreiro
 
Old 03-12-2017, 07:11 AM   #4
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
Welcome to LQ! One minor thing you could do, to help future searchers find this,
is to mark it as 'Solved', via ThreadTools at top

Sounds like you are doing GREAT with Linux! Best wishes...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to bridge a ppp0 connection? SentralOrigin Linux - Networking 1 02-03-2007 12:22 PM
router between eth0 <-> ppp0 (pptp connection) jpifer Linux - Networking 2 03-12-2006 12:57 PM
ppp0 connection julc Linux - Networking 2 02-06-2005 07:17 AM
PPP0 unreliable connection Hal Linux - Networking 0 12-14-2004 10:55 AM
Debian net-inst: ppp0 is connected but no connection Underhill Debian 2 08-24-2004 05:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration