Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.