All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
[python] pptpd vpn auto-installer
Hi,
I need some help with testing this pptpd vpn auto installer that i quickly wrote up to automate setting up my own servers - its currently very messy and basic coded but it does install + configure pptpd as it should on my servers, I need to know if it will work for you guys aswel, specially on lower end machines.
This only got tested on Debian 6 powered servers so far, full root access is required to run this without problems - ubuntu might prevents the installation from executing properly because of the sudo/su system, I plan to make a fix for this later on.
With your feedback I will be able to make more auto-install scripts and release them all at one place for everyone to use, if you want to help me improve this feel free to try executing the codes below and report any problems that arise.
$ apt-get update
>
$ apt-get install python
>
$ apt-get install python-pip
>
$ pip install termcolor
>
>
$ chmod +x 940170778c.py
>
$ python 940170778c.py
Thank you!
Comments
Why so many timeouts?
mainly to make sure that the commands are finished before the script continues executing more, ontop of that I added a few extra time.sleep() lines to give the user time to read what the script actually is doing.
MASQUERADE may not be always available in OpenVZ.
config_pptpd_iptablesfix overwrites /etc/rc.local it is not safe.
this script is not designed for OVZ (its for XEN, KVM, Dedicated servers), I should've stated that. my bad!
and yeah about the overwriting of /etc/rc.local - its really a ghetto fix, i'm still working on ways to manipulate the code inside properly without affecting any other possibly user added code.
i've been adding, removing, modifying code alot to test different approaches, i'll clean up the code later. my priority right now is dealing with the rc.local problem.
this was the problem, the "exit 0" part of rc.local has to be the last line, if I remember correctly adding anything after it will break the file. what I tried is, first detecting + removing the "exit 0" part with sed and then append the firewall rule, after that we append the "exit 0" again. the problem here is that I couldnt remove the specific "exit 0" part - I dont know how to accomplish this.
exit 0 at the end of /etc/rc.local is annoying in Debian as well as "sh -e".
sed --follow-symlinks -i "s/^exit 0$//" /etc/rc.local
works great!