FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
2,034 views 2 comments
by
Hello.

Is it possible to switch vpn PPTP client (not OpenVPN) on/off via SMS command - RUT240?

Thanks in advance.

1 Answer

+1 vote
by anonymous

Hello,

To enable/disable PPTP client or server with SMS Utilities, you will need to use uci commands. If you want to find out more about this commands, please check our wiki page: https://wiki.teltonika.lt/view/UCI_command_usage#Available_commands

To turn PPTP server on or off, send SMS with text <router password> uci set pptpd.pptpd.enabled=1 (to enable configured PPTP server) or <router password> uci set pptpd.pptpd.enabled=0 (to disable configured PPTP server).

To turn PPTP client on or off, send two SMS messages with text <router password> uci set network.<PPTP client name>.enabled=1 and <router password> uci set network.<PPTP client name>.disabled=0 (to enable selected PPTP client) or <router password> uci set network.<PPTP client name>.enabled=0 and <router password> uci set network.<PPTP client name>.disabled=1 (to disable selected PPTP client).

Also, I suggest to change SMS storage parameters. Go to SMS utilities -> SMS management -> Storage and increase “Leave free space” parameter from 1 to 5 or more.

p { margin-bottom: 2.47mm; line-height: 115%; }
Best answer
by

Hello.

This is I was looking for. 

This UCI API syntax works OK for enabling/disabling PPTP client. Do I really need to send two SMS messages to turn vpn ON/OFF? It seems that SMS with uci set network.myPPTPname.enabled=1 and the other one with uci set network.myPPTPname.enabled=0 are sufficient to do it properly.

Is there any way to add a new custom SMS rule with short text like for example "pp2p_on" executing whole uci commands? ..... At the bottom of the SMS Utilities page I can add a new rule but only with predefined action list. I cant' find how to to this correctly.

The suggestion about SMS management is OK. I left box "Save message on SIM" unchecked too.

Many thanks !

by anonymous
Unfortunately, but, yes, it's necessary to sent two sms messages, since we are changing two parameters for client interface.

At the moment there is no way to add custom rule, which allow to execute uci commands, but we will add this feature in firmware development suggestions.