add_ppp_secret
Create a PPP/PPPoE secret on MikroTik RouterOS with dial-in name, password, and optional service, profile, or remote address. Preview first, then confirm to write; existing names are rejected.
Instructions
Create a PPP/PPPoE secret (/ppp/secret add) - name/password
are the dial-in login credentials for a PPPoE/PPTP/L2TP/OpenVPN/SSTP
service. service (default "any") restricts which PPP service the
secret may authenticate for - one of "pppoe"/"pptp"/"l2tp"/"ovpn"/
"sstp"/"any". profile (an existing /ppp/profile name, e.g. to
assign an address pool or rate limit), remote_address (a literal
IP handed to the client on connect), and comment are all optional.
PASSWORD IN THE RESULT: like add_hotspot_user's voucher password,
this tool's password is DELIBERATELY present in its result (the
caller supplied it and gets it echoed back as confirmation) - but
still never written to the audit journal. See
guard.add_ppp_secret's docstring for exactly how that asymmetry
holds.
WRITE tool, guarded: blocked entirely unless the server is running
with MIKROTIK_ALLOW_WRITE=true. Call with confirm=False (the
default) to get a preview without changing anything; call again
with confirm=True to actually create it. Errors clearly (without
creating anything) if name already exists on the device - it
never creates a duplicate or resets an existing secret's password.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| comment | No | ||
| confirm | No | ||
| profile | No | ||
| service | No | any | |
| password | Yes | ||
| device_name | Yes | ||
| remote_address | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||