Jump to content
TorGuard
  • 0

running torguard from a script

Rate this question


user26

Question

The Torguard GUI often stops working on my linuxmint systems. VPN remains connected (as per ifconfig) but there is no update of the stats in the gui. It will stay connected to the vpn an undetermined time after that. It seems to be, as long as the gui isn't clicked anywhere, which will cause it to crash (i.e. disappear for screen and process list). It is only then that the vpn is disconnected without the app killswitches working. I have these apps setup so that this is not a privacy issue, as they do nothing without the "tun0" vpn connection. However they are doing nothing when the vpn is down.

As the pc can be unattended for days at a time. I plan to run a script (via crontab) that will kill torguard (and the apps it starts via "on connection" script) if running and then restart torguard.

My 1st problem was running Torguard from the script without having to enter admin password.

I'm new to scripting stuff but a lot of reading has got me this far;

I used;
"sudo visudo"
to add this just before last section (under sudo%). replacing "username"
"username    ALL = (ALL) NOPASSWD: /opt/torguard/bin/torguard-wrapper"

This allows torguard to run without asking for password.
i.e. "gksudo /opt/torguard/bin/torguard-wrapper"

 

At this point I have these questions before I continue.

1) the linked "torguard" file in usr/bin/ points to the torguard-wrapper. That is why I used it. Could I have just used /opt/torguard/bin/torguard directly because I'm supplying the gksudo in my script? (to my inexperienced eyes, that’s all the wrapper seems to be doing)

2) How secure is what I have done? I would seem that the torguard files all belong to "root" so can't be replaced without elevated permissions. i.e. so torguard-wrapper can't be maliciously altered easily. I haven't overlooked something which could be bad for system security, have I ?

Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...