What's new

OpenVPN server: client config file not available

  • 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!

ethician

Occasional Visitor
On N66U and AC3200 (others possibly too), 380.68_4, the EXPORT button for client config file never becomes available. The reason is that the nvram variable vpn_server1_state stays 1. I checked the source code and by the end of the function call start_vpnserver() the state is set to 2 but only for cryptMode SECRET or CUSTOM, not TLS. That tells me that somewhere else the state gets set to 2 but I simply couldn't find it. If anybody has any insight into how this whole process works and where and how the vpn state is set, I would appreciate them sharing it.

I also checked the 378.53 branch and it seems the state gets set directly at the end of that function regardless of cryptMode.
 
On N66U and AC3200 (others possibly too), 380.68_4, the EXPORT button for client config file never becomes available. The reason is that the nvram variable vpn_server1_state stays 1. I checked the source code and by the end of the function call start_vpnserver() the state is set to 2 but only for cryptMode SECRET or CUSTOM, not TLS. That tells me that somewhere else the state gets set to 2 but I simply couldn't find it. If anybody has any insight into how this whole process works and where and how the vpn state is set, I would appreciate them sharing it.

I also checked the 378.53 branch and it seems the state gets set directly at the end of that function regardless of cryptMode.

The final state is set within the OpenVPN code, not in rc/openvpn.c.
 
This is embarrassing but I have to admit to it. I've upgraded OpenVPN to 2.4.4 not knowing about those custom changes...
 
This is embarrassing but I have to admit to it. I've upgraded OpenVPN to 2.4.4 not knowing about those custom changes...

You meant inside the firmware? Yes, there are a few patches done by Asus to handle connection report through nvram.

My advice when updating any built-in component is to download the code to both the current and the new version, diff them, and apply that diff on top of my code. That way, any present customization will be preserved.

For OpenVPN 2.4.4, even easier would be to just pick my own commit.

https://github.com/RMerl/asuswrt-me...149fc3d#diff-72c239a0350aee0a59f7ff01ffe1cc02
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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