MPD5 5.8
FreeBSD 10.1-RELEASE
Вопрос:
How to specify the numbering of virtual interfaces (ng), which should be assigned to clients when connecting with one login and password at the next connection configuration:
Annotation:
I have several connections in mpd.conf. Some with explicit indication of the name of virtual interface, and some without. After their creation, a self-written service starts working, which raises a bunch of virtual interfaces (they are dynamic, i.e. they are created and deleted when necessary, without restarting). If you do not explicitly specify the virtual interface number create bundle ng13 in mpd.conf, then the first free one is assigned in order.
Problem:
Let's say mpd has created 10 connections. After them, a self-written service starts working, which looks that the last connection was 10 and therefore it is necessary to create your own starting from 11. Created. I memorized each one and the number of the last one (let's say 20). Time passes, a new client connects via VPN and is assigned the first free one in order (21 in a row). More time passes, I need to recreate (delete/change) the connection (which is dynamic - read above), say 10. After manipulations, the service drops 10 connections and creates a new one, in order... 21. But it is already occupied by the VPN client.
P.S. It is advisable not to offer to rewrite the self-written service... it would be so simple if it wasn't so difficult in this matter)
FreeBSD 10.1-RELEASE
Вопрос:
How to specify the numbering of virtual interfaces (ng), which should be assigned to clients when connecting with one login and password at the next connection configuration:
Code:
krdkrd:
create bundle template krdkrd
set ippool add pool1 192.168.1.10 192.168.1.14
set ipcp ranges 192.168.1.9/32 ippool pool1
load vpnin
create link template krdkrd pptp
set link action bundle krdkrd
set pptp peer 10.0.0.1
Code:
vpnin:
set iface disable on-demand
set iface enable proxy-arp
set iface enable tcpmssfix
set iface idle 1800
set iface up-script /usr/local/etc/mpd5/vpninup
set iface down-script /usr/local/etc/mpd5/vpnindown
set ipcp yes vjcomp
set bundle enable compression
set ccp yes mppc
set mppc yes e40
set mppc yes e128
set mppc yes stateless
Code:
vpninlink:
set link enable multilink
set link yes acfcomp protocomp
set link no pap chap eap
set link enable chap
set link no eap
set link mtu 1400
set link mru 1400
set link keep-alive 10 60
set link fsm-timeout 7
set pptp disable originate
set pptp disable windowing
set link enable incoming
Annotation:
I have several connections in mpd.conf. Some with explicit indication of the name of virtual interface, and some without. After their creation, a self-written service starts working, which raises a bunch of virtual interfaces (they are dynamic, i.e. they are created and deleted when necessary, without restarting). If you do not explicitly specify the virtual interface number create bundle ng13 in mpd.conf, then the first free one is assigned in order.
Problem:
Let's say mpd has created 10 connections. After them, a self-written service starts working, which looks that the last connection was 10 and therefore it is necessary to create your own starting from 11. Created. I memorized each one and the number of the last one (let's say 20). Time passes, a new client connects via VPN and is assigned the first free one in order (21 in a row). More time passes, I need to recreate (delete/change) the connection (which is dynamic - read above), say 10. After manipulations, the service drops 10 connections and creates a new one, in order... 21. But it is already occupied by the VPN client.
P.S. It is advisable not to offer to rewrite the self-written service... it would be so simple if it wasn't so difficult in this matter)