Reply
Highlighted
Emerging Member
Posts: 44
Registered: ‎11-11-2013
Kudos: 28
Solutions: 1
Accepted Solution

PPTPD localip

hi,

is there a way to specify in the cli the "localip" argument for an instance of pptpd server? what I found was only that this parameter is somehow hardcoded into the perl files from vyatta.

sh-4.1# grep -r -e localip /opt/vyatta/*
/opt/vyatta/bin/sudo-users/vyatta-show-ipsec-status.pl:sub get_vpn_all_localips {
/opt/vyatta/bin/sudo-users/vyatta-show-ipsec-status.pl:sub relate_intfs_with_localips {
/opt/vyatta/bin/sudo-users/vyatta-show-ipsec-status.pl:  my @peer_localips = get_vpn_all_localips();
/opt/vyatta/bin/sudo-users/vyatta-show-ipsec-status.pl:        foreach my $local_ip (@peer_localips) {
/opt/vyatta/bin/sudo-users/vyatta-show-ipsec-status.pl:my @peer_local_ips = get_vpn_all_localips();
/opt/vyatta/bin/sudo-users/vyatta-show-ipsec-status.pl:relate_intfs_with_localips();
/opt/vyatta/share/perl5/Vyatta/PPTPConfig.pm:localip 10.255.254.0
/opt/vyatta/share/perl5/Vyatta/VPN/OPMode.pm:          _localip     => $th{$connectid}->{_lip},
/opt/vyatta/share/perl5/Vyatta/VPN/OPMode.pm:      print "Local IP:\t\t$tunhash{$connid}->{_localip}\n";
sh-4.1# 
sh-4.1# 
sh-4.1# cat /etc/pptpd.conf 
### Vyatta PPTP VPN Begin ###
option /etc/ppp/options.pptpd
listen 0.0.0.0
debug
noipparam
#logwtmp
localip 10.255.254.0
remoteip 192.168.1.252-253
### Vyatta PPTP VPN End ###
sh-4.1# 

 and there is no definition for this in the templates.

sh-4.1# ls -la /opt/vyatta/share/vyatta-cfg/templates/vpn/pptp/remote-access/
total 1
drwxr-xr-x    1 root     root           170 Mar 29 02:22 .
drwxr-xr-x    1 root     root            52 Mar 29 02:22 ..
drwxr-xr-x    1 root     root            83 Mar 29 02:22 authentication
drwxr-xr-x    1 root     root            56 Mar 29 02:22 client-ip-pool
drwxr-xr-x    1 root     root            31 Mar 29 02:22 dhcp-interface
drwxr-xr-x    1 root     root            63 Mar 29 02:22 dns-servers
drwxr-xr-x    1 root     root            31 Mar 29 02:22 mtu
-rw-r--r--    1 root     root            29 Sep 24  2013 node.def
drwxr-xr-x    1 root     root            31 Mar 29 02:22 outside-address
drwxr-xr-x    1 root     root            63 Mar 29 02:22 wins-servers

 I must say this is an important parameter that one should be able to change or specify per install basis.
10x for any help. I don't want to change it in the perl file.


Accepted Solutions
Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5465
Solutions: 1656
Contributions: 2

Re: PPTPD localip

Yeah this has been discussed before in the context of PPPoE server, but the limitation is the same. Currently this is not configurable, which is normally not an issue since these are point-to-point interfaces. We can look into making it configurable but for now this would need to be changed in the scripts etc.

View solution in original post


All Replies
Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5465
Solutions: 1656
Contributions: 2

Re: PPTPD localip

Yeah this has been discussed before in the context of PPPoE server, but the limitation is the same. Currently this is not configurable, which is normally not an issue since these are point-to-point interfaces. We can look into making it configurable but for now this would need to be changed in the scripts etc.

Member
Posts: 108
Registered: ‎05-20-2011
Kudos: 89
Solutions: 6

Re: PPTPD localip

hi cremenescu 

as ancheng has said this has been discussed in the past with reference to the pppoe server by myself and other members of the community and i have managed to change the localip used by the pppoe server in my deployments and would be happy to help you along with the process 

the ubnt-users and the ubnt-util binaries both have the localip hardcoded but this can be worked around successfully in the pppoe instance and based on that experience i belive it would work for yourself aswell with the pptp server  

in my case i assaigned a ip address to the loopback interface and use that ip as the endpoint for the ppp tunnels 

for the pppoe server the files i have to edit are as follows 

 

/opt/vyatta/share/perl5/Vyatta/PPPoEServerConfig.pm

/etc/ppp/ip-down.d/pppoe-server-ip-down

/etc/ppp/ip-up.d/pppoe-server-ip-up

/usr/sbin/ubnt-users

/usr/sbin/ubnt-util

 

hope this helps with regards changing the localip for the pptp server from your post and a quick search it would appear you would need to edit the following files 

 

/opt/vyatta/share/perl5/Vyatta/PPTPConfig.pm

/opt/vyatta/sbin/vyatta-show-ravpn.pl

/etc/ppp/ip-down.d/ravpn-ip-down

/etc/ppp/ip-up.d/ravpn-ip-up

/usr/sbin/ubnt-users

/usr/sbin/ubnt-util

 

but once again please ubnt can we get these endpoint localips made configurable

from what i can see we just need a varible from the config and pipe/use that with the scripts the perl module and the ubnt-users and ubnt-util binaries

both the ubnt binaries can be edited by hand atm so the change of the endpoint address inside of the binaries is possible although obviously unsupported and any user thinking of editing the ubnt-users and ubnt-util files should make local backups of the files before editing

also because the binaries change with each release the edits have to be done on a per system basis and on each version upgrade

 

regards

ellis 

Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5465
Solutions: 1656
Contributions: 2

Re: PPTPD localip

Yeah as mentioned this is on our TODO list and we need to get to it (just a matter of resources really). Thanks for the feedback!

Reply