What's new

Start L2TP Vpn Client Over SSH

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

3mro

New Around Here
This is probably a noob question but I'd like to know which command i should use to start and stop an l2tp client on Asus RT- AC5300 using SSH

I searched but i couldn't find anything for l2tp clients in specific.


Thanks in advance.
 
which command i should use to start and stop an l2tp client on Asus RT- AC5300 using SSH

I searched but i couldn't find anything for l2tp clients in specific.

Use this PPTP script as a template to initiate the L2TP connection:

https://www.snbforums.com/threads/delay-pptp-vpn-start.38026/#post-313277

You will need to change the protocol and ideally the PPTP specific option should be erased
e.g.
Code:
nvram set vpnc_proto=pptp
nvram set vpnc_pptp_options_x="+mppe-128"
change script lines to
Code:
nvram set vpnc_proto=l2tp
nvram set vpnc_pptp_options_x=

To terminate the L2TP connection issue:
Code:
service stop_vpncall
 
Last edited:
Use this PPTP script as a template to initiate the L2TP connection:

https://www.snbforums.com/threads/delay-pptp-vpn-start.38026/#post-313277

You will need to change the protocol and ideally the PPTP specific option should be erased
e.g.
Code:
nvram set vpnc_proto=pptp
nvram set vpnc_pptp_options_x="+mppe-128"
change script lines to
Code:
nvram set vpnc_proto=l2tp
nvram set vpnc_pptp_options_x=

To terminate the L2TP connection issue:
Code:
service stop_vpncall

Thank you very much sir
One last question
Does this script have to start at boot or can i assign a command to call it whenever i want ?

Also should i change pppoe password to vpn server password or isp pppoe password.

nvram set vpnc_pppoe_passwd="xxxxxxxx


Thanks again this is very helpful
 
Last edited:
Does this script have to start at boot or can i assign a command to call it whenever i want

The crude script can be called post-boot manually or via cru/cron to initiate the L2TP connection, but if the GUI profile L2TP connection is ACTIVE when you reboot, then the firmware will automatically restart the L2TP connection, which may not be what you require.

You may improve the script to allow you to specify say 'del' as a command argument so you could add the 'service stop_vpncall' to the script.

NOTE: The crude script does not update the GUI if there is no matching L2TP profile, but you can again tweak the script etc. to 'fix' this.

The userid/password credentials should be set to the appropriate server you are connecting to.
 
The crude script can be called post-boot manually or via cru/cron to initiate the L2TP connection, but if the GUI profile L2TP connection is ACTIVE when you reboot, then the firmware will automatically restart the L2TP connection, which may not be what you require.

You may improve the script to allow you to specify say 'del' as a command argument so you could add the 'service stop_vpncall' to the script.

NOTE: The crude script does not update the GUI if there is no matching L2TP profile, but you can again tweak the script etc. to 'fix' this.

The userid/password credentials should be set to the appropriate server you are connecting to.
Works like a charm :)

Thank you very much
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top