What's new
  • 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!

OpenVPN Server - openvpn-event Problem

CaptMorgan

New Around Here
I'm running 380.63 on an RT-AC87U and think I've identified a bug in the openvpn-event implementation of the openvpn server.

I have an OpenVPN client connected to privateinternetaccess and routing all traffic from a couple of LAN devices except for a few ports on those devices that are directed through the internet gateway. The bypass is configured and executed by an openvpn-event script installed at /jffs/scripts/. It works fine.

The problem I'm experiencing is that I cannot run an openvpn server at the same time on the RT-AC87U. The openvpn server daemon fails to start. Troubleshooting has lead me to realize whenever the server attempts to start, it writes the contents of the /jffs/scripts/openvpn-event file to /etc/openvpn/server1/updown.sh.

No matter what is in the event file, it is written exactly into the updown.sh file. Renaming or deleting the event file allows both the openvpn client and server to coexist. I tried wiping and reflashing my router thinking it was something I may have done, but the problem remains.

If its something I'm doing wrong, I sure can't figure out what it is...any help is appreciated!

Thanks!
CaptMorgan!
 
If its something I'm doing wrong, I sure can't figure out what it is...any help is appreciated!
There is a whole series of arguments that are passed to the openvpn-event script (you can see them in the syslog) as well as setting about a dozen environment variables. Your script has to see who called it and why and then take the proper actions.
 
Understood.

But I tried something as basic as disabling the client, and putting an event file containing nothing more than a comment in the file and got the same results; when starting the server the contents of the file were written to the updown.sh file.

Are you able to start an openvpn server when an openvpn-event file is present?
 
Are you able to start an openvpn server when an openvpn-event file is present?
Yes, I'm currently running both an OpenVPN server and client. Currently on my Merlin fork code, but it also worked the last time I had loaded Merlin.

My openvpn-event script is set up basically as a 'director'. All it does is see what event called it, then calls the appropriate event specific script.
For example, a vpnclient1-route-up script.
 
Thanks for your responses john9527. I suspect your experience far outweighs mine. What you're doing with your script may very well be what I need to do to accomplish my end goal. But how does your response confirm there isn't a problem with 380.63?

On 380.63, can you run an openvpn server with an openvpn-event scrip? It doesn't work for me and since I've wiped and reflashed my router today in an attempt to fix the problem, I'm at a loss for an explanation.

I disabled the client, and put nothing more than a comment in the /jffs/scripts/openvpn-event file. When the server attempts to start, the contents of /jffs/scripts/openvpn-event were written to an /etc/openvpn/server1/updown.sh file and the server daemon fails to start. Without the openvpn-event file, the server runs fine.

Is anyone running an openvpn server on 380.63 and using an openvpn-event file?
 

Similar threads

Latest 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!
Back
Top