Messed up, need original files for startup/shutdown

armorer1984
Posts: 19
Joined: Sun Jun 05, 2011 6:46 am

Messed up, need original files for startup/shutdown

Postby armorer1984 » Sun Jun 05, 2011 6:49 am

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!

ghstryder
Posts: 65
Joined: Mon Jun 14, 2010 3:14 am

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

Postby ghstryder » Sun Jun 05, 2011 9:44 am

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.

armorer1984
Posts: 19
Joined: Sun Jun 05, 2011 6:46 am

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

Postby armorer1984 » Tue Jun 07, 2011 8:14 am

Awesome, Thank you! I had it so messed up I couldn't recognize it any more. I appreciate the help!!!

Who is online

Users browsing this forum: No registered users and 17 guests