Page MenuHomeVyOS Platform

Missing PPPoE interfaces in l2tp configuration
Closed, ResolvedPublicBUG

Description

Hi, I have a VyOS system which uses an ethernet port as a PPPoE port (pppoe0) to connect to internet. I obtain a dynamic IP from the ISP.
I wish use pppoe0 with l2tp server so i have tried the following command

set vpn l2tp remote-access dhcp-interface pppoe0

but pppoe0 does not appear in the list of available interfaces. The system allows to insert pppoe0 in the last command but when I "commit it" i receive the following error

L2TP VPN configuration error: The specified interface is not configured for DHCP.

please, can you permit to use pppoe interface with dynamic address with l2tp server?

Details

Difficulty level
Easy (less than an hour)
Version
1.2.0
Why the issue appeared?
Implementation mistake
Is it a breaking change?
Perfectly compatible

Event Timeline

syncer edited subscribers, added: VyOS 1.2 Crux; removed: oliveriandrea.
syncer added a subscriber: oliveriandrea.
dmbaturin set Version to 1.2.0.
syncer changed the subtype of this task from "Task" to "Bug".Oct 18 2018, 5:52 AM
pasik added a subscriber: pasik.Mar 12 2019, 6:12 PM
syncer assigned this task to Dmitry.Nov 17 2019, 3:11 AM

I propose in this case use set vpn l2tp remote-access outside-address 0.0.0.0. It works in current rolling.

In T125#51628, @Dmitry wrote:

I propose in this case use set vpn l2tp remote-access outside-address 0.0.0.0. It works in current rolling.

Hi, Dmitry
I found that this setting have bug that is when i try to set my pppoe dynamic address like xxx.xxx.12.16(pppoe0 wan address) . I can connect vpn. but when i set set vpn l2tp remote-access outside-address 0.0.0.0 after reboot it will not work any more.

Hi @dongjunbo , could you try the package for 1.2.5 with fixing this issue?

Just upload this package to your router and install

sudo dpkg -i vyatta-ravpn_1.2.5_all.deb

Changes in package

diff --git a/lib/Vyatta/L2TPConfig.pm b/lib/Vyatta/L2TPConfig.pm
index 06cd343..792d0e9 100644
--- a/lib/Vyatta/L2TPConfig.pm
+++ b/lib/Vyatta/L2TPConfig.pm
@@ -616,6 +616,10 @@ sub get_l2tp_conf {
     $oaddr = get_dhcp_addr($dhcpif);
   }
   return (undef, 'Outside address not defined') if (!defined($oaddr));
+  my $c_oaddr = '';
+  if ($oaddr ne "0.0.0.0"){
+    $c_oaddr = 'listen-addr = '.$oaddr;
+  }
   my $cstart = $self->{_client_ip_start};
   return (undef, 'Client IP pool start not defined') if (!defined($cstart));
   my $cstop = $self->{_client_ip_stop};
@@ -637,7 +641,7 @@ sub get_l2tp_conf {
   my $str =<<EOS;
 ;$cfg_delim_begin
 [global]
-listen-addr = $oaddr
+$c_oaddr
 
 [lns default]
 ip range = $cstart-$cstop
@@ -703,6 +707,7 @@ EOM
 sub maybeClustering {
   my ($self, $config, @interfaces) = @_;
   return 0 if (defined($self->{_dhcp_if}));
+  return 0 if ($self->{_out_addr} eq "0.0.0.0");
   return (!(Vyatta::Misc::isIPinInterfaces($config, $self->{_out_addr},
                                          @interfaces)));
 }
Dmitry changed the task status from Open to In progress.Aug 13 2020, 7:51 AM
Dmitry changed the task status from In progress to Needs testing.Aug 13 2020, 10:07 AM
dmbaturin set Why the issue appeared? to Implementation mistake.
dmbaturin set Is it a breaking change? to Perfectly compatible.
Dmitry closed this task as Resolved.Aug 14 2020, 6:19 AM
Dmitry removed a project: VyOS 1.3 Equuleus.

Successfully tested on VyOS 1.2.6-epa1