Recent content by btsucker

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

  1. B

    Is it Possible to limit OpenVPN connect time?

    Yes! It works now. After adding cru a LimitOVPNSession "*/1 * * * * /jffs/scripts/LimitOVPNSession.sh "vpnuser1,vpnuser2,vpnuser3,vpnuser4" enforce server" into services-start Now if any of the above 4 users stays too long it will restart the VPN server and ban the naughty user for 5 mins...
  2. B

    Is it Possible to limit OpenVPN connect time?

    new update: OK partially works. I tried to login as vpnuser1 and stayed longer than 5 mins. I manually run /jffs/scripts/LimitOVPNSession.sh "vpnuser1,vpnuser2" enforce server it did show that vpnuser1 active time is over 300 sec and restart the VPN server. I run cat BlockedVPN1_Users it...
  3. B

    Is it Possible to limit OpenVPN connect time?

    thank you so much for your response. just a quick reply. not fully test yet. the new script in post#10 TIME_LIMIT=60 # Max 5 mins should it be 600 or 300 to meet the 5 mins need?
  4. B

    Is it Possible to limit OpenVPN connect time?

    Sorry for not responding for many days. I got flu and also hurt my back. basically I can't do anything for the last week. :( Edit: My first question seems to solved. Now the script will accept the user name I gave and check those users if they connect to the VPN for over 5 mins. I probably did...
  5. B

    Is it Possible to limit OpenVPN connect time?

    OK I think I manage to make the cron job work. I add the cru line to the /jffs/scripts/services-start file. After reboot, "cru l" shows #LimitOVPNSession# is running on the top of the list. I don't know if this is the proper way to do it, but somehow it works. Can I "rm" the init-start file...
  6. B

    Is it Possible to limit OpenVPN connect time?

    Yes I did. Right now I modify it like this if [ "$USERNAME" == "vpnuser1" ] || [ "$USERNAME" == "vpnuser2" ] || [ "$USERNAME" == "vpnuser3" ] || [ "$USERNAME" == "vpnuser4" ];then like you suggested in post #13 But I think what you changed in post#21 is better. If I understand it right...
  7. B

    Is it Possible to limit OpenVPN connect time?

    some update I think I got the script work right. I use cru a LimitOVPNSession "*/1 * * * * /jffs/scripts/LimitOVPNSession.sh vpnuserA vpnuserB enforce server" Now it will check the vpnuserA and vpnuserB user accounts, if any of them stay over 5 mins it will auto restart the VPN server. And...
  8. B

    Is it Possible to limit OpenVPN connect time?

    Just a quick reply. I am not at home right now. Yes, I have enabled the custom scripts in Merlin. I will test the script when I get home. But I am still confused about what you mean. Can you give me a example how to setup the cru command with the script. I have created 2 test accounts in my...
  9. B

    Is it Possible to limit OpenVPN connect time?

    ok, some update 1. Do you mean I just use the script like cru a LimitOVPNSession "*/1 * * * * /jffs/scripts/LimitOVPNSession.sh" Even I success manully add it to the job list, It doesn't seem to auto restart the VPN server if a user stay longer than 300 sec. How do I use it properly to manage...
  10. B

    Is it Possible to limit OpenVPN connect time?

    1. That error is just a copy and paste mistake. My bad, sorry. 2. I edited the LimitOVPNSession.sh file according to your suggestion. I just add 2 users "vpnuserA" and "vpnuserB" for the test. I run the script in ssh it correctly shows which user is connected to the VPN and for how long. it...
  11. B

    Is it Possible to limit OpenVPN connect time?

    Thank you for your reply. The script file works. But I got some questions. 1. I create the init-start file and reboot. It doesn't add the corn job. I try "cru l" it doesn't show up in the list. I did try to "cru a" the job in ssh. it works. but it will lost every time the router reboot. 2...
  12. B

    Is it Possible to limit OpenVPN connect time?

    No matter what I still want to thank you for responding to my question and take time for searching possible solution for me. I really appreciate it. 🥹
  13. B

    Is it Possible to limit OpenVPN connect time?

    Thank you very much for your reply, but I need a little bit more explanation here. I followed to your old post but I am not sure which code or scripts should I use? and where should I put it? I know I need to ssh login to the router and paste the scripts. I have already enabled the JFFS...
  14. B

    Is it Possible to limit OpenVPN connect time?

    Sort like that. But I don't need the VPN server turn it off itself. Just log out the user after couple mins. for example, a 5 mins hard limit. If they still need the ip. they could just login again. I hope I could leave the VPN server on, so they don't need to call me or message me every time...
  15. B

    Is it Possible to limit OpenVPN connect time?

    the reason I need to setup a VPN server in my router is that I want to let my family member or friends to use the ip for verification purpose. It usually just need for a very short period of time and it's hard to control when they will need it. So I wish I could just auto disconnect them after...
Top