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.