What's new

Disconnect OpenVPN client in terminal

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

mrDavid

New Around Here
Hi, is there a command I can use in a cron job to disconnect the OpenVPN client? (preferably only a specific tunnel)

My goal is to prevent a specific device from accessing the net at certain times. The device is configured to only use the openvpn tunnel and prevent connections to wan. I understand Network Service Filter rules cannot be applied to vpn connections

many thanks
 
service stop_vpnclient1. that will stop it. if the router reboots, it will restart though if you have it starting with wan. you could also toggle the that if you wanted with nvram set commands
 

Similar threads

Sign Up For SNBForums Daily Digest

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