Page 1 of 1

Messed up, need original files for startup/shutdown

Posted: Sun Jun 05, 2011 6:49 am
by armorer1984
I screwed up and hope someone can help me. I didn't make backup copies of my openvpn-startup and openvpn-shutdown files before editing them, now they are so screwed up from my tinkering that I have no idea how to right the ship. Can someone point me where to find the originals or send me copies of them?

I appreciate the help!

Re: Messed up, need original files for startup/shutdown

Posted: Sun Jun 05, 2011 9:44 am
by ghstryder
I screwed up and hope someone can help me. I didn't make backup copies of my openvpn-startup and openvpn-shutdown files before editing them, now they are so screwed up from my tinkering that I have no idea how to right the ship. Can someone point me where to find the originals or send me copies of them?I appreciate the help!
I don't have an openvpn-shutdown file, but here is my /openvpn-startup file. ymmv, of course.

Code: Select all

#!/bin/sh echo 1 > /proc/sys/net/ipv4/ip_forward iptables -A INPUT -i tun+ -j ACCEPT iptables -A FORWARD -i tun+ -j ACCEPT iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
You can set the options in gedit to automatically save a backup suffixed with a ~. If you are using nano, you can use the -B option to do the same thing, so nano -B /etc/openvpn/openvpn-startup. Either option is a blessing when bad things happen. If you are tweaking a lot of things, the second edit will overwrite the original, so it isn't a bad idea to make a copy with a different filename.

Re: Messed up, need original files for startup/shutdown

Posted: Tue Jun 07, 2011 8:14 am
by armorer1984
Awesome, Thank you! I had it so messed up I couldn't recognize it any more. I appreciate the help!!!