![]() Registered Member ![]()
|
The attached script will automate a connection to the somewhat buggy ipredator service. And with a few minor changes any other tunnelling service / protocol you want to use.
To use the script you will first need to setup KVpnc to correctly connect to your tunnelling service: - use chap secrets (or equivalent) - un-check "Use KWallet" (Settings > Configure KVpnc > General) - Add "/etc/sysconfig/network-scripts/ifup eth0" to Profile :: Command execution :: Before Connect - Add "/etc/sysconfig/network-scripts/ifdown eth0" to Profile :: Command execution :: After Disconnect - Google the rest of the setup instructions for linux Once KVpnc works manually, configure KVpnc to Automatically connect at startup. (Settings > Configure KVpnc > General > Connect) And then ignore ALL subsequent password requests (idiot program keeps asking for it even when it's already in chaps). You will then need to add KVpnc and killall to /etc/sudoers (But you already needed to add KVpnc just to get KVpnc to run correctly, so do the same for killall) You will also have to configure your eth interface to: "Allow users to manage the connection" Optionally have KVpnc: - Minimize after good connect - Disable all notifications (popups) The script [was] too spammy and I'll add a cleaned up version to http://www.inet-design.com/ktorrent-scr ... ation.html There's probably a better way, there usually is, Sam PS: See also viewtopic.php?p=16240#p16240 Edit: 11-07-02: Cleaned up and Prettified the script. If you want the spam, uncomment the 2nd echo. 11-07-16: More cleaning, now shows stats without spamming the terminal. |
![]() Registered Member ![]()
|
I'm tired of the file upload gizmo and this script has a few additional features that aren't relevant to just automating tunnels. The attached script in the first post is without the additions. This one is significantly 'prettier' and has better error handling. If I can get dbus to do what I want I'll update this script further.
|
![]() Registered Member ![]()
|
Hi,
I don't know if this achieves the same thing you want, but it works well enough for me. Its much simpler as I am really interested in is if the connection to the VPN ever drops, then run a command to pause KTorrent. When the connection goes back up again, un-pause KTorrent. I wrote this bash script, and kept it in a directory with other scripts:
Substitute <YOURUSERNAME> above for your username Then, in kvpnc, I told it to run the following commands. After disconnect: /home/<YOURUSERNAME>/scripts/kvpnc_updown 0 After connect: /home/<YOURUSERNAME>/scripts/kvpnc_updown 1 This works for me because as soon as kvpnc sees the connection drops, it tries to reconnect again. So after the connection terminating, it runs the "After disconnect" command, and then the "After connect" command when it reconnects. I decided to post this here because maybe the dbus call my solution uses helps you out, if that is indeed what you are looking for. Otherwise, this can just be an alternative for some if it works out for them. |
![]() Registered Member ![]()
|
THANK YOU
i think i should thank you very much for you can waste lot of time to write this post .....thank you again for your sharing.. |
Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]