PPTP chap-secrets

I need few clients on my pptp server with fixed ip so I edit /etc/ppp/chap-secrets like

1 pptp-server 1
2 pptp-server 2

But after rebooting I have the same old file with one entry only for one user.
I tried to edit /tmp/etc/chap-secrets the same thing after rebooting all gone.
Why it is not working like it is supposed to be
Where do I add multiple clients so they stay after rebooting on server config

I have found path for chap-secrets in /etc/init.d/pptp --/var/etc/ppp/chap-secrets
And the same old story

1 Like

Each PPTP client should use a separate login section with unique username:

Specify the option remoteip in the login section and remove /tmp/etc/chap-secrets:

1 Like

So I go /etc/ppp/chap-secrets make a list for clients where I put usernames passwords and ips
and then I save the file and then I rm /tmp/etc/chap-secrets ?

uci is great but before it I need to know the mechanic of the settings .
uci is good when you know what is behind these commands

Do not edit /etc/ppp/chap-secrets since it is just a symlink to /tmp/etc/chap-secrets.
It is stored on tmpfs and filled automatically from the UCI settings.

1 Like

But why if I edit this /tmp/etc/chap-secrets file it wipes to previous version after reboot is there any way to save this file so it won't reset after rebooting?
So there is uci file with all these parameters , but where what is the name ?

So this is the working uci script for 2 clients

uci -q delete pptpd.client1
uci set pptpd.client1="login"
uci set pptpd.client1.username="USERNAME1"
uci set pptpd.client1.password="PASSWORD1"
uci set pptpd.client1.remoteip=""

uci -q delete pptpd.client2
uci set pptpd.client2="login"
uci set pptpd.client2.username="USERNAME2"
uci set pptpd.client2.password="PASSWORD2"
uci set pptpd.client2.remoteip=""

Trying change the service logic is not advisable.
Replace ipaddress with remoteip.

1 Like

Yes I just recall I've seen somewhere this parameters it is in extras for pptp :slightly_smiling_face:

1 Like

Is this the same with pptpd cause I couldn't config options.pptpd permanently ?
Is there uci commands for configuring pptpd like to set mppe no128 no56 etc ?
But editing config file is more simpler to understand

Yes, there are similarities in managing PPTP secrets and PPP options.
In fact, this is common practice for OpenWrt services to store runtime configs in tmpfs.

However, there are also differences, and the logic to process those settings is not the same.
It can result in unexpected problems if altered without thorough understanding and testing.

Follow the wiki to add clients in the PPTP service config.
Then you can simply edit that config with a text editor.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.